Closed mitulbhalia closed 7 years ago
Please do not open new issues for the same problem. There are already three other opened issues that describe this problem
but my issue is little bit different. Callback is not called even the app is running in background.
How did you set up the module? Do you call the registerforpushnotifications
on every app launch?
Yes and even app is not crashed when notification is clicked.
Do you know what should be the issue then? Also app is hanged when push is received in foreground mode and push is not received when app is fully closed, not running in the background.
Check your payload, there's definitely something wrong there
From php side?
yeah
Ok, thanks
Here is my payload $msg = array ( "alert" => $_POST['limitedtextarea'] . time(), "title" => 'Notification', 'sound' => 'default', "vibrate" => [100,50,50,50,100], "badge" => 1, "tag" => "Test" );
It seems correct actually. I'll look into it as soon as I have some time
Thanks, did you have any chance yet?
Should i need to follow this link? https://github.com/caffeinalab/ti.goosh/blob/master/test-fcm
Yeah it's helpful if you can try with that example. You just need to update your google API key and device token.
Its working...Thank you for your help.
Now the problem is i got below error first time when i clicked notification and thats why callback is not called but when i killed the app from background and run it again then it calls callback. What should be the issue then?
No valid root or current activity found for application instance
No Worries.... I sorted out :)
@mitulbhalia what is your solution for the error you mentioned: "No valid root or current activity found for application instance"? And did this error occur when app was closed or just in background? thnx in advance
@Lenndev I just followed the above link for back end side and it started to call callback function when app is in background but it still does not call callback when app is closed.
I am getting notification correctly but the callback method of module is not calling when notification is clicked.
Tested with module version 2.0.6, 2.0.7 and ti sdk 6.0.0.GA, 6.0.2.GA, 6.0.4.GA