-
Notifications
You must be signed in to change notification settings - Fork 62
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
Expo SDK 50 - Foreground notifications cause app to reload #550
Comments
What OS are you testing on? |
Oh, sorry. That is replicated on Android 14. I have not tested on iOS |
This could be old Android knowledge that I need to forget, but I remember a similar issue when launching a notification if the app was started through AS/adb. If you start the app that way, kill it, then launch it normally it would have the proper restore launch intent behavior. Could you double check that? If its still happening I will need the manifest to see if I can make sense of whats going on |
That could be it. |
I've tested again and found the following: When using the expo-dev-client and building and running the development app, the app reloads each time I tap on a notification in the foreground. If I build and sign the app, then tapping a foreground notification does not cause the app to reload. There are some changes between Expo 49 and Expo 50 regarding how the app is launched, summarised in the change log - https://expo.dev/changelog/2024/01-18-sdk-50#other-highlights (See the 4th point regarding I have also been able to restore the original behaviour by setting the module.exports = {
expo: {
...,
plugins: [
...,
[
'expo-dev-client',
{
ios: {
launchModeExperimental: 'launcher',
},
android: {
launchModeExperimental: 'launcher',
},
},
]
]
}
} With this change, the original launcher behaviour is used - Opening the app from a push notification requires selecting the bundler to use from the expo dev client menu, but tapping a notification from the foreground is handled in the foreground 🎉 I can consider my problem fixed now, but it would be great if there is a way to resolve this issue without having to specify the |
@robwalkerco thank you so much man |
You're welcome @MaxInMoon. For anyone running into this issue, the config property was renamed in the latest Expo SDK to |
❗For how-to inquiries involving Airship functionality or use cases, please
contact (support)[https://support.airship.com/].
Preliminary Info
What Airship dependencies are you using?
"@ua/react-native-airship": "^17.1.1",
"airship-expo-plugin": "^1.1.0",
What are the versions of any relevant development tools you are using?
"expo": "^50.0.2",
Report
What unexpected behaviour are you seeing?
When I receive a notification and the app is active and in the foreground, then tapping the app is causing the app to be reloaded.
I suspect this is because of something working differently either in React Native 0.73 or in Expo SDK 50
What is the expected behaviour?
When I receive a notification and the app is active and in the foreground, then I expect that tapping the notification allows the app to handle the notification in the foreground.
What are the steps to reproduce the unexpected behaviour?
I'm replicating this by upgrading from a Expo SDK 49 to Expo SDK 50 project
Do you have logging for the issue?
No
The text was updated successfully, but these errors were encountered: