Skip to content

mrameezraja/cordova-plugin-motion-activity

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cordova-plugin-motion-activity

A Cordova plugin that detects and watch motion API.

Installation

  
    cordova plugin add https://github.com/mrameezraja/cordova-plugin-motion-activity
  

Methods

  • cordova.plugins.motionActivity.requestUpdates
  • cordova.plugins.motionActivity.stop

cordova.plugins.motionActivity.requestUpdates


  window.cordova.plugins.motionActivity.requestUpdates(function success(readings) {
    console.log(JSON.stringify(readings));
    // sample output
    // { 'confidence': 2, 'unknown'; 0, 'stationary': 1, 'walking': 0, 'running': 0, 'cycling': 0, 'automotive': 0 }
  }, function(error){
    console.log(error);
  })

cordova.plugins.motionActivity.stop


  window.cordova.plugins.motionActivity.stop(function success() {
    console.log('motion detection stopped');
  }, function(error){
    console.log(error);
  })

Supported Platforms

  • IOS
  • Android (In Progress)

About

A Cordova plugin that detects and watch device motion API.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published