php - Google cloud messaging by fetching from database -
i'm working on getting news server android application. i'm thinking of getting push notification using google cloud messaging. i'm trying in application is
- check regularly in server if there new data added database.
- if yes make push notification.
i'm not seeing tutorial thing. found android code. please me on this. i'm newbie concept.
thanks.
you have options this:
1.. contact server app periodically , check if there new notifications. if data , show user.
-you can scheduling alarm, maybe once day, starts service server checking , notifying user. (this can ok solution if know new notifications appear @ fixed time intervals, used app has show weekly news each friday @ noon)
2.. google cloud messaging android
google cloud messaging android (gcm) service allows send data server users' android-powered device, , receive messages devices on same connection. gcm service handles aspects of queueing of messages , delivery target android application running on target device. gcm free no matter how big messaging needs are, , there no quotas.
http://developer.android.com/google/gcm/index.html
i recommend if want able send notifications users @ given time.
you have nice tutorials on developer.android, safe , reliable , have complete control on process.
i working on implementing option 2, can update experience on once done.
and here implementation tutorial on one: http://www.vogella.com/articles/androidcloudtodevicemessaging/article.html
Comments
Post a Comment