-
Notifications
You must be signed in to change notification settings - Fork 217
add on new intent override plugin for expo android #579
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
base: master
Are you sure you want to change the base?
add on new intent override plugin for expo android #579
Conversation
2ada035
to
1a3ba77
Compare
why not merge?🚨🚨🚨🚨🚨🚨 |
Please merge this. |
Co-authored-by: Jesper Paardekooper <[email protected]>
|
||
if (!nextContent.includes(intentImportString)){ | ||
const packageString = `${packageName}\n` | ||
nextContent = nextContent.replace(packageString,`${packageString}\n${intentImportString}`) |
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.
Add a new line at the end of the import.
nextContent = nextContent.replace(packageString,`${packageString}\n${intentImportString}`) | |
nextContent = nextContent.replace(packageString,`${packageString}\n${intentImportString}\n`) |
I encountered the following error:
Fixed by updating the code to: import android.content.Intent
override fun onNewIntent(intent: Intent) {
super.onNewIntent(intent)
setIntent(intent)
}
|
We have also encountered the issue like @saseungmin, and the suggested fix solved this issue 👍 Running on Expo 52, react-native 0.76.9. Changed both appearances of This resolves the expo issue with Android not opening deeplinks when the app is in the background! |
In reaction to this issue #558 and this closed PR #559.
This adds the;
by default if
import android.content.intent
is not already inMainActivity
and ifoverride fun onNewIntent(intent: Intent?)
is not already implemented.This ultimately resolves issue with expo android not opening deeplinks when app is in background
cc: @iway1