Use magnetometer

#1

Hi,
Is there a way to use the magnetometer without detaching the app as the accelerometer or gyroscope ?
I would like to use https://github.com/kprimice/react-native-sensor-manager but apparently, something blocks.
Thank you !

#2

hello! the native api for this is not currently exposed. you can’t use that library with the expo client because it has native dependencies. see the differences between react-native and expo here: https://stackoverflow.com/a/39170715/659988

i made a feature request for magnetometer here: https://expo.canny.io/feature-requests/p/expose-magnetometer-sensor

2 Likes