Keep notification on lock screen

2019-02-28 01:10发布

How can I keep the notifications from my app on the lockscreen, until the user has interacted with it?

What I mean is, even if the user unlocks the phone and than locks it again, I would like to have the notification show up again and again on their lockscreen until they finally taken an action with it.

The iOS Reminders app is a great example.

Thanks!

2条回答
不美不萌又怎样
2楼-- · 2019-02-28 01:21

Apple's applications can do this because they are using private APIs.

You cannot force a notification to show up on the screen, specially after a user has unlocked their device.

Yes you could do local notifications that force it to show up again, but Apple is probably not going to be too happy with this setup.

查看更多
老娘就宠你
3楼-- · 2019-02-28 01:32

until they finally taken an action with it

this would be annoying to the user to say the least. First you need a way to know if the user has interacted with your notification or not. See here How to Implement iOS8 Interactive Notification

Once you have implemented code above then since you want the reminder to keep poping-up over and over again, I would suggest create like 10 local notifications 5 minutes apart for each reminder. Once the user interact with any one of them then cancel all reminders.

Does it makes sense?

查看更多
登录 后发表回答