Doze mode Vs Network Status

守給你的承諾、 提交于 2019-12-12 16:27:36

问题


I am developing app to check WiFi status ,If no WiFi connectivity app has to show disconnect symbol.From Marshmallow on wards,If device enters in to "Doze mode",My device network enters in to suspended mode.If I wake my device up by pressing power button,Will WiFi automatically become Active state?


回答1:


Network will be always active, its just the access to it by apps gets suspended. System decides when to allow it.

Based on the documentation:

As soon as the user wakes the device by moving it, turning on the screen, or connecting a charger, the system exits Doze and all apps return to normal activity

So if you turn on the screen, then the access to network will be granted, provided you app is not in standby mode.



来源:https://stackoverflow.com/questions/50126567/doze-mode-vs-network-status

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!