Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a way to automatically update application on Android?

I'm developing an application that will most likely be preinstalled on devices. It will be also available on Google Play. Is there a way to update those instances that are not downloaded through Google Play, since Google Play won't notify users about an update.

I was thinking about, as suggested here, trying to contact my site periodically, and when update is available, download it.

Is there a way to do this update automatically, or even silently, so that user doesn't have to do anything (like running the package manually). Or, when my site shows update is available, to offer users an update through Google Play, even though it's not installed through Market (EDIT: This Google play option would be preferable, because than users wouldn't have to check "allow install of non-Market sources".)

like image 259
Levara Avatar asked Jun 16 '10 22:06

Levara


People also ask

Can you schedule app updates on Android?

But here's something new today on Android. Well, not the schedule of an app launch but you can now schedule the launch of your Android app updates. Yes, you heard right, other than the standard publishing you can now enjoy timed publishing of your Android app updates.

Can APK update automatically?

Yes, Google Play Store will automatically update the apps by default.

Should I automatically update apps Android?

It's generally better to keep auto-updates on so that you can get a timely security fix in case there's a vulnerability found in an app you're using—but whether you should enable or disable auto-updates comes down to personal preference.


2 Answers

i had the same issue, now i check at the start of my app if theres a new version in my configuration xml.

I compare the actual version with the tag "< app_version >1.1< /app_version >" of my configuration.xml if its lower i ask with a custom AlertDialog if the user proceed with the upgrade

Intent intent = new Intent(Intent.ACTION_VIEW ,Uri.parse(myapk_link)); startActivity(intent);     

after the download the user has to run the package manually.

if you choose the update from the Android market use:

Intent intent = new Intent(Intent.ACTION_VIEW ,Uri.parse("market://details?id=com.package.name")); startActivity(intent);   

com.package.name must be the "package" of your app

or

Intent intent = new Intent(Intent.ACTION_VIEW ,Uri.parse("market://search?q=" + APP_NAME)); startActivity(intent);   
like image 118
Jorgesys Avatar answered Sep 21 '22 04:09

Jorgesys


Just found a way that works. Fire an Intent for a Market that searches for my application.

Tested with OpenIntent Newsreader because for it was easy to find an older version .apk. Market finds an application, and when user clicks install, replaces older version with the one from the Market. I think that is much easier solution for a user than downloading manually .apk and running it.

Intent intent = new Intent(Intent.ACTION_VIEW ,Uri.parse("market://search?q=" + APPLICATION_NAME)); startActivity(intent);   
like image 20
Levara Avatar answered Sep 24 '22 04:09

Levara