2

Suppose user has not interact with an app. So when does it go to standby mode.

If it went to standby mode. Is there any API to know that??

Phantômaxx
  • 37,901
  • 21
  • 84
  • 115
  • Your app is not told that it is being put into app standby mode, if that is what you are asking. Or are you asking if you can find out if another app is in app standby mode? – CommonsWare Nov 29 '17 at 13:23
  • Hi @CommonsWare actually I wanted to know how can I know app is in standby mode. For eg we have isDeviceIdleMode api to know if its in doze mode. – BharatProteemGogoi Nov 29 '17 at 13:34
  • I have deleted the answer it, Okay you should edit your question to clarify a little more for future users too! – Xenolion Nov 29 '17 at 13:39
  • I am not aware of any way to detect that your app has been put into app standby mode. There might be one, but I do not know what it is. You can make some educated guesses -- for example, if you are set up to do work periodically, and according to your records you are only getting control once per day instead of your normal frequency, *probably* you are in app standby mode. Ideally, there would be a way via `PackageManager` or `PowerManager` to detect this condition, but if there is, I do not know the approach. – CommonsWare Nov 29 '17 at 13:41
  • @CommonsWare yeah i think PowerManager has isInteractive which can be used with ConnectionManager to check if network request are blocked. If that is true that might be the StandBy mode. just a theory, need to implement and check. Thanks for your time though. – BharatProteemGogoi Nov 30 '17 at 05:50

0 Answers0