[Librem-5-dev] A few questions about development

Chris Hessing chris at open1x.org
Wed Jan 23 08:34:10 PST 2019


Hello all,


First, let me say that if I am posting this to the wrong list, please 
let me know which list is the correct one to post to.   (I figured these 
were development related questions, so they should go on the development 
list.)


I'm working on a TOTP app, primarily for the Librem 5, but one that can 
also be used on Linux (and eventually possibly Mac, Windows, and maybe 
even Android).   I have been developing it on Linux, and then building 
and running it on the emulator to test. During that process, I've come 
across some issues, and questions.


If anyone has answers to any of these questions, please keep in mind 
that I am developing this app using Qt, which might mean things are a 
little different from an app developed using GTK.

So, on with the questions :

1. Is there any good way to detect that the device the app is running on 
is a Librem 5? --  I may be off about the intent here, but I suspect 
that apps running on the Librem are expected to run full screen.  So, 
being able to detect the device would allow me to put some special 
Librem 5 code in to run the app fullscreen.

2. How are apps expected to terminate when running? --  I ran in to a 
couple of problems that prompted this question.   First, when I built 
the Qt app on the emulator and ran it, the title bar was tiny, and there 
was no "X" button visible, so no obvious way to close the app.   Second, 
when I added code to show the app full screen, Qt removes the title bar 
completely, so again, there was no way to close the app.   If apps are 
expected to be closed using the "X" button, I can change the way it goes 
full screen to keep the title bar, but that just runs me in to the first 
issue in this list.

2a. Is it expected that Qt developers will use the KDE Kirigami 
framework (or some other framework) to make apps look/work properly on 
the device?

2b. If a specific framework is expected, can you provide any useful 
links to examples of how to install it in a dev environment?   (Or, even 
tell me if a certain Linux distro is a good one to use as it is easy to 
set up the development environment.   When it comes to development 
resources, I have a ton of hardware (and the power bill to prove it!), 
but not a ton of time. ;)

3. According to the developer documentation, apps can be distributed 
either as flatpak or .deb packages.  The app I am working on will 
require more components of Qt than what are installed on the emulator by 
default.   If I package the app as a .deb, will the phone properly 
handle asking for root permissions to install the extra packages?   Or 
do I need to use a flatpak?   (I have no experience with either 
packaging method, so I'd like to avoid learning one and finding out that 
it won't work.   Right now, I am leaning towards creating a .deb as I 
suspect there is more information available on how to do it.)

4. After sliding up the key guard and entering the PIN, you are 
presented with (on the emulator) a screen with a title bar, and some 
buttons in the footer, but is otherwise blank.   Is the idea that apps 
will show up on that screen?

5. When installing an app, what should the app be doing to have its icon 
show up in the appropriate place?

Thanks!



More information about the Librem-5-dev mailing list