Skip to content

UmarbekSaidov/react-native-compass-heading

 
 

Repository files navigation

react-native-compass-heading

React Native module for iOS & Android to receive compass heading

Installation

$ yarn add react-native-compass-heading
$ npx pod-install

Usage

import CompassHeading from 'react-native-compass-heading';

  React.useEffect(() => {
    const degree_update_rate = 3;

    CompassHeading.start(degree_update_rate, ({heading, accuracy}) => {
      console.log('CompassHeading: ', heading, accuracy);
    });

    return () => {
      CompassHeading.stop();
    };
  }, []);

Acknowledgements

Thanks to the authors of react-native-simple-compass for inspiration

About

React Native module for iOS & Android to receive compass heading

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 57.0%
  • Objective-C 29.5%
  • Ruby 7.7%
  • JavaScript 5.8%