Closed kperreau closed 3 years ago
+1 i got the same error. Is getCurrentActivity() return null? If it does, weird. Anyway there should be a null check or try/catch to avoid crashing here a reference: https://github.com/lucasferreira/react-native-android-permissions/issues/3#issuecomment-223712114
Edit i opened a PR for null check. I used react native's offical example from here: https://reactnative.dev/docs/native-modules-android#getting-activity-result-from-startactivityforresult they made a if check for getCurrentActivity, too.
+1 i got the same error. Is getCurrentActivity() return null? If it does, weird. Anyway there should be a null check or try/catch to avoid crashing here a reference: lucasferreira/react-native-android-permissions#3 (comment)
Edit i opened a PR for null check. I used react native's offical example from here: https://reactnative.dev/docs/native-modules-android#getting-activity-result-from-startactivityforresult they made a if check for getCurrentActivity, too.
+1
May issue has been resolved in PR #36 and in version 3.1.1
@kperreau @ogzhnsbs Please Update package to version 3.1.1.
@MetinArslanturk Thanks for you effort.
Hello, new one on Android devices.
Android Version:
8, 9, 10
Devices:
P20 lite
,Galaxy S10e
,Galaxy S8
,Galaxy A51
,Redmi Note 7
Error:
Fatal Exception: java.lang.NullPointerException
Stack trace:
Thanks.