-
Notifications
You must be signed in to change notification settings - Fork 5.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[sensors][android] Fix crash when using DeviceMotion
module
#28839
Conversation
The Pull Request introduced fingerprint changes against the base commit: abf6b83 Fingerprint diff[
{
"type": "dir",
"filePath": "../../packages/expo-sensors/android",
"reasons": [
"expoAutolinkingAndroid"
],
"hash": "0f86ac256489e345fffd780ea1f873e4db8c17ca"
}
] Generated by PR labeler 🤖 |
868a643
to
7e51859
Compare
this seems to only happen on emulator expo go, while physical device expo go/build is working with no error. expo-sensors version is 13.0.9 too |
gani2009 Not really. Expo app throws error in physical device too. |
@gani2009 @cjoshmarshall Are you both using expo-go? Updating the package version in |
@behenate Yup, using expo-go. |
@cjoshmarshall Hm, in that case I'd recommend creating a development build. The quickest way is probably just running For local builds you will need Android Studio and/or Xcode depending on what platform you want to develop for |
@behenate Apparently it seems like it does work in local builds. But still dont quite understand the reason why it wont work in expo-go. |
@cjoshmarshall The fix for the issue is in the native code of the package, but the native code for some selected, most popular packages is shipped with Expo Go and it's "frozen" at a specific version, because it's impossible to update it after compiling Expo Go. It's a little outdated, because we don't update Expo Go that often. Expo Go doesn't actually use the native code from the The current version of Expo Go doesn't contain this fix, so it still crashes. For local builds you are compiling the code from |
Why
Currently
DeviceMotion
module crashes withFixes #28820
How
The orientation is now obtained from the current activity instead of
reactContext.applicationContext
Test Plan
Tested in BareExpo