I have developed an android app which keeps runing continously for days. Now i normally keep making updates of this app and i want that all the phones running my app should somehow be able to auto update my app installed in them.I have not yet released my app in the market.In my app i have already developed push notification feature if that helps ? Any ideas ?
5 Answers
you could use a server and get the app to check for new updates and download accordingly.
Not sure if this is what you're looking for.

- 217
- 1
- 4
- 17
-
yeah probably i can do it. I can also download the updated app without user intervention. But can i also update my app without user intervention ?. My point is that update should be automatic without user intervention – vishnu pratap singh May 30 '12 at 03:44
-
This is a bad idea. You shouldn't be downloading new a new apk directly from your app. Application packages are signed, and if you change the package contents, you will change the signature and invalidate the application. The only way to update an app is to replace it, which you cannot do if you are running the application. This is a bad idea. Just use the Market's default update process. – mtmurdock May 30 '12 at 14:44
If the app is on the Android Market (now Google Play Market) then there is no way to force the user to update. Like DCSoft said, you could have your app check some server to see if an update is available. At that point you could either bug the user until they update, or you can prevent the app from functioning until it is up to date, but that's about it.

- 12,756
- 21
- 65
- 108
-
i can download the updated app without user intervention but can i also update my app without user intervention ?. My point is that update should be automatic without user intervention – vishnu pratap singh May 30 '12 at 03:45
-
No you cannot install anything on an Android device without asking the user. If you could this would be a very serious security problem. Why do you need to update without user interaction? Android Market roll outs usually only take an hour or two to process and the user will be notified within 1 day, typically. What are you doing that can't wait for the user to update the app themselves? – mtmurdock May 30 '12 at 14:39
You can use https://github.com/commonsguy/cwac-updater
It's really easy and fits your need.
I used it many times.

- 17,993
- 23
- 107
- 210
You can use services in android to check if there is any update in the service, if so trigger the service, to update the stuffs, else destroy it.[User might not come to know about this]
Is this what you wanted?!

- 2,994
- 1
- 18
- 25
Vishnu, assuming you don't want to use the Google Play auto-update feature, you will need an Updater. In two of the companies I worked for, we had a similar problem with both Windows Mobile 6.x and Android apps - no Google Play allowed for security reasons - and I used this solution in both cases successfully:
The main app check if it's updated, against a Web Service. It receives the current version & the URL from where to download the new version, if necessary. The main app then starts the Updater app, passing the URL, and quit.
The Updater download the new program, via HTTP, showing to the user the % downloaded. The user can cancel the download anytime, in a controlled way, and the Updater can registry this cancellation.
Since the new app is downloaded, the Updater run the new app, and quit.

- 1,315
- 12
- 25