Skip to content

Latest commit

 

History

History
52 lines (33 loc) · 1.04 KB

README.md

File metadata and controls

52 lines (33 loc) · 1.04 KB

Cordova ROKO Mobi Plugin

Plugin allows to integrate with ROKO Mobi Portal

Prerequisites

  1. Install npm here - https://nodejs.org/en/ or run in console

    $ curl https://npmjs.org/install.sh | sh

  2. Install Cordova -

    $ npm install -g cordova

Using

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

More Info

For more information about ROKO Mobi integration the documentation