Buiding apps for pinephone
#1
Hi,
How easy is it to build apps for the pine phone.

I am currently building apps for android phones and find this process quite frustrating at times. Given that the pine phone essentially runs a conventional Linux distribution, can apps be built using languages such as python directly? Is there a preferred language for building apps? Or is an SDK required?

Also,
Can lightweight Linux distributions such as MXLinux be adapted to run on the pine phone.

Any help is much appreciated.

Cheers.
  Reply
#2
(05-25-2021, 10:08 PM)katesfb Wrote: I am currently building apps for android phones and find this process quite frustrating at times. Given that the pine phone essentially runs a conventional Linux distribution, can apps be built using languages such as python directly? Is there a preferred language for building apps? Or is an SDK required?

Any help is much appreciated.

I've coded a couple of apps in python+gtk for debian+phosh but haven't done much more beyond proof of concept. What is it you want to know?
  Reply
#3
Hi,
And thanks for the reply.

It was just a general query really. Is writing apps for the pine phone similar to writing apps for a standard linux PC?

For example if a i write an app for use on a linux machine i would use say Geany or Idle if using python (with kivy), and processing IDE which can be used for java, python, javascript.

What is access to the phone sensors like from a programming perspective? For example if i wished to write an app that reported information coming from the light sensor, acccelerometer, magnetometer etc. Is this doable using standard programming tools with maybe a few libraries/methods to interface with the sensors?

Any hep is much appreciated.

Cheers.
  Reply
#4
Programming for the PinePhone is just like programming for a typical x86/x64 linux PC except that you have a tiny touch screen, have to use a screen keyboard, you are on ARM64 instead of x86/x64, and the CPU and GPU are puny compared to modern x86/x64 machines.

You can write programs in python. In fact a lot of programs on the PinePhone are written in python for better (faster to get something up and running) or worse (python isn't known for good performance on desktops, so it can struggle a bit on the PinePhone).

If you write programs from an x86/x64 computer in languages that require compilation, you will need to take care to do cross-compilation or you can do the compilation on the PinePhone itself. It is straightforward to install all the compilers in the package databases of each linux distribution and use them. They will take longer to compile, but they will do the job just as good as on a more powerful machine just slower.

You will need to be a bit more mindful of performance and definitely RAM usage than you would on a x86/x64 desktop or laptop of today. If you have done programming for the Raspberry Pi, then your experience with those issues there will carry over here. The PinePhone has more RAM than the Raspberry Pi 3 and earlier and a comparable processor.

As far as sensors, it depends on which sensor you want to access. The IMU and a few other sensors are accessible via the IIO (Industrial Input Output) subsystem of the kernel (use libiio and tools to access). You can also see the devices in /sys as well. One thing to keep in mind, recent PinePhones use a different magnetometer due to pandemic related component shortages.
  Reply
#5
https://imgur.com/a/n44dZsL

Building apps on the PinePhone is a blessing compared to iOS/Android/WP.

You can code on your linux device, rsync the binary over to the pinephone, use SSH with X Forwarding to run the application on the phone but get the actual Window back to your workstation. I can do that without even having to connect my pinephone to my laptop with a cable, i can just rsync and x-forward over wifi, 4g or even fucking bluetooth if i had to.

It feels exactly like writing desktop applications. There's no emulators or special SDKs, everything just works as you'd expect.
  Reply
#6
(05-26-2021, 11:21 PM)katesfb Wrote: What is access to the phone sensors like from a programming perspective? For example if i wished to write an app that reported information coming from the light sensor, acccelerometer, magnetometer etc. Is this doable using standard programming tools with maybe a few libraries/methods  to interface with the sensors?

I'm yet to mess with sensors, because there you have to deal with them like a PC rather than a SDK etc
  Reply
#7
Hi all,
And thanks for all the replies - very helpful.

I am now even more convinced that this is the way to go. So i will be buying a pine phone and look forward to writing apps for it. Maybe Pine64 should partner with a Chinese hardware supplier company.

Thanks for your comments. much appreciated.

Cheers.

(06-10-2021, 10:52 PM)katesfb Wrote: Hi all,
And thanks for all the replies - very helpful.

I am now even more convinced that this is the way to go. So i will be buying a pine phone and look forward to writing apps for it. Maybe Pine64 should partner with a Chinese hardware supplier company.

Also, do i assume based on previous comments that kivy (python module) will work?

Thanks for your comments. much appreciated. 

Cheers.
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Are you using the Pinephone as your daily driver? jro 64 8,395 1 minute ago
Last Post: Zebulon Walton
  Pinephone quickly crashes unless plugged to power gab 2 203 Yesterday, 02:54 PM
Last Post: gab
Heart What native PinePhone application would you like to see in the near future? kern707 65 11,687 Yesterday, 11:42 AM
Last Post: nelstomlinson
  Which interface was pre-installed on the PinePhone CE: Manjaro? amosbatto 1 49 08-03-2021, 04:23 PM
Last Post: kqlnut
  PinePhone For Sale (UBports Edition) Joelandsonja 1 274 08-02-2021, 08:33 PM
Last Post: Joelandsonja
  Pinephone (For Sale) d3acon 0 109 07-29-2021, 09:04 AM
Last Post: d3acon
  Add kill switches to the PinePhone realrichardsharpe@gmail.com 3 162 07-28-2021, 09:17 PM
Last Post: bcnaz
Question WhatsApp & Pinephone - What are the alternatives for collaborative comms? danimations 8 694 07-26-2021, 08:39 AM
Last Post: Zombie Feynman
  Has anyone had success with a Nexdoc and Pinephone? nelstomlinson 2 281 07-23-2021, 10:27 AM
Last Post: nelstomlinson
  jumpdrive software might be faulty (or my pinephone hardware) zetabeta 3 276 07-20-2021, 03:14 PM
Last Post: zetabeta

Forum Jump:


Users browsing this thread: 1 Guest(s)