i am new in the iphone application development. first tell me what is push notification? Why we use push notification? and last how we can use push notification?
Push Notification is where a remote server can send messages and sounds to iPhones and iPod touches who may or may not be running your application at the time the message is sent. That is, it's a way of getting around the fact that the iPhone does not allow third part applications to run in the back ground.
Apple have documented this pretty well. See the Push Notification Service Programming Guide for more details.
Related
I need to know if its possible to make push notifications without use the APNS.
And if it can be done, what are the best options?
Web server ->pushNotification-> Device
What about the VoIP apps? --> Can we push notification without using APNs?
Thanks.
No, there is no way to use Push notification without APNS. This is restriction from Apple and is documented here
No you can not push notification to a device without using Apple's push notification service.
It is not possible to display push notifications for your application in the same way that the built in push notifications appear without using the Apple Push Notification Service.
You may be able to set up some kind of web socket-based solution, but that will not work when your app is in the background, thus defeating the point.
Check out Urban Airship
Push Composer makes sending Push Notifications simple for anyone in your organization. By putting the power of engagement into the hands of your business team, you can empower them to reach your customers quickly without adding strain on your engineering team. And because you can preview your message as you write it, you’ll know exactly how your users will see and engage with your message.
I'm wondering if there is any way of retrieving the last-received push notification if the app is launched from the home screen instead of by pressing the 'View' button on the notification.
The app we're writing is for dealing with sensitive data, and it's important to be able for the central server to be able to remotely disable a client at will, without having the requirement that the app needs an internet connection to launch.
The basic idea I came up for this would be to send a push notification with a custom payload letting the app know to disable itself until it can properly sync its data.
This would work if the user pressed View on the notification, but not if they cancelled it and then launched the app separately.
I'd love to know if this is possible, or otherwise if there's a better way to implement this functionality.
It's not possible. Your app would have to connect to the server on launch and get its latest status from there. If your use case is that sensitive, push notifications are probably not reliable enough anyway because Apple does not guarantee that a push notification will actually be delivered.
Like Ole said, not possible.
Note that you shouldn't be relying on push notifications for anything like this. From Apple's push notifications programming guide:
Remember that delivery of notifications is “best effort” and is not guaranteed.
i m making an application where data is accesed from website and displayed with an application.i have made an action which will tell the user that new data has arrived.this will work properly if the application is open .but if the application is closed than ,is there any way to tell the user that new data has arrived ,,so that he can open the application and check the data?
If you are using the Apple Push Notification Service (APNs), your messages will be delivered whether the application is running or not. For information on how to control what information is presented to the user, read the Apple Push Notification Programming Guide.
You should use Apple Push Notification Service, like codelark said.
I would recommend looking into Urban Airship for help getting started. It's a third party service, but it makes things much easier. Urban Airship does have their own tutorials and code samples which may be easier than Apple's.
As a follow up to the reference to apple push notification, as of ios4.0 I believe you, you may have a few more options, 1) you can send local notifications (just like push notifications, but they originate from inside your app) that could be timed to be delivered even if the app is not running..assuming you know approximately how long it will take for data to arrive. 2) if your data update will occur soon after the app closed.. your app can request a certain amount of time to complete an operation (even though the user has closed the app) and wait for the data, then send a local notification to tell the person to come back into the app. 3) if your functions based on gps updates, music streaming, or voip you can set a flag so your app continues to run in the background
sorry for the unstructuredness of the answer, this was just off the top of my head, hope it helps
I have an application in which I have to show the alerts for user specied reminders,
I am able to show these reminders when my application is running but my problem is
i have to show thsese reminders to the user when my application is not running?
is it possible to show the alerts or remindsers when the application is running?
what i obsered in iphone native applications(messages, emails) it whill show no of unread or new messages at the top right tip of the icon on the desktop and it will keep on updates these count.
Can I impplement these king of alerts to my applications? if yes how? it not is there any other to show the alerts when application is not running?
Have a look at Push Notifications. Otherwise this it is not possible.
You'll note that the applications that do this were all written by Apple. As of V3.x of the iPhone, no third party applications can run in the background.
The official way to support this kind of functionality is to use Push Notifications. This requires a server-side component. Push notifications allow you to update the "unread count" or display messages exactly as you describe.
Above both answers are right.
Actually, you can never ever display alerts when application is terminated.
Remember that "iPhone" doesn't allow any background processing.
The alerts that you see are push notifications - which are sent from apple server to iphone.
Basically you need to study about push notifications.
Push notifications are sent from server to iPhone only when it is registered.
( application registers for push notifications - which you can see in settings ).
I'm looking for a way to get real time notification from a server in an iPhone App. I don't want to use Apple Push Notification as I have many notifications. My web service is coded in PHP, and I haven't figured out an easy way to implement this functionnality. Any idea what should I do?
Thx a lot for your help!
EDIT : I'm looking for a way to get notification only when the app is launched (otherwise, the only option IS Apple Push not.).
If the app is running you can open an http connection from the app to the server and have the server hold it open, pushing data through it when you want. This is basically how COMET works.
This will only work while your app is running. If you need the notification to happen even if the user has closed the app then Apple Push Notifications are your only option.
You must use Apple Push Notification for achieving push notifications cycle on Apple's mobile devices.