expo-notifications data app closed empty after eject
See original GitHub issueSummary
SDK Version: 41 Platforms ios/android Package “expo-notifications”: “~0.11.6”,
Hi,
Just ejected using SDK 41 and noticed that the startup push notification data params in App.tsx props is empty.
(when you receive a push notificaiton when app i closed and you have sent params).
props.exp.notification.data
Does the prop name change after eject? Expo cli eject bug?
Managed or bare workflow? If you have ios/
or android/
directories in your project, the answer is bare!
bare
What platform(s) does this occur on?
Android, iOS
SDK Version (managed workflow only)
41
Environment
Expo CLI 4.3.4 environment info: System: OS: Windows 10 10.0.18363 Binaries: Node: 14.16.1 - C:\Program Files\nodejs\node.EXE Yarn: 1.21.1 - C:\Program Files (x86)\Yarn\bin\yarn.CMD npm: 6.14.8 - C:\Program Files\nodejs\npm.CMD IDEs: Android Studio: Version 4.0.0.0 AI-193.6911.18.40.6626763 npmPackages: expo: ^41.0.0 => 41.0.1 react: 16.13.1 => 16.13.1 react-dom: 16.13.1 => 16.13.1 react-native: ~0.63.4 => 0.63.2 react-native-web: ~0.13.12 => 0.13.18 Expo Workflow: bare
Reproducible demo or steps to reproduce from a blank project
type AppProps = {
exp?: {
notification?: {
data?: PushNotificationData
}
}
}
export default function App({ exp }: AppProps) {
return <AppLoading />
}
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (3 by maintainers)
Top GitHub Comments
Yes, and you should upgrade to the most recent version of
expo-notifications
since there have been many fixes addressing getting the notification data when the app was killedAhh interesting great thanks!
I’m currently using only addNotificationResponseReceivedListener for the response event… Should I replace addNotificationResponseReceivedListener with useLastNotificationResponse? I would like a response in foreground, background and killed, (all states).
Thanks again