App Development
#1
I am interested in doing some app development for Linux phones.  I have developed some Android apps using Android Studio but I am not that familiar with Linux except for some tinkering with Python for the Raspberry Pi and the Jetson Nano. I need some big picture instruction of the tools and methods I need to develop apps for the Pine Phone. This newbie needs some help.
  Reply
#2
(01-22-2021, 07:45 AM)rkveale Wrote: I am interested in doing some app development for Linux phones.  I have developed some Android apps using Android Studio but I am not that familiar with Linux except for some tinkering with Python for the Raspberry Pi and the Jetson Nano. I need some big picture instruction of the tools and methods I need to develop apps for the Pine Phone. This newbie needs some help.

What OS?

I've done some qml/python code for UT and python for mobian using Gtk libs.
  Reply
#3
(01-22-2021, 07:45 AM)rkveale Wrote: I am interested in doing some app development for Linux phones.  I have developed some Android apps using Android Studio but I am not that familiar with Linux except for some tinkering with Python for the Raspberry Pi and the Jetson Nano. I need some big picture instruction of the tools and methods I need to develop apps for the Pine Phone. This newbie needs some help.

Hello,

I am pretty much in the same situation as you, though I have had my pinephone for a few months now. What I have understood so far is that basically, pinephone development is not that much different from regular linux development (actually if your app is well written it will work on the phone and the linux desktop just as well).

What that entails however is that you have lots of possible options and choices to make:
  • The most impacting is the desktop environment you want to target: gnome, KDE, lorimi, other...
  • Then you have the distribution itself: are you going to target a specific distribution or try a more portable approach like flatpak (not all desktops are available on all distributions)
  • Finally, there is the question of your programming skills and what kind of app you want to develop. Again, a wealth of choices here: C (like the gnome calls app), Rust (like the Fractal client or the keyboard in phosh), Javascript (like the gnome sound recorder) Vala (like the gnome contacts application or chatty), python, C++ ...
The most complete tutorial I have found so far is for gnome + flatpak, available here: https://developer.puri.sm/Librem5/
It is made for the librem5 phone but almost everything applies to the pinephone just as well. It covers build tools, several sample apps, compilation / packaging, phone app design and specific libraries, and a lot of other stuff.
Once you understand this stuff, you ought to be able to participate to a lot of open-source phone app projects and write your own apps.

Being more of a KDE user originally, I wanted to explore that first but I have not been able to find a KDE-based tutorial equivalent in scope, depth and phone-orientation to the librem5 tutorial, if someone knows of such a resource I would be very interested.

Anyway, for my personal project, I have chosen gnome + flatpak + rust/gtk-rs (I find a lot of inspiration in the Fractal client app).

Good luck to you. The learning curve is steep but there are so many opportunities and interesting stuff to do.

Lukas
  Reply
#4
I have used both QtQuick/QML and Python in the past. So far QtQuick/QML has seemed to work out the best for me. Packaging is the hardest since there are many choices and distros. Flatpaks I have noticed are very slow on the PinePhone when compared to native packaging. So far I have chosen to just go with PKGBUILD and AUR for distribution and will probably end up supporting deb and other distro packaging separately and natively rather than going with the slower Flatpak. If you need examples of working PKGBUILDs for QtQuick or Python, you can have a look at my gitlab.

https://gitlab.com/users/The3DmaN/projects
View my projects at: https://gitlab.com/users/The3DmaN/projects or at the3dman.gitlab.io you can also find me on Matrix in many of the Pine related channels.
  Reply
#5
Hi all,

I also been trying to get into app development for the PinePhone (yes I know they're just Linux apps) but it's extremely difficult.

I started with some Kirigami tutorials but after one afternoon of C++ I decided that's not the life I want to live. So I tried Rust instead. The QT bindings were a bit weird and not so well documented. While it was better, I still couldn't get something properly work. Part it's coming from Ruby and Rust not even letting me return a new string I created from certain functions (and me not being able to change the signature). Part was the QT bindings limiting me more and more and couldn't find any good examples.

Now I want to use Python as that should fit my Ruby background best. But still can't find 1) a simple end to end tutorial and 2) a more advanced app to read their source code.

@laaglu thanks for linking the librem docs. Unfortunately I'm on Manjaro ARM so all their setup is really hard to follow, but I did get some good bits out of it.

@The3DmaN thanks, I had a look at your repos but most are C++ and the 2 Python ones seem to be GTK not QT. But great insight on the packaging side of things!
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  PinePhone app development WhiteHexagon 14 6,930 05-17-2023, 10:41 PM
Last Post: Kevin Kofler
  Frustration with development pace Subsentient 96 102,516 12-31-2020, 10:35 AM
Last Post: kent
Question Where are the development discussions at? mnjm97 2 4,242 08-28-2020, 01:19 AM
Last Post: rocket2nfinity

Forum Jump:


Users browsing this thread: 1 Guest(s)