[Interest] Android service problem

Marek FloriaƄczyk marek.florianczyk at gmail.com
Thu Oct 13 14:53:16 CEST 2016

Hi all

This is my first mail to qt interest group. I'm working on an application which 
tracks and reports user movement over some period of time (2-3 hours)

I have two problems with Android Services.
First one is illustrated by this example:

Application has service which simply counts seconds, it has QTimer with 1 
second interval which increments "counter" variable and sends it back to the 
application. Second counter is inside app and is simply QTime difference 
between time when service counter was started and "now" time.
It seems to me that after a while (minute or so) android service goes to 
sleep, QTimer doesn't work and doesn't count seconds.
To replicate the problem: Install app, start it, reset counter, disconnect the 
usb cable from the phone, lock the phone, wait a minute or so, and unlock 
phone, counters will have different readings indicating that Android service 
wasn't working (counting seconds).
However if you keep the usb cable attached to the phone, service is working 
for a long time - no problem.

Second problem is with Qt5positioning. It crashes the service when I try to 
create default source, this is example:

In adb logcat there is full output of SIG 11. Service crashes and then is 
restarted by the operating system and crashes again. I have attached debug 
from adb logcat.
If I use Qtpositioning inside the app, not service it works well.

I'm testing this on Qt 5.7 and Android 4.2.2, first problem also on Android 4.4 
and Android 6.0

I can report Qt Bug if it is a bug, but first I would like to have some 

Best Regards
-------------- next part --------------
A non-text attachment was scrubbed...
Name: logcat.log.gz
Type: application/gzip
Size: 63397 bytes
Desc: not available
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20161013/ffa38185/attachment.gz>

More information about the Interest mailing list