How to determine if an application was turned on or off in standby mode (Android M +)

If the device is in DOZE IDLE or IDLE_MAINTENANCE mode, these events can be received if we register the broadcast receiver for " android.os.action.DEVICE_IDLE_MODE_CHANGED ". But this receiver does not work when the application goes to App Standby using adb commands. Is it possible that we can programmatically check whether the application has passed the application standby mode or exited it for devices running on Marshmallow and higher?

Adb commands used to enable the app in App Standby

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

and go out

 adb shell am set-inactive {Package name} false 
+7
android android-6.0-marshmallow android-doze
source share

No one has answered this question yet.

See related questions:

3295
Why is the Android emulator so slow? How can we speed up Android emulator development?
2510
How to keep Android activity state by saving instance state?
900
How to disable landscape mode in Android?
17
How to change the device in the "Dose" mode (Android Preview M / Marshmallow)?
2
Standby and standby in Android 6.0
2
Android M (preview) App Standby
one
Visual Studio Emulator for Android - Mashmallow Power State
one
Waiting and application emulator
one
Exit Android Mode
0
Understanding and testing Android M + Doze mode

All Articles