user2833700
user2833700

Reputation: 67

Update android application using OTA

I am having my own apps store where all android applications are hosted. Some apps are modified. So How i can send updates to clients/users using OTA. So clients will come to know about new updates and he will be able to download it.

Upvotes: 6

Views: 7652

Answers (3)

aravind
aravind

Reputation: 2877

Found an interesting solution on HN a month back. This is related directly update the app on the client without any user interaction. And since you have your own app store, shouldn't face any problems as listed in the HN thread.

The solution working snippets from the website-

...intercepts all calls to startActivityForResult, getResources, and some other functions. When you try to start an activity, Evolve generates a dummy class and sets its superclass to the activity you want to start.

...dynamically generates the bytecode for a new class

...then changes the intent to start the appropriate class

This is still in alpha mode, so would require some effort from your side to integrate.

Link to solution - http://blog.vivekpanyam.com/evolve-seamlessly-deploy-android-apps-to-users

Assuming this is what you are expecting, hope this helps!

Upvotes: 3

Sree
Sree

Reputation: 3194

1.Create a Web Service which your app can poll whenever the app launches or based on some time limit that can check if there is new version out there.

2.This Web service should return the lastest Version of the apk file that is hosted on the Server along with the URI of the application file that has the new version.

3.When your app gets the response from the Web Service, it will parse the JSON and check your app version to the lastest version that is available on the server.

4 If your app version is lower than the latest version it will prompt the user to start the download process.

5.The download of the new app is handled by the Download Manager. The download manager will notify your app using Broadcast receiver when the download is complete.

6.Upon completion of the latest version of the application file the you can start the activity to install that file. At this point user needs to say OKAY, lets do it. Check this https://code.google.com/p/auto-update-apk-client/

Upvotes: 1

Aleks G
Aleks G

Reputation: 57326

If you have your own app store, then you must have a client app running on the relevant devices that allows them to install/update apps from that app store.

As part of that client, you can have a service, that enumerates the installed apps on the device and checks with your store whether updates are available. If yes, then it presents the user with a prompt to visit the store to update the corresponding apps - or do whatever else is appropriate in the situation.

You may also want to register this service to receive broadcasts of network connection events so that if there is no internet connection, the service will receive a notification when the connection is available again.

Upvotes: 0

Related Questions