wizpanda / cordova-plugin-mobile-data

This plugin set / gets the Mobile data state.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cordova-Mobile-Data

This plugin set / gets the Mobile data state.

This Plugin Requires https://github.com/Whebcraft/System_api.git

Installation

cordova plugin add https://github.com/Whebcraft/Cordova-Mobile-Data.git

Enable:

cordova.plugins.MobileData.enable(function(data) {
  data.enabled === true    // enabled
}, function(error) {
  // Error
});

Disable:

cordova.plugins.MobileData.disable(function(data) {
  data.enabled === false    // disabled
}, function(error) {
  // Error
});

Toggle:

cordova.plugins.MobileData.toggle(function(data) {
  console.log(data.enabled);
}, function(error) {
  // Error
});

Check:

cordova.plugins.MobileData.check(function() {
  console.log(data.enabled);
}, function(error) {
  // Error
});

About

This plugin set / gets the Mobile data state.


Languages

Language:Java 86.9%Language:JavaScript 13.1%