[Interest] How to make the QML gui be never stopped on Android

Denis Shienkov denis.shienkov at gmail.com
Thu Feb 15 16:00:54 CET 2018


Hi Jérôme,


 > <meta-data android:name="android.app.background_running" 
android:value="true"/>


I already have this property in My manifect file.


> That service will need to communicate with your  application through intent I think. The service could try to wake your 
application.


I need to continue render/update for some dynamic QML GUI even when an 
application goes to sleep.


I don't know how to use a service to render a some GUI stuff, e.g. in 
off-screen mode.


Maybe I need to use a QTimer which will call the QQuickWindow::update() 
method,

I don't know...


Denis.


15.02.2018 17:37, Jérôme Godbout пишет:
>
> Hi,
>
> I do the following for quick oauth2 background html handling:
>
> <meta-data android:name="android.app.background_running" 
> android:value="true"/>
>
> inside the Qt activity tag of the AndroiManifest.xml
>
>
> I wish it was easier to specify a single network activity that can 
> continue into the background or at least a network intent that can 
> wake the application up (could handle the message an/or bring 
> application up front again).
>
>
> I think you will need to create a service to have a full fledge UDP 
> listener that continue even after the application screen goes off. 
> That service will need to communicate with your application through 
> intent I think. The service could try to wake your application. Not a 
> specialist about this but this might help, good luck and let us known 
> how you did solve it, I'm curious about all this, this still a pain to 
> make those work properly.
>
> ------------------------------------------------------------------------
> *From:* Interest <interest-bounces+godboutj=amotus.ca at qt-project.org> 
> on behalf of Denis Shienkov <denis.shienkov at gmail.com>
> *Sent:* Thursday, February 15, 2018 9:25:38 AM
> *To:* interest at qt-project.org
> *Subject:* [Interest] How to make the QML gui be never stopped on Android
>
> Hi all,
>
> I use QML and Qt 5.9.3 on my Android application.
>
> I achieved some tricks that my application continued to
> work when the smartphone goes to sleep or when the user
> presses the 'power' button, i.e. seems, that an
> application running in background mode.
>
> I do not use an Android service here (because I dont
> know how to do it, also I'm not sure that this will help).
>
> So, when the application goes to background mode,
> I see that it continues to work, because I see that
> my UDP "keep-alive" messages are sends and receives.
>
> But, A MAIN problem is that a QML GUI is stopped then...
> i.e. does not updates.
>
> I need to do GUI grabbing in a real time and send it
> to UDP in any case.
>
> Is it possible to make a GUI work forewer?
>
> BR,
> Denis
>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20180215/db726e9b/attachment.html>


More information about the Interest mailing list