-1

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

Squall Leonhart
  • 439
  • 4
  • 17

1 Answers1

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

Idan Adar
  • 44,156
  • 13
  • 50
  • 89
  • I tried using this plugin https://github.com/katzer/cordova-plugin-local-notifications it show local notification but all event won't fired. in javascript it show "require is not defined" and "module is not defined" – Squall Leonhart Jun 05 '14 at 10:15
  • You'll need to better explain what you've done... If you want, provide the worklight project. – Idan Adar Jun 05 '14 at 10:50
  • 1
    @SquallLeonhart, see my implementation here: http://stackoverflow.com/questions/24077230/using-katzer-local-notification-in-ibm-worklight – Idan Adar Jun 06 '14 at 13:41