How can i create local Notification in worklight

2019-01-29 11:10发布

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.

Notification

1条回答
Emotional °昔
2楼-- · 2019-01-29 11:51

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

查看更多
登录 后发表回答