Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How long does an App need to be idle for App Standby to kick in (Android Marshmallow)

I've looked all over the internet to find specifics about App Standby mode in Android Marshmallow, but I've not found any specific data for when it happens, other than some listed conditions that might cause it to happen. I also see a nebulous "If the device is idle for long periods of time, the system allows idle apps network access around once a day" without any specifics about how long this window would be.

Doze mode seems pretty well researched (This gist was particularly helpful and consistent with my findings), but I haven't been able to see App Standby in action. I created a test app that sends data to a server every 5 minutes via an Alarm and ran it for a week, and it continued to hit the server every 5 minutes unless the phone went into Doze mode and only hit the server in maintenance periods, then go back to every 5 minutes when the phone was awoken, so it did not appear that Android ever put it in "App Standby" state even though I didn't directly interact with the app.

Is there any specific data on how App Standby works?

like image 976
rderwin Avatar asked Nov 10 '22 00:11

rderwin


1 Answers

You can force the device to enter this mode using the code below:

adb shell dumpsys deviceidle enable 
adb shell dumpsys battery unplug
adb shell dumpsys deviceidle step
adb shell dumpsys deviceidle force-idle
like image 80
Victor Gomes Avatar answered Nov 14 '22 21:11

Victor Gomes