Git Product home page Git Product logo

compass-react-native's Introduction

Compass React Native ๐Ÿงญ

A simple compass app built with react-native solely for learning purposes. Expo version can be found here. This project is overall an example for anyone trying to work with sensors/magnetometer in react native.

Description

A very simple demonstration of how to use the device's built in Magnetometer sensor to identify the direction and calculate the degree of angle. This app makes use of the below packages -

Run the App

  • Clone or download the repository.
  • cd into directory.
  • Run npm install
  • Copy your debug.keystore from Android Studio to project /android/app
  • Connect your device in USB debugging mode or use an Android emulator.
  • Then run react-native run-android.

To-do

  • Build and test the app on iOS devices. The /ios directory does not contain any dependencies or config. (Yet to own a Mac ๐Ÿ’ป).

Screenshots

Info

Share the project and spare a ๐ŸŸŠ if helped.

compass-react-native's People

Contributors

dependabot[bot] avatar rahulhaque avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

compass-react-native's Issues

Works Amazing for iOS, but seeing issue in Android when tilting Up & Down

I was trying to use CompassReactNative in my RN app.

On iOS, it works beautifully. As I turn side to side, the values aren't Rubberbanding like I see with ReactNativeSensorFusion on Android (I couldn't get its compass to work sensibly with iOS). And if I tilt the iOS device up and down, the compass reading only moves a little, as I expect.
iosCompassC

However, if I tilt the Android device up and down, the value flips if I tilt it past the horizon, as if I turned around ~180ยฐ

androidCompassC

Compass Doesn't Work - Possible Unhandled Promise Rejection

Your project is working fine but when I used the same code in a new code compass doesn't work. It gives this warning "Possible Unhandled Promise Rejection(id: 0): TypeError: undefined is not a constructor (evaluating 'new _reactNativeSensors.Mangetometer({ updateInterval: 100})')"

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.