0.3.3 • Published 5 years ago

react-native-fit-kit v0.3.3

Weekly downloads
15
License
MIT
Repository
gitlab
Last release
5 years ago

react-native-fit-kit

A react native package that allows you to connect google fit and apple health kit

Installation

npm install react-native-fit-kit

yarn add react-native-fit-kit

Usage

import FitKit from "react-native-fit-kit";

  //ask for permissions 
  async function connectGoogleFit() {

    try {

      const hasPermissions = await FitKit.isGoogleFitPermissionGranted();

      if (hasPermissions === false) {

        const response = await FitKit.requestGoogleFitPermission();

        console.log(response);

      } else {
        console.log('already logged in');
      }

    } catch (e) {
      console.error(e);
    }

    //inserting new workout sessions
    const results = await FitKit.insertSession('SessionName', 'identifier', FitKit.BOXING, workoutStartTimeInMs, workoutEndTimeInMs);

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT

0.3.2

5 years ago

0.3.3

5 years ago

0.3.0

5 years ago

0.0.3

5 years ago

0.2.0

5 years ago

0.0.2

5 years ago

0.1.0

5 years ago