Titanium module for Notificare Mobile Marketing Platform. Before you start make sure you grab the DefaultTheme.bundle, Notificare.plist and NotificareTags.plist from https://github.com/Notificare/notificare-push-lib and place it in your app's assets folder. Notificare.plist is the configuration file where you should make changes to match your app's settings.
See sample app in example/app.js. For documentation please refer to: https://notificare.atlassian.net/wiki/display/notificare/Getting+started+with+Titanium
To access this module from JavaScript, you would do the following:
var Notificare = require("ti.notificare");
The Notificare variable is a reference to the Module object.
Notificare will be initialized at launch automatically. But before you can request any of the methods you must wait for the 'ready' event to be fired.
Events:
- ready (required) {String} Fired whenever the Notificare library is ready
- registration (required) {String} Fired in response to registerForNotifications or enableNotifications. Contains the device token, use it to register to Notificare
- registered (optional) {String} Fired when the device is registered with Notificare
- location (optional) {String} Fired when the device's location is updated
- notification (optional) {String} Fired when a notification is received
- range (optional) {String} Fired when beacons are in range. This only occurs in foreground
- errors (optional) {String} Fired whenever there's errors
Parameters:
- event (required) {String} A string representing the event to listen to
- callback {Function} A callback ({Object})
Registers the device with APNS. First time it will prompt the user with a permissions dialog.
Set this value to register the device with a userID. It should be set before calling Notificare.registerDevice().
Set this value to register the device with a userName. To use this, userID must be also set. It should be set before calling Notificare.registerDevice().
Registers the device with Notificare. It should be invoked after the 'ready' event.
Parameters:
- token (required) {String}
Start location services. This should only be called after the event 'registered' has been fired.
Adds one or more tags to the device. This should only be called after the event 'registered' has been fired.
Parameters:
- tags [{String}]
Removes a tag from the device. This should only be called after the event 'registered' has been fired.
Parameters:
- tag {String}
Starts a transaction with the App Store. This should only be called after the event 'store' has been fired.
Parameters:
- identifier {String} Use the product identifier to start a transaction
- Joel Oliveira joel@notifica.re
- Joris Verbogt joris@notifica.re
Copyright (c) 2015 Notificare B.V.
Simplified BSD