How to detect if App has gone in or out of App Standyby Mode ( Android M+)
O

0

18

If the device is in DOZE IDLE or IDLE_MAINTENANCE mode, these events can be received if we register a broadcast receiver for "android.os.action.DEVICE_IDLE_MODE_CHANGED". But this receiver is not working when making App to go into App Standby using adb commands. Is is possible that we can programmatically check whether the app has gone in or exited from the App Standby mode for devices running on Marshmallow and above?

adb commands used to make App go into App Standby

adb shell dumpsys battery unplug
adb shell am set-inactive {Package name} true

and to exit

adb shell am set-inactive {Package name} false
Orvalorvan answered 13/7, 2016 at 1:31 Comment(2)
Are this problem still not resolved?Crying
this could be interesting to me alsoSpiritoso

© 2022 - 2024 — McMap. All rights reserved.