-
Notifications
You must be signed in to change notification settings - Fork 75
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
app closed - find which notification launched app - popInitialNotification equivalent #17
Comments
Yes, identifying which notification launched app isn't supported yet. protected void onCreate(Bundle savedInstanceState) {
getIntent(); // check if launch from notification, and send to JS
...
}
@Override
protected void onNewIntent(Intent intent) {
super.onNewIntent(intent);
// send intent to GcmAndroid module
} There are some works to do, I think I may not have time to do it this week. |
@oney i might have sorted it out - I would like to submit this as a pull request. can you give me details on how to do this. |
https://github.com/zo0r/react-native-push-notification/blob/b826276e291c0ab011eec80b210d39b63a1c2437/RNPushNotificationAndroid/src/main/java/com/dieam/reactnativepushnotification/modules/RNPushNotification.java#L50 |
I have done something similar. But also changed a few lines of your code, since with your code only one notification would show up if the app is not open. |
Can you share codes or create a PR? It will be very useful to me. |
pull request here. #19 |
I think this module is 90% complete functionality wise. its just an equivalent of popInitialNotification that seems to be missing.
What I have figured out is that we will need to probably put an extra to the intent in onCreateNotification function of GcmModule.java , and probably create a method to give the value of that.
The text was updated successfully, but these errors were encountered: