iadbox Cordova Plugin
Add support for iadbox to your Cordova and Phonegap based mobile apps.
We currently support Android and iOS platforms.
How do I install it?
If you're like me and using CLI:
cordova plugin add iadbox-cordova-plugin
or
cordova plugin add https://github.com/iadbox/iadbox-cordova-plugin.git
or
phonegap local plugin add https://github.com/iadbox/iadbox-cordova-plugin.git
If you want to see a full example of a simple app using this plugin you can check: iadbox-cordova-app.
How do I use it?
Here is a demonstration of the main functions.
document; // To open the inboxwindowpluginsiadbox; // To get the number of unread messageswindowpluginsiadbox;
How to integrate push notifications?
The easiest way to integrate our notifications feature is to use phonegap-plugin-push plugin. Follow its instructions to set it up.
Here you have an example on how to use it:
var pushId = "";var pushNotificationPlugin = PushNotification; pushNotificationPlugin; pushNotificationPlugin; pushNotificationPlugin;
Our notification payload has the following format:
The previous notification payload purpose is to open our Inbox, you should do something like:
pushNotificationPlugin;
How to show unread messages in your App's badge?
Here you have an example using cordova-plugin-badge:
windowpluginsiadbox;