PDA

View Full Version : Can this be done with push notifications?




Soulstorm
Dec 8, 2009, 03:17 PM
I have heard of push notifications, but I haven't completely understood what they are all about. A friend of mine recently came up with an idea, and I just wanted to see if it is possible with push notifications. I will go into the technical details, as the idea itself is irrelevant.

I want to write an application that will receive background notifications from a server. The server will send an XML file to the application, the application will process that XML file, and will display alerts accordingly (or it won't display any alerts at all, if it doesn't need to). I want all these to happen while the application is closed.

I also want to be able to instruct the application to receive that XML file at a specific time of the day.

Regarding this idea, I have 2 questions:

1) Is that possible with push notifications?
2) If it is, will I need to configure the server that will send the notifications accordingly, or the server can be left intact?



skunkworker
Dec 8, 2009, 03:24 PM
I have heard of push notifications, but I haven't completely understood what they are all about. A friend of mine recently came up with an idea, and I just wanted to see if it is possible with push notifications. I will go into the technical details, as the idea itself is irrelevant.

I want to write an application that will receive background notifications from a server. The server will send an XML file to the application, the application will process that XML file, and will display alerts accordingly (or it won't display any alerts at all, if it doesn't need to). I want all these to happen while the application is closed.

I also want to be able to instruct the application to receive that XML file at a specific time of the day.

Regarding this idea, I have 2 questions:

1) Is that possible with push notifications?
2) If it is, will I need to configure the server that will send the notifications accordingly, or the server can be left intact?

That exact thing, no. But something that looks and appears similar to the user is indeed possible.
Example: the server goes through that file and it needs to notify the client, it sends a notification. When the user starts the app it goes and fetches the data and then properly uses it. It is not possible to send data like that to an inactive application.

Soulstorm
Dec 9, 2009, 04:38 AM
That exact thing, no. But something that looks and appears similar to the user is indeed possible.
Example: the server goes through that file and it needs to notify the client, it sends a notification. When the user starts the app it goes and fetches the data and then properly uses it. It is not possible to send data like that to an inactive application.

Thank you for your responce.

The way you describe it, it seems to me that in order to use push notifcations you must have access to the server and program the server in a way that it sends notifications for certain events, is that right?

robbieduncan
Dec 9, 2009, 05:01 AM
Thank you for your responce.

The way you describe it, it seems to me that in order to use push notifcations you must have access to the server and program the server in a way that it sends notifications for certain events, is that right?

Yes: you have your own server that then talks to the Apple Push servers to deliver the notifications to the devices. On reception of the notification your app cannot process in the background though: it can update it's badge or display a message and that's about it.