Quantcast
Channel: Active questions tagged react-native+android - Stack Overflow
Viewing all articles
Browse latest Browse all 28476

How restart android app after unlock screen

$
0
0

I have a react native app that use paho mqtt (react native module) the problem is that when the screen is lock, this service die. Im not android developer but I read that the problem is that doze mode kill all and my paho service die after a few minutes.

I read this issue https://github.com/eclipse/paho.mqtt.android/issues/226 and test a solution given there but in android > 8 this solution not work anymore.

I think 2 possible solutions:

1. Run service again after unlock the screen (dunno how to do this for
android >8).
2. Restart the app after unlock the screen (Searching for how detect that the screen is unlock in react native).

If someone know how to handle this solutions or another one.


Viewing all articles
Browse latest Browse all 28476

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>