react-native-fit-kit
TypeScript icon, indicating that this package has built-in type declarations

0.3.3 • Public • Published

react-native-fit-kit

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

android Available
android Coming soon
---------

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

Package Sidebar

Install

npm i react-native-fit-kit

Weekly Downloads

1

Version

0.3.3

License

MIT

Unpacked Size

313 kB

Total Files

109

Last publish

Collaborators

  • alecass