[Android-development] Activity not starting with foreground service

Filip Piechocki fpiechocki at gmail.com
Tue Dec 4 05:58:27 CET 2018


But the use case is that user relaunches the app while the service part is
always there. Let's put it this way - service is doing all the job and it
is doing it continuously. Activity is just a UI frontend showing current
state of the backend service processing. Service does not care if frontend
is shown or not and thus cannot relaunch it with Intent as it does not know
when the frontend is needed.

BR,
Filip

On Mon, Dec 3, 2018, 21:12 Jason H <jhihn at gmx.com wrote:

> I can't speak to the specifics of your situation, but I would suggest
> using an intent to relaunch your activity.  I did encounter a problem with
> the Android system not playing nice with the Qt event loop on my activity,
> while I was doing background androif processing (via Alarms)
>
> HTH.
>
>
> *Sent:* Monday, December 03, 2018 at 1:21 PM
> *From:* "Filip Piechocki" <fpiechocki at gmail.com>
> *To:* android-development at qt-project.org
> *Subject:* [Android-development] Activity not starting with foreground
> service
> Hi,
> I am just building some app with Qt on Android. It consists of an Activity
> and a Service (ran as an foreground service as I want it to not die). The
> thing is, that with Qt 5.11.2 and 5.12.0-rc built with android-clang (ndk
> 18, clang 7) it works at the beginning but then when I close the Activity
> from within the apps view and relaunch it then it hangs even before logs
> like "QtCore: starting". What I need to do is to force stop the service and
> relaunch the activity but that's a showstopper to me. I haven't enough time
> today to recheck with some older version but I was making some PoC with Qt
> 5.11.1 built with GCC and ndk 17 and it was working as expected (activity
> could be easily killed and relaunched with services running all the time).
> Is there anything that I might be doing wrong here?
>
> BR,
> Filip
> _______________________________________________ Android-development
> mailing list Android-development at lists.qt-project.org
> https://lists.qt-project.org/listinfo/android-development
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/android-development/attachments/20181204/c8890e17/attachment.html>


More information about the Android-development mailing list