-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
I can't see background notification data #1550
Comments
Hi @yusufsancakk
|
I send a notification through my server and it contains data. so far it's not about your library. If it's been 1 hour, I create a notification with your library in the background;
I get a notification, but when I click on the notification, I can't see the data. Trying to capture actions like this in ComponentDitMount on App.js page: `async componentDidMount(){
If the application is open; If the application is closed; |
hi @yusufsancakk
|
how can i solve this? When I send a data in the notification and start the application, how do I show that data? |
If you need to forward data in the localNotification, you can use: PushNotification.localNotification({ smallIcon: 'ic_noti_icon', title: remoteMessage.data.title, message: "Haberin detayını okumak için dokunun", data: remoteMessage.data }); |
I check the incoming data and send it, but I cannot receive the data. I tried invokeApp. Only the token getToken is working. I can't get actions and data |
Did you put the |
.configure() in componentDidMount () |
Don't do that, put it outside of ANY component |
Yeah! When I wrote other than App.js, I was able to see the data when the background notification came. But I want to capture the data when I click. Not when the notification arrives |
You need to use |
Yes. I get such an error when I use it
|
Sorry, on this library it's |
so there is no solution for android? |
I ran the popInitialNotification function for android but i see 'null' in log |
There is probably an activity that intercept the notification, look in issues, this case has been already reported and solved. |
@yusufsancakk can you try hitting the below API from the postman with the required headers & body. Just wanted to check if you are passing the payload correctly for Android. To see how the custom data is nested for different app states like foreground/killed you can refer the below post FCM API HEADERS BODY |
@Dallas62 I couldn't find the solved issue. Can you send the link? and it doesn't even work on the first line in a new project |
Check this one: |
Solved the problem and to explain;
|
@yusufsancakk thanks for the suggested solution. Can you advice regarding |
@yusufsancakk you saved my day!! I was looking for this solution for a couple of days! |
@marudy Yes. I created the SplashScreen.java file. You can do this by reading this article: https://medium.com/@appstud/add-a-splash-screen-to-a-react-native-app-810492e773f9 |
Hello,
I initiate a manual notification in the background with a request from the server. I can see the data when I receive the notification when the application is open, but when the application is closed, there is no data when I click on the notification
I did it by double checking the settings again. the notification receive is OK, but I cannot get the data.
what i want: whenI click on the notification, the application should open and open a page according to the data. (not if there is data or not, according to the user id. There is always data in it)
The text was updated successfully, but these errors were encountered: