cordova-plugin-pedometer-test
Version:
Cordova / PhoneGap Plugin for the Core Motion Pedometer to fetch pedestrian-related data, such as step counts and other information about the distance travelled
79 lines (77 loc) • 4.55 kB
text/xml
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0" id="cordova-plugin-pedometer" version="0.4.2">
<name>Core Motion Pedometer</name>
<author>Lee Crossley (http://ilee.co.uk/)</author>
<description>Cordova / PhoneGap Plugin for the Core Motion Pedometer to fetch pedestrian-related data,
such as step counts and other information about the distance travelled.</description>
<keywords>cordova, core motion, pedometer, steps, distance, pedestrian</keywords>
<license>MIT</license>
<engines>
<engine name="cordova" version=">=3.4.0" />
</engines>
<js-module src="www/pedometer.js" name="Pedometer">
<clobbers target="pedometer" />
</js-module>
<platform name="ios">
<config-file target="config.xml" parent="/*">
<feature name="Pedometer">
<param name="ios-package" value="Pedometer" />
<param name="onload" value="true" />
</feature>
</config-file>
<header-file src="src/ios/Pedometer.h" />
<source-file src="src/ios/Pedometer.m" />
<framework src="CoreMotion.framework" />
<!-- Usage description of Motion, mandatory since iOS 10 -->
<config-file target="*-Info.plist" parent="NSMotionUsageDescription">
<string/>
</config-file>
</platform>
<platform name="android">
<config-file target="AndroidManifest.xml" parent="/manifest">
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-feature android:name="android.hardware.sensor.stepcounter" />
<!--
<uses-feature android:name="android.hardware.sensor.stepcounter" android:required="true"/>
<uses-feature android:name="android.hardware.sensor.stepdetector" />
-->
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
</config-file>
<config-file target="res/xml/config.xml" parent="/*">
<feature name="Pedometer">
<param name="android-package" value="org.apache.cordova.pedometer.PedoListener" />
</feature>
</config-file>
<config-file target="AndroidManifest.xml" parent="/manifest/application">
<service android:name="org.apache.cordova.pedometer.StepsService" android:enabled="true" />
<!--
* This class is triggered upon reboot of the device. It needs to re-register
* the STEP_COUNTER with the StepsService
-->
<receiver android:name="org.apache.cordova.pedometer.BootReceiver">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
</intent-filter>
</receiver>
<receiver android:name="org.apache.cordova.pedometer.AppUpdatedReceiver">
<intent-filter>
<action android:name="android.intent.action.MY_PACKAGE_REPLACED"/>
</intent-filter>
</receiver>
</config-file>
<source-file src="src/android/PedoListener.java" target-dir="src/org/apache/cordova/pedometer" />
<source-file src="src/android/StepsService.java" target-dir="src/org/apache/cordova/pedometer" />
<source-file src="src/android/StepsUtil.java" target-dir="src/org/apache/cordova/pedometer" />
<source-file src="src/android/API23Wrapper.java" target-dir="src/org/apache/cordova/pedometer" />
<source-file src="src/android/API26Wrapper.java" target-dir="src/org/apache/cordova/pedometer" />
<source-file src="src/android/ShutdownReceiver.java" target-dir="src/org/apache/cordova/pedometer" />
<source-file src="src/android/BootReceiver.java" target-dir="src/org/apache/cordova/pedometer" />
<source-file src="src/android/AppUpdatedReceiver.java" target-dir="src/org/apache/cordova/pedometer" />
<source-file src="src/android/Logger.java" target-dir="src/org/apache/cordova/pedometer" />
<source-file src="src/android/Database.java" target-dir="src/org/apache/cordova/pedometer" />
<source-file src="src/android/BatteryOptimizationUtil.java" target-dir="src/org/apache/cordova/pedometer" />
</platform>
</plugin>