[Librem-5-dev] PyGTK+ app development and testing on qemu image

Richard Duivenvoorde rdmailings at duif.net
Sun Oct 27 10:14:53 PDT 2019


First post on this list, let me know if I need to move to another list..

My goal is to create an 'app'lication for the Librem 5 to
show/publish/subscribe  MQTT topics. For Android user: mimic MQTT-Dash
app [0].
Developing in Python3/Builder on Debian, using latest Purism5 VM

I do have some experience with App development on Android and GUI
development on Linux/Python with Qt (QGIS.org plugins).

Creating my first prototype I have some questions:

- In Android there is a clear "Activity Lifecycle": what to do when the
app is in view or not etc etc. In my case I would want to stop the mqtt
messaging while the app is not in focus.
But I could not find an PyGTK+ signal which is fired when my application
windows get's in focus or so. Did I miss something?

- While not having a real phone, is testing in the qemu VM a good way to
test? (looking at performance etc etc)... because:

- I do have some performance issues in my VM, not sure if it has
something to do with my code (which retrieves a lot of MQTT signals and
tries to update parts of the visuals in the app): all seems to be OK,
but after (for example) pushing a button the app takes 100% of a cpu
thread (gave the VM 2 cpu's and 3 Gb RAM).
It is not clear if of what is creating havoc at that moment: the mqtt
thread, or the updating of the 'tiles' (set_markup of labels)
Any hints on how to investigate that?

Thanks for any input, and I hope this is the right channel for these


Richard Duivenvoorde

[0] https://play.google.com/store/apps/details?id=net.routix.mqttdash

More information about the Librem-5-dev mailing list