I am making an app in which i want to recieve notification(PUSH Notification) on recieve of incoming sms like gmail in the way that as we recieve any mail there is notification on launcher icon.Any help will be appreciated. Thanks.
3 Answers
I guess you don't really need Push notification (in the sense what C2D means). What you need is to get notified if a SMS is received.
For C2D you would need a Cloud (as the name suggests) that receives your SMS and then notifies you. But if you just want to be notified on SMS reception that wouldn't be the solution.
For this, the solution would be the BroadcastReceiver
. Simply register your own Broadcast receiver and check for SMS.
After you have been notified by the BroadcastReceiver, you should notify the user using the Notification Manager

- 1
- 1

- 2,538
- 1
- 15
- 17
Have a look at the Android Cloud to Device Messaging Framework or this tutorial.
EDIT:

- 27,355
- 15
- 87
- 125
-
i mean to say i did not understand the link – Nov 09 '11 at 11:06
-
[Here is a link](http://www.vogella.de/articles/AndroidCloudToDeviceMessaging/article.html) on how to use C2DM service. But I guess what @Philipp Wendt wrote is correct. What you're looking for is a simple notification. – Flo Nov 09 '11 at 11:30
yup
https://github.com/commonsguy/cw-advandroid/tree/master/Push/C2DM/ this is one of the most basic example which helped me a lot while implementing c2dm.have a try vote up and accept answer if you find it useful comment if u need further assistance

- 1,574
- 1
- 11
- 17