-
Notifications
You must be signed in to change notification settings - Fork 112
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
Crash app when build real device in Android #110
Comments
Look at file ReceiveSharingIntentModule.java
this cause Xcpt in RN Linking.getInitialURL here
|
This also cause problems in another modules (for example, exception in RNPushNotifications...) In my case, solution in file ReceiveSharingIntentModule.java was:
...
|
Thanks you two. Those changes fixed the issue for me. |
@vlesu Shall we also modify clearFileNames() based on the change ? Hope to hear your expertise. --Luke |
Unfortunately, I'm just an enthusiast, not an expert. I did not modify a code in clearFileNames:
But I had troubles with imcoming files appears TWICE when I switch to another app and switch back. To resolve this, I have added into ReceiveSharingIntent.ts
And use this in my code like this:
|
Rather than setting module-level `isClear` boolean, which would only allow the app to receive & respond to one share. This change prevents the issue on Android of the app 1) receives a share intent, 2) user then opens photo picker, causing app to go to bg and back to fg, 3) triggers share sheet to reopen, because original share intent info has not been properly cleared ajith-ab/react-native-receive-sharing-intent#110 (comment)
I still have this problem with both emulated and real device environments Edit: Just noticed that it's because the fix hasn't been released yet. When are you planning on releasing it? |
Rather than setting module-level `isClear` boolean, which would only allow the app to receive & respond to one share. This change prevents the issue on Android of the app 1) receives a share intent, 2) user then opens photo picker, causing app to go to bg and back to fg, 3) triggers share sheet to reopen, because original share intent info has not been properly cleared ajith-ab#110 (comment)
Until this merges. You can use the snippet below. Put this in
|
I run into emulator, then even though it throws the error
Attempt to invoke virtual method 'java.lang.String android.content.Intent.getAction()' on a null object reference.
but sharing is still working. However when building a real device, after pressing share it will redirect to the host app but it maybe crash(restart app).The text was updated successfully, but these errors were encountered: