[英]What is the duration of a maintenance window during doze mode?
I am looking to use the Jobscheduler api to schedule a job when there's connectivity to download a bunch of images from push messages.我正在寻找使用 Jobscheduler api 来安排作业,当有连接从推送消息下载一堆图像时。 Since wake locks are disregarded by the os in doze mode and since an fcm message can only wake the device a maximum of 10s, the maintenance window seems like the only way for me to download the images from all the push notifications.
由于操作系统在打盹模式下忽略了唤醒锁,并且由于 fcm 消息最多只能唤醒设备 10 秒,因此维护 window 似乎是我从所有推送通知中下载图像的唯一方法。
The images will be max 100kb each and a maximum of 50 images at a time.每个图像最大 100kb,一次最多 50 个图像。 So basically all in all maximum 5mb data usage.
所以基本上所有的最大5mb数据使用量。
I was wondering if the window during doze mode will be wide enough to allow these downloads.我想知道打瞌睡模式下的 window 是否足够宽以允许这些下载。
I have searched across Google and have come across a few loose data details claiming 5 - 10 minutes.我在 Google 上进行了搜索,发现了一些松散的数据细节,声称需要 5 到 10 分钟。
Can anyone please guide me to the correct information.谁能指导我正确的信息。
Thanks and regards.谢谢并恭祝安康。
It seems to be documented, now, finally! 现在,终于,它似乎被记录在案了!
‡ If network access is restricted, the app is granted a window of 10 minutes to use the network at the specified interval.
‡ 如果网络访问受到限制,应用程序被授予 10 分钟的 window 以在指定的时间间隔使用网络。
BUT,但,
You can't count on it to be the same across all the Android devices out there.您不能指望它在所有 Android 设备中都相同。 Of course, the OEM can alter this.
当然,OEM 可以改变这一点。 The answer would therefore be, a few minutes as no OEM would insensibly put it out to be just a minute or two.
因此,答案是几分钟,因为没有 OEM 会不自觉地把它说成只是一两分钟。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.