react-native-oui-pedometer

1.3.7 • Public • Published

react-native-oui-pedometer

Getting started

$ npm install react-native-oui-pedometer --save

$ react-native link react-native-oui-pedometer

Usage

import Pedometer from 'react-native-oui-pedometer'
 
Pedometer.isAvailable().then(isAvailable => {
  // Whether the device has step counting capabilities.
})
 
Pedometer.authorizationStatus().then(authorizationStatus => {
  // iOS only
  //
  // The authorization status as a string:
  //   - "not_determined"
  //   - "denied"
  //   - "authorized"
  // 
  // Always "authorized" for Android.
})
 
Pedometer.requestAuthorization().then(() => {
  // iOS only
  //
  // Request the user authorization to read the number of steps from Health Kit.
  //
  // Return directly on Android.
})
 
Pedometer.getNumberOfSteps().then(numberOfSteps => {
  // Get the number of steps since a fixed moment in time.
})

Readme

Keywords

Package Sidebar

Install

npm i react-native-oui-pedometer

Weekly Downloads

1

Version

1.3.7

License

ISC

Unpacked Size

24.6 kB

Total Files

15

Last publish

Collaborators

  • jordanbonnet