How can i create local Notification in worklight

橙三吉。 提交于 2019-11-28 12:38:26

问题


I'm creating an app using Worklight. I need to show a Notification at specific time like an alarm clock. It'd work when offline so i cannot use Push Notification.

I need Notification like image below. Thanks.


回答1:


iOS's Local Notifications feature does not have built-in support in Worklight.

One way to add Local Notifications support is by extending your application using a Cordova plug-in, which will allow you to run Native code.
This means that you will natively implement it by following Apple's APIs: to schedule the notification in the app and to then receive a notification locally via the OS, that will in turn allow you to open the app and execute an optional callback, etc...

You could either write a custom Cordova plug-in of your own,
Or find existing plug-ins on the web.

  • When adding an existing Cordova plug-in to Worklight (depending on your version of Worklight and version of Cordova), the instructions to do so are a bit different at this time.

  • This video demonstrates one instance of how to do add an existing Cordova plug-in: Integrating Cordova plugins into Worklight applications



来源:https://stackoverflow.com/questions/24028994/how-can-i-create-local-notification-in-worklight

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!