Abhinav
Abhinav

Reputation: 38162

Push Notification Alternatives

I heard that push notification is not reliable. What could be the alternative for this?

The use case I am trying to handle is: 1. I have a app which will be shared by three kind of groups. Each group contains certain set of persons. 2. A request is submitted by first kind of group and it will be serviced by second kind of group. So, all persons who are part of second group should be notified and no one apart from them should get the notification. 3. Similarly, A request is submitted by first kind of group and it will be serviced by third kind of group. So, all persons who are part of third group should be notified and no one apart from them should get the notification. 4. Even second group persons can submit a request to third group.

Please provide your thoughts as how should I handle these scenarios.

Upvotes: 2

Views: 8275

Answers (4)

Stephen
Stephen

Reputation: 532

You are right that APNs does not guarantee delivery: From their docs, they say that:

Important: Because delivery is not guaranteed, you should not depend on the remote-notifications facility for delivering critical data to an application via the payload. And never include sensitive data in the payload. You should use it only to notify the user that new data is available.

Upvotes: 1

filipe
filipe

Reputation: 3380

you're right to say Push Notifications are not reliable.
For one thing, if the device is not connected to the internet, APNs only keeps one push notification to be sent when the device connects again (the last notification sent from the provider). Since there's no way to determine if a notification has been already sent or not after your servers sent them to APNS, you can't even try to queue the notifications on your end.

Other than that if your app depends on PN the user can easily break it's functionality by turning notifications off.

So you're absolutely right, if the data you want to send is critical, then you shouldn't use Push Notification. But I believe there's really no solution to your problem. you simply can't rely on them for your app to work.

I think the best approach would be like the email app for example, where you can download your emails when you start the app wether you have PN turned on or not, and the PN just notify you of new email, even though it's not guaranteed you'll get it at all.

Upvotes: 2

Abhinav
Abhinav

Reputation: 38162

Push notifications rely on the network (3G/WiFi) presence to deliver the notification. Also, there is no response back from the Apple Push Notification Server which guarantee the delivery of the notification. Having said all these things... iPod touch is higly unreliable for delivery of notification because one, it do not have 3G; second, for saving battery its notifications are internally turned off for some time....

One Alternative to this is to keep polling the server in a background thread for any modification. But this will work only when app is running.

Another Alternative can be writing our own APNS kinda infrastructure.

Upvotes: 5

Christian Beer
Christian Beer

Reputation: 2025

There is no alternative, since Apple does some very low level communication. You would need to work together with the mobile providers to build something like the notification services.

That said, I don't think the service is not reliable. Maybe you should check your implementation.

Upvotes: 1

Related Questions