Plugin allows to integrate with ROKO Mobi Portal
-
Install npm here - https://nodejs.org/en/ or run in console
$ curl https://npmjs.org/install.sh | sh
-
Install Cordova -
$ npm install -g cordova
Create a new Cordova Project
$ cordova create hello com.example.helloapp Hello
Install the plugin
$ cd hello
$ cordova plugin add cordova-plugin-rokomobi
Edit www/js/index.js
and add the following code inside onDeviceReady
var success = function(message) {
alert("Success")
}
var failure = function(error) {
alert("Error calling ROKO Mobi Plugin" + error);
}
var dictionary = {userName: "username"}
rokomobi.setUser(dictionary, success, failure);
Install iOS or Android platform
cordova platform add ios
cordova platform add android
Run the code cordova prepare cordova run
For more information about ROKO Mobi integration the documentation