白名单 android 应用处于休眠模式
White listed android app in doze mode
我正在尝试制作一个 GPS 追踪器应用程序。
我不打算在 Play 商店中分发此应用。所以,我完全控制了设备(并且可以手动加入白名单)。
我想知道是否:
- 如果充电器始终连接到电源,是否会激活打瞌睡模式
phone?
- 突然震动或振动会 phone 禁用打瞌睡模式
长时间不活动后?例如,考虑 phone 放置
在卡车内,振动会(从发动机启动或
旅行)足以使设备从休眠状态恢复正常
模式?
- Job Scheduler 服务是否会在休眠模式下工作
手动将应用列入白名单(包括 GPS 和网络)?
- 是否会phone调用打瞌睡模式设备将其状态更改为正常模式?
- 陀螺仪、加速度计等传感器可以在打瞌睡模式下工作吗?
问题 1:
Would doze mode be activated if charger is always connected to phone?
没有
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.
问题二:
Would sudden jerk or vibration to phone disables doze mode after a
prolonged inactivity? For example,consider phone placed inside a truck and would that vibration (from engine start or travelling) be sufficient to get
the device from doze to normal mode?
在 Android 之前 N,是的。来自AndroidN,没有
Android 7.0 brings further enhancements to Doze by applying a subset
of CPU and network restrictions while the device is unplugged with the
screen turned off, but not necessarily stationary, for example, when a
handset is traveling in a user’s pocket.
问题 3
Will job scheduler service work in doze mode with scheduled app
manually whitelisted (including GPS and network)?
没有
An app that is whitelisted can use the network and hold partial wake
locks during Doze and App Standby. However, other restrictions still
apply to the whitelisted app, just as they do to other apps. For
example, the whitelisted app’s jobs and syncs are deferred (on API
level 23 and below), and its regular AlarmManager alarms do not fire.
问题4
Would phone call to doze mode device changes its state to normal mode?
是的。由于与问题 1 相同的原因。
问题5
Would sensors like gyro, accelerometer work in doze mode?
可能无法在打盹模式下工作
有关打瞌睡模式下优化的更多详细信息,您可以参考此document。
我正在尝试制作一个 GPS 追踪器应用程序。
我不打算在 Play 商店中分发此应用。所以,我完全控制了设备(并且可以手动加入白名单)。
我想知道是否:
- 如果充电器始终连接到电源,是否会激活打瞌睡模式 phone?
- 突然震动或振动会 phone 禁用打瞌睡模式 长时间不活动后?例如,考虑 phone 放置 在卡车内,振动会(从发动机启动或 旅行)足以使设备从休眠状态恢复正常 模式?
- Job Scheduler 服务是否会在休眠模式下工作 手动将应用列入白名单(包括 GPS 和网络)?
- 是否会phone调用打瞌睡模式设备将其状态更改为正常模式?
- 陀螺仪、加速度计等传感器可以在打瞌睡模式下工作吗?
问题 1:
Would doze mode be activated if charger is always connected to phone?
没有
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.
问题二:
Would sudden jerk or vibration to phone disables doze mode after a prolonged inactivity? For example,consider phone placed inside a truck and would that vibration (from engine start or travelling) be sufficient to get the device from doze to normal mode?
在 Android 之前 N,是的。来自AndroidN,没有
Android 7.0 brings further enhancements to Doze by applying a subset of CPU and network restrictions while the device is unplugged with the screen turned off, but not necessarily stationary, for example, when a handset is traveling in a user’s pocket.
问题 3
Will job scheduler service work in doze mode with scheduled app manually whitelisted (including GPS and network)?
没有
An app that is whitelisted can use the network and hold partial wake locks during Doze and App Standby. However, other restrictions still apply to the whitelisted app, just as they do to other apps. For example, the whitelisted app’s jobs and syncs are deferred (on API level 23 and below), and its regular AlarmManager alarms do not fire.
问题4
Would phone call to doze mode device changes its state to normal mode?
是的。由于与问题 1 相同的原因。
问题5
Would sensors like gyro, accelerometer work in doze mode?
可能无法在打盹模式下工作
有关打瞌睡模式下优化的更多详细信息,您可以参考此document。