0.1.0 • Published 3 years ago

cordova-plugin-motrixi v0.1.0

Weekly downloads
1
License
LGPL
Repository
-
Last release
3 years ago

Installation

cordova plugin add cordova-plugin-motrixi

Supported Platforms

  • Android

Usage

document.addEventListener('deviceready', () => {
  if (window.motrixi) {
  // add collect data event listener
  window.motrixi.on(
    'getInformation',
    info => {
    console.log('Log: motrixi.uploadInfo -> info', info)
    },
    error => {
      console.log('Log: motrixi.uploadInfo -> error', error)
    }
  )
}
 // init sdk with app key
  window.motrixi.init(APP_KEY)
}, false)

Api

  • init:
 window.motrixi.init(APP_KEY)
  • receive data from native SDK:
 window.motrixi.on(
    'getInformation',
    info => {
    console.log('Log: motrixi.uploadInfo -> info', info)
    },
    error => {
      console.log('Log: motrixi.uploadInfo -> error', error)
    }
  • reset consent form:
window.motrixi.reset()
  • upload data:
window.motrixi.upload()