[Android-development] Android lock screen stops udp receive

Omatrix Star omatrix1981 at yahoo.com
Sat Nov 12 10:46:55 CET 2016


Thanks a lot. That did the trick (Manifest).As drawing in background is not my issue here, I can use this method for now.Thanks for your help
oMatrix

      
   
Hi,
Be aware that starting with 5.5 we freeze the main event loop if the *activity* is backgrounded, so, if you're using an activity to listen for UDP instead of  service all the signals/slots are blocked.To unblock them you need to change the setting from you AndroidManifest.xml file (check http://code.qt.io/cgit/qt/qtbase.git/tree/src/android/templates/AndroidManifest.xml#n44 ) but is not recommended at all because on *some* phones if you're trying to draw something while the application is in background it will crash.I do recommend you to use a service instead (check https://www.kdab.com/qt-android-create-android-service-using-qt/ for more info).
Cheers,BogDan. 

    On Saturday, November 12, 2016 11:15 AM, Omatrix Star <omatrix1981 at yahoo.com> wrote:
 

 Hi
I did lots of tests. I repeated my test with PARTIAL_WAKE_LOCK acquire on java side of the project, also with FULL_WAKE_LOCK, ACQUIRE_CAUSES_WAKEUP and SCREEN_BRIGHT_WAKE_LOCK. I get the WAKEUP messages in console log but still It doesn't receive the UDP packets.For more information I should say that when I unlock the phone the listener SLOT gets all of packets that received during lock at once.I can provide you an example if you like.
oMatrix

      
Please read the entire bug report and you'll find out why it appears to work.
BogDan. 

    On Tuesday, November 8, 2016 10:55 AM, Omatrix Star <omatrix1981 at yahoo.com> wrote:
 

 But why it works with Qt 5.3  and also with native java project?

      
Hi,
That the correct behavior, check https://bugreports.qt.io/browse/QTBUG-56648 for more info on this matter.
Cheers,BogDan.

 

    On Tuesday, November 8, 2016 9:49 AM, Omatrix Star via Android-development <android-development at qt-project.org> wrote:
 

 hi
I have a problem with android lock screen in Qt 5.7 (SDK 25, NDK 13).
When I lock the android screen my app stops receiving UDP datagram and as soon as I unlock the phone, it starts receiving again even it receives packets that are sent while locking.
But there's no such a problem with Qt 5.3.2 (SDK 20, NDK 12).
I repeated the test with Samsung Galaxy S3 and Samsung Galaxy Note 8.1.I'm really stuck there, Please help
_______________________________________________
Android-development mailing list
Android-development at qt-project.org
http://lists.qt-project.org/mailman/listinfo/android-development


   

   

   

   

   

   
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/android-development/attachments/20161112/bc68d28e/attachment.html>


More information about the Android-development mailing list