dorukeker / gyronorm.js

JavaScript project for accessing and normalizing the accelerometer and gyroscope data on mobile devices
MIT License
641 stars 65 forks source link

DeviceOrientation && DeviceMotion is not supported (React Native) #36

Closed stephanedemotte closed 6 years ago

stephanedemotte commented 7 years ago

Hi !

Thanks for this useful library.

I try to use it in a WebView in React Native.

In IOS gyronorm return DeviceOrientation is not supported In Android DeviceMotion is not supported

But DeviceMotionEvent and DeviceOrientationEvent exist on both.

Any idea ?

Thank you !

dorukeker commented 7 years ago

Hi there, Gyronorm is using the JS API from the browser; and it is meant to be used with in the web browser; not native apps.

I don't have much experience with React. But since you are packing to make native apps; I assume there are better (more accurate) ways to access devicemotion and deviceorientation data?

A quick Google search give me this: https://github.com/paramaggarwal/react-native-device-motion

Let me know if this was helpful. Cheers, Doruk

dorukeker commented 6 years ago

Hello @stephanedemotte I am going to close this issue, assuming you have found another way via React native. Please feel free to reopen it if you have more questions about Gyronorm

stephanedemotte commented 6 years ago

yes thanks for the support !