Skip to content

singhketan/cordova-plugin-motion-activity

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 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.startActivity
  • cordova.plugins.motionActivity.stopActivity

cordova.plugins.motionActivity.startActivity


  window.cordova.plugins.motionActivity.startActivity(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.stopActivity


  window.cordova.plugins.motionActivity.stopActivity(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

Languages

  • Objective-C 94.7%
  • JavaScript 5.3%