Giter VIP home page Giter VIP logo

react-native-simple-compass's People

Contributors

kevinejohn avatar vnil 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

Watchers

 avatar  avatar

react-native-simple-compass's Issues

Get accuracy of compass

In order to check whether the user needs to recalibrate the compass or not, it would be nice to get some information about the accuracy of the measurements.

It seems likenewHeading.headingAccuracy on iOS and public void onAccuracyChanged(Sensor sensor, int accuracy) on Android are the ways to get the accuracy. This could for instance be sent as a second parameter in the event handler callback: RNSimpleCompass.start(degree_update_rate, (degree, accuracy) => { ...

A problem is that "accuracy" is not the same thing on iOS and Android... Android uses four integer values, while on iOS uses floating point values that might be negative.

An alternative to getting the accuracy value is to dispatch an event when the compass is giving an invalid value, and will probably need calibration. This is when the accuracy is negative on iOS or 0 on Android.

What do you think?

Not working in React Native 0.49.3

Working on a side project with react native that uses this project. I'm new to working with RN so apologies if the answer is obvious.

After following the setup instructions (running react-native-simple-compass --save and react-native link) I encounter the following error when importing RNSimpleCompass:

undefined is not an object (evaluating 'RNSimpleCompass.start')

I'm using React Native 0.49.3 with ViroReact. Has anyone else encountered this issue?

Module RNSimpleCompass requires main queue setup

Module RNSimpleCompass requires main queue setup since it overrides init but doesn't implement requiresMainQueueSetup. In a future release React Native will default to initializing all native modules on a background thread unless explicitly opted-out of.

Capture d'écran 2019-09-13 16 59 13

No podspec found

No podspec found for react-native-simple-compass in ../node_modules/react-native-simple-compass

Just doesn't work

The example code under the Usage section simply doesn't log to the console

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.