关闭设备时过期的本地通知将丢失 [英] Local notifications that expire while device is turned off are lost

查看:114
本文介绍了关闭设备时过期的本地通知将丢失的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我的应用程序对本地通知进行排队,但是当通知发生时设备已关闭,那么在重新启动设备时,没有任何迹象表明有任何通知被触发。

If my app queues a local notification but then the device is turned off while the notification is due to fire, then upon restarting the device there is no indication there ever was a notification that fired.

同样的事情似乎发生在日历闹钟上。

Same thing seems to happen with calendar alarms.

从用户的角度来看,这对我来说似乎不正确 - 如果通知是一个非常重要的日历提醒,我碰巧在它被解雇的瞬间重新启动,然后我丢失了那个重要的提醒,即使我的设备只关闭了3秒钟,如果通知是由于火灾在3秒内它永远失去了。

This doesn't seem like the correct behavior to me from a user's perspective - if the notification were a calendar reminder for something very very important, and I happened to reboot at the very instant it fired, then I've lost that important reminder, even if my device were only turne3d off for 3 seconds, if the notification was due to fire in the 3 seconds its lost forever.

我错过了什么?

推荐答案

我认为这是设计上的:如果你关闭设备1个月,你不希望它显示1个月的毫无价值的通知。此外,iOS设备始终打开;如果您需要无法访问,只需启用飞行模式即可禁用所有无线/蜂窝通信,但您仍会收到通知。

I'd say this is by design: if you keep a device turned off for 1 month, you don't want it to display 1 months worth of worthless notifications. Also, iOS devices are designed to be always on; should you need to be unreachable you just turn on airplane mode which will disable all wireless/cellular communications but you'll still get the notifications.

这篇关于关闭设备时过期的本地通知将丢失的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆