android - How is it possible for the user to receive notifications even when the app is not running -


so trying make app when row in sql database changes, user receives notification though app not running. i'm pretty sure possible because facebook can send mobile notifications when app isn't running, i'm not sure how go this.

you need use service runs in background. within service can start notification. not clear 'notification' talking about? if talking notification in google cloud messaging notification, need go different way. but, using gcmintentservice extends service class.

you want send notification when when row in sql database changes. row changing on server side? assuming yes because first talking android database, have mentioned sqlite instead of sql. secondly gave example of facebook. so, if answer question yes, using gcm push services can send push message user. when user receives message, can show notification proper data. in onreceive method of gcmintentservice, receive content in intent. there can extract message , create notification. see here more.


Comments

Popular posts from this blog

design - Custom Styling Qt Quick Controls -

Unable to remove the www from url on https using .htaccess -