-
Notifications
You must be signed in to change notification settings - Fork 793
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
Add the FLAG_ACTIVITY_NEW_TASK flag. #317
Conversation
This is caused by an error on Android 9: 'Error: Calling startActivity() from outside of an Activity context requires the FLAG_ACTIVITY_NEW_TASK flag. Is this really what you want?'
It would be nice to have this one merged. Thank you! |
I need to fork this repo just for that reason but probably rather than enforce it for everyone it should be pass as a parameter instead? |
+1 please someone merge this PR, it works! |
FWIW this has been working in production for us for quite some time. |
Any chance someone merges this ? (and all the other 39 PRs) or give permissions to other people so they can do the merges. |
I solved this issue with a workaround. "postinstall": "exec sed -i '' '122i\\\nintent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);' node_modules/rn-fetch-blob/android/src/main/java/com/RNFetchBlob/RNFetchBlob.java" I used this PR to make changes. I hope it helps you. |
Thanks @AdeilsonSuperlogica it solved my issue! |
Solved for me @AdeilsonSuperlogica |
So basically this needs to be added to line 122-123 of file android/src/main/java/com/RNFetchBlob/RNFetchBlob.java
if above step is not working to do the below step:
|
Just in case, you guys can also install the package directly from this branch.
Thanks, @wakeless! |
@Traviskn do you think this PR will get merged anytime soon? Ive come across this issue when trying to open a PDF on Android using |
#317 (comment) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this going in or not?
Thank you for all the testing confirmation that this PR fixes the described issue, apologies for the delayed review |
as already asked by @bova80 there are many who do not want or be able to update react-native to version 0.60 or higher... so is it possible to update to have a merge to solve this problem also in version 0.10.15? |
Is this fix available in 0.10.15 ? Because i'm still facing it |
+1, still facing this issue in 0.10.15 |
mark Add the FLAG_ACTIVITY_NEW_TASK flag. |
This is caused by an error on Android 9: 'Error: Calling startActivity() from outside of an Activity context requires the FLAG_ACTIVITY_NEW_TASK flag. Is this really what you want?'