How do I Notify users about android auto update apk available from google play store programmatically when new version is available??????
-
1Questions end with a `?`. – 323go Jul 31 '14 at 04:36
-
1Hi, you should post some sample code on what you have tried so far – acutesoftware Jul 31 '14 at 04:39
-
Thanks everyone for showing interest in this topic. I am very new to this android development and had no clue about how to implement it.If u can help me out. It would be helpful for me. Thanku – Abhishek Jha Jul 31 '14 at 04:52
4 Answers
You don't have to manage this thing,when you add your new apk to the playstore with a new version code then the users who have already installed your application's old version will automatically notified.However you can have a check every time your application starts see here :
-
Yes i know google play will manage things up for us but how to check for new version. Can u please elaborate.Thanku – Abhishek Jha Jul 31 '14 at 05:02
When you change the version of APK on play store.User will implicitly get update of your application.No need of any programming code.

- 3,071
- 5
- 28
- 49
If it is an application on the Market, then on app start-up, fire an Intent to open up the Market app hopefully which will cause it to check for updates.
Otherwise implementing and update checker is fairly easy. Here is my code (roughly) for it:
String response = SendNetworkUpdateAppRequest(); // Your code to do the network request
// should send the current version
// to server
if(response == "YES") // Start Intent to download the app user has to manually install it by clicking on the notification
startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("URL TO LATEST APK")))
Of course you should rewrite this to do the request on a background thread but you get the idea.
If you like something a little but more complex but allows your app to automatically apply the update see on this link
Android: install .apk programmatically
Second Option is to use Android Query this would be fairly simple to use

- 1
- 1

- 3,783
- 5
- 36
- 63
why you need to check there is google play app in the phone to do that. THere are criteria when wifi and auto-update is enabled then apps automatically get updated one by one in a serial order.
Why you want to the thing which google is already doing for you?
- There are version name and version code which tell the latest availability of the new application version.

- 1
- 12
- 50
- 89