Push Notification for Application Updates
android, google-cloud-messaging, google-play-services, push-notification
Solution
Yes, you can.
Integrate GCM into your app. Upload your updated apk to Google Play and activate it. Wait a few hours for it to go live, then send a push notification to your app saying there's an update.
This notification should have some predefined text in it, which your app knows means that an update is available. Once you get this, you can set a flag in SharedPreferences saying there's an update.
Now listen for the `USER_PRESENT` broadcast, which is sent when the device is unlocked. In the receiver for this broadcast, check if your SharedPreferences flag is set to true. If it is, show the notification.
Problem
In my project I have to give a push notification to the user if there is an update for Play store. By using Google Play service we can get the update only when user run the application. But I have to notify every time the user unlock the mobile. Is there any way to do this by using Google Cloud Messaging (GCM). Please help me on this. Thanks in Advance..