There is no real way around this if you want to publish your app to Google Play outside of using Google FCM. Then at certain intervals (maybe a linear back-off policy for example) the apps will be 'allowed' to access the network for ~10 seconds. A few minutes after the screen shuts off the phone will enter this mode shutting down all network connections. You can read about both of them here.ĭoze: This would be 'sleep'. In Android API 23 the way 'sleep' works was been changed. I'm not sure if anything else will happen. I didn't test what happens after a few hours with no activity. Why would another activity be created just to go straight to pause mode? This happens immediatly after onDestroy of the original activity! I find no reason for this strange behaviour. Now, the strange behaviour begins: just after the last onDestroy finishes, another activity is created: onCreate, onStart, onRestoreInstanceState, onResume and finally onPause are invoked. When this happens, the following methods are invoked: onStop (calling isFinishing returns false), onRetainNonConfigurationInstance and onDestroy. When the screen goes off, onSaveInstance and onPause are called.Ī few seconds later (usually ~15s) the device enters into sleep mode (is this the correct name?) You have your activity open and stop interacting with itĪfter a few seconds (it depends on how the device is configured) the screen will go off.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |