I have a problem with IOS push notification. I am using php(Zend) as a provider. I have tested the notification in below scenarios:
1) Installed app in my iPhone and sends the device token to server and it is successfully stored in database. Then i have fired a notification, and i have received notification.
2) Then i have uninstalled the app from device and fired a notification. In this scenario APNS doesn't returned any error message. Feedback service also not gave any invalid tokens (Device has other apps which has push notification enabled).
3) Installed app again then send the notification. Now, The notification is successfully sent.
So my question is, why apns not returned invalid token when app is uninstalled from the device. Why feedback service not returned any invalid tokens?
Thanks in advance
When you uninstall an application, it does not get de-registered from the push server. So, this is normal behaviour. You won't get any invalid token error.
Related
I'm currently using laravel 7 and laravel-notification-channels/apn for iOS push notification. I also have a worker that handles sending notifications.
When I send a push notification to iOS it works fine initially but eventually, I got a 403 provider token expired. I can restart the worker to get the notification working again but how can I refresh a token without restarting a server? I have a production on Heroku and I don't think that would work in practice.
Thanks!
I have a GSM PUSH panel and it happens that when user installs the app I record his id to send future notifications.
But after it uninstalls I continue with the ID of it saved in the database and whenever I run my routine, it sends the push to those users even without having the app installed.
The problem is that I already have thousands of id's and now it's taking more and more to send.
Is it possible to know who does not have the app installed anymore and put a flag in the database so it is no longer sent?
Example of JSon return:
{"multicast_id":5157270514039936452,"success":2,"failure":1,"canonical_ids":0,"results":[{"message_id":"0:1474029083357948%0e3f0485f9fd7acv"},{"error":"MismatchSenderId"},{"message_id":"0:1474029083356778%f17b55e1f9fd7erf"}]}
You have to implement it:(https://developers.google.com/cloud-messaging/registration)
The end user uninstalls the client app.
The app server sends a message to GCM connection server.
The GCM connection server sends the message to the GCM client on the device.
The GCM client on the device receives the message and detects that the client app has been uninstalled; the detection details depend on the platform on which the client app is running.
The GCM client on the device informs the GCM connection server that the client app was uninstalled.
The GCM connection server marks the registration token for deletion.
7. The app server sends a message to GCM.
8. The GCM returns a NotRegistered error message to the app server.
9. The app server should delete the registration token.
I'm currently setting up an apple push notification server for my app and I have a question regarding apple's responses. It's my understanding that the new push notification api (http2) allows you to receive instant feedback for each message sent through the service, and for the most part that seems to be true. However, I'm running into the issue that when I go into my iPhone's settings and remove the app's ability to send notifications apple still returns a '200' http2 response code, not the error '410' like it should. What would be a reason why it would still give the '200' response?
I have done the GCM Integration in iOS client, and i am able to push a notification from DHC - REST client. When i tried my registration token in my backend php it says Error: Not Registered.
Please help me on this, thanks in advance...
Try the following workarounds:
Make sure that the APNS token you're using to register with GCM is valid for the particular server.
Make sure that you are using the right iOS Development Provisioning Profile. Check if you're using the specific profile for your bundle name instead of a a generic one. To get push and background notifications working again:
Remove/Uninstall the application from the test device.
Perform 'clean' in XCode.
Perform 'build' in XCode.
Reinstall the app to the device.
You can check these related SO questions:
GCM IOS NotRegistered issue
GCM push fails with NotRegistered
gcm push notification: first success, then not registered in IOS
Hope it helps! :)
I have to send notification from server to android device. I developed application which got notification from server by using GCM (Google Cloud Messaging). But as I already have server then why to use GCM. I am not getting the purpose of using GCM. Can we send notification from server to android application without using GCM.
General Communication Pattern :
Device --> HTTPRequest -- >Server , Server -->HTTPResponse --> Device
But in this case, the device gets a response only when you send a request from your device to the server. Hence, whenever you need something new from your server you need to make a
request.
Using GCM, you do not need to make this request explicitly to your server. You'll automatically be notified when something new happens (depending on your implementation).
You are having server but GCM is totally different thing then your server.
GCM will monitor Your Application server that any changes made or not ??
And if anything created then it will send you notification without refresh or reload the Application.
and GCM will send you notification when your application is not working as well