Skip to content

πŸŒŠβ›΅πŸŒŠ Cordova plugin for determining activity based on device motion.

License

Notifications You must be signed in to change notification settings

EvanWieland/cordova-plugin-wayfarer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

7b9841c Β· Jan 10, 2020

History

49 Commits
Sep 20, 2019
May 21, 2018
May 2, 2018
Apr 27, 2018
May 15, 2018
May 22, 2018
Jan 10, 2020

Repository files navigation

πŸŒŠβ›΅πŸŒŠ Cordova Wayfarer Plugin

Cordova plugin for determining activity based on device motion.

Purpose

Wayfarer predicts the current activity a user is engaged in by analayzing the device's motion and geolocation.

Installation

cordova plugin add cordova-plugin-wayfarer

Supported Platforms

  • Android
  • iOS

Methods

  • Wayfarer.subscribe
  • Wayfarer.unsubscribe [not complete]

Example

Wayfarer.subscribe(
    function(activityData){
        // activityData returns: 
        // {
        // activity: 'AUTOMOTIVE', 
        // confidence: '39'
        // }
    },
    function(error){
        console.error(error); // Returns error
    }
);

Wayfarer.unsubscribe(
    function(){},
    function(error){
        console.error(error); // Returns error
    }
);

Credits

Disclaimer

The Cordova Wayfarer Plugin is in its infant stages. The subscribe method is production ready, but there isn't even a way to unsubscribe from events yet. Also, I am not fluent in Objective-C or Java, so you will see some ugly code. If you would like, give me a hand and help clean it up!

About

πŸŒŠβ›΅πŸŒŠ Cordova plugin for determining activity based on device motion.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published