1

How do I Notify users about android auto update apk available from google play store programmatically when new version is available??????

nobalG
  • 4,544
  • 3
  • 34
  • 72
Abhishek Jha
  • 167
  • 4
  • 15

4 Answers4

4

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 :

Community
  • 1
  • 1
nobalG
  • 4,544
  • 3
  • 34
  • 72
  • 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
1

When you change the version of APK on play store.User will implicitly get update of your application.No need of any programming code.

Vibhor Bhardwaj
  • 3,071
  • 5
  • 28
  • 49
0

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

https://code.google.com/p/android-query/wiki/Service

Community
  • 1
  • 1
Umer Kiani
  • 3,783
  • 5
  • 36
  • 63
0

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.
Maveňツ
  • 1
  • 12
  • 50
  • 89