Open vishaljadav24 opened 6 years ago
are you sure you are using the right server key? You shouldn't get the same fcm token for different app, even reinstalling the app will generate a different token
Yes. I am sure for server key.
Server key is different by project but Fcm token is same. can you verify it? your 2 apps have different app id right?
Yes @evollu , I verify it and app id also different. I searched a lot for this issue. But nothing found which solved my issue. So please help me.
try delete and reinstall both apps and see if you get the same fcm token. They should be different
I got different Fcm tokens after uninstall app but issue not solve.
We made some changes in code as per below and it worked! For Title and Text send those data under notification
Key.
{
"to": "fcmToken",
"priority": "high",
"data": {
"type": "BOOK",
"delivery_id": 71,
"start_time": 1510817811,
"end_time": 1510817840,
"sound": "default",
"title": "New Delivery Booked!",
"text": "New delivery is booked accept before its too late!"
}
}
changable code
{
"to": "fcmToken",
"priority": "high",
"data": {
"type": "BOOK",
"delivery_id": 71,
"start_time": 1510817811,
"end_time": 1510817840,
"sound": "default"
},
"notification": {
"title": "New Delivery Booked!",
"text": "New delivery is booked accept before its too late!"
}
}
cool... I don't know the real cause though...perhaps some issue with firebase
I face this issue again. The issue comes when one app is running in background and second app is in the foreground. For both the app push is coming. Attaching the screenshot for better understanding.
If I kill the second app and only one app is in active state then issue is not coming.
ok. I might know what is going on now. Broadcast event seems to be sent to all applications so
@vishaljadav24 try master branch. it should be fixed now
hi, I am also working on two apps. In my case I receive notification for one app at a time on same device if App A is installed first and B is installed after that so I will receive notification for App A. If App B is installed first then I will receive notification for App B not for A in same device. I am unable to identify the problem please help my OS version is latest one Oreo
# Step to produce issue: