简体   繁体   English

在ios中创建无法由用户删除的通知

[英]creating notifications in ios that cannot be removed by user

I am using android phone in which i am using an app named "Smart App Protector". 我正在使用Android手机,我正在使用名为“Smart App Protector”的应用程序。 When i launch the application a notification comes as "Smart App Protector is running". 当我启动应用程序时,会出现“Smart App Protector正在运行”的通知。 Here i could not remove the notification manually by swiping right or left (i could remove other notifications regarding mails, tweets, etc.,). 在这里,我无法通过向右或向左滑动手动删除通知(我可以删除有关邮件,推文等的其他通知)。 I found that its designed in such a way that in order to remove the notification from my notification center i have to click the notification and launch the application and then disable the app so that notification gets removed (I guess that they have coded in a way that notification is removed by stopping the application). 我发现它的设计方式是,为了从我的通知中心删除通知,我必须单击通知并启动应用程序,然后禁用该应用程序,以便通知被删除(我猜他们已经编码了一种方式通过停止应用程序删除通知)。 Now i am seeking a way to implement this in my iphone application. 现在我正在寻找一种方法在我的iPhone应用程序中实现它。 Before that i want to know whether it is possible in ios or not. 在此之前,我想知道是否有可能在ios中。 Some freaks in ios out there, Please help me out. 在那里的一些怪物,请帮帮我。

You cannot do this on iOS. 你不能在iOS上这样做。 Notifications are there to alert the user to a small amount of information, not to force their behaviours. 通知用于警告用户少量信息,而不是强迫他们的行为。

Edit: You cannot do this on stock iOS, jailbroken iOS is another story. 编辑:你不能在iOS上做这个,越狱iOS是另一个故事。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM