Update android application using OTA - android

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.

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!

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/

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.

Related

Caching server for Android or some thing similar

Our Android app will be used in a place without internet. We have one server with limited internet there.
Can user download the app from the server instead of google play, the way we can use ios cache server?
If we keep a copy of app in the server and install from it, how can we update the app with latest version?
Thanks.
You can host the apk file on the server and download it to the devices for installation. However, you first need to enable third party source installation for the devices.
Link how to here,
https://www.cnet.com/how-to/how-to-enable-third-party-app-installation-on-most-android-phones/
In terms of the update, you can always update the apk file anytime but you might need a separate system to notify the users/devices about the update. Probably by using SMS.

Storing links that may change in android app

Inside my android app I have hardcoded a link to some web service. Now every time the link to the web service changes, I need to make an update of the whole app through Goggle Play for changing this link.
Better would be if the application first connects to some other “static” web service and then gets the properly link that I can change whenever I want without an update.
Even better would be if it could be done somehow with Google Play, but I didn’t found any information for such a functionality.
Are there some suggested solutions to do that?
Implement GCM in your app and push notification with new url to all devices any time it changes. Then store that url in shared preferences / database on device.

how to update your android app daily without asking the user for update or download

I'm new to Android and I'm thinking of uploading my app to the playstore but I haven't tried uploading a single app.
I already know the steps in uploading however there is something that I need to know first.
I want the app to update everyday that doesn't need to notify the user for update. Say for example, in a bible app there is a "Verse of the Day" which is updated daily without downloading an update, just stay connected to the internet and the verse will be updated. I have no idea on how to do that. Is it just uploading a newer apk daily? If so, do I have to notify the user? How do I do that?
Any help would be appreciated.
Method 1:
Basically, what you are planning to do that can be achieve using API.
If you update database on the server then the API will automatically update the new data in the user phone's when it starts.
You can also implement logic that when any new data is added you can fire a local notification from the app and the user will be notified!
Reference: http://code.tutsplus.com/tutorials/android-sdk-making-remote-api-calls--mobile-17568
Method 2
You can create service or background activity that keep on running and calling your API after some interval of time. Whenever new data is received it will fire local notification. (This is not an efficient way because it consumes memory and internet data both)
E.g.: Alarm Manager
Reference: http://www.vogella.com/tutorials/AndroidTaskScheduling/article.html
Method 3
You can implement "push notification service", so that you can push notification on the user's device without updating your APK.
Reference: http://www.androidhive.info/2012/10/android-push-notifications-using-google-cloud-messaging-gcm-php-and-mysql/
P.S. All these method can be done without releasing the new APK on the Google Play Store.
I don't really know what your problem is. You have to host your "Verse of the Day" somewhere online and in the app fetch this data from the server. Why do you want to upload a new version of your app for this?
For the latest content that you want your app users to have, can use the Couchbase Mobile feature called Live Query that abstracts out having the user explicitly ask the server for any updates.
When the app is connected to the internet again, content will be updated accordingly if the user's Android app does not have the latest content locally.

Force user to have the latest version of an app

Is it possible to check on startup of an Android app whether the user has the latest version of it and force him to update if he has not?
Or at least checkt whether there is a new version and tell him, that the app only will work again when he downloads and installs the update?
Background is that I have an app that needs to communicate with a server. When I change something in the interface between server and client I want to assure that the client has the latest version.
Is there any native way to do this? Or do I have to check this on my own?
I don't think there is a native way to do this -- but coding it yourself shouldn't be too hard ; you'll have to :
Implement a version check : make a request to your server, and have your server return the last version number
Then, if the version number gotten from the server is higher that the application's one, ask the user to update.
You could even do this at each request -- just include the version number in each response from the server.
Might be useful in case the user resumes the application, instead of re-starting it from your "first" activity.

Detect my own app's version or use existing update notifier when publishing on my website and not the market

I would like to notify the users when there is an update because the updates will be coming from my own website and not the market. However, do not want to have to update two places.
Either that or I would like to share the existing update notifier that is included with android. I am planning on uploading the app to one of our websites instead of the market.
Thanks!
AFAIK there is no public API for this provided by the Android OS or by the Android Market app. Note that hardware vendors often bundle their own update apps for this very reason.
Your best bet is to put the APK on your web server for download. Every time you download it, record the date from the Last-Modified HTTP header. Then in future you can poll this file using If-Modified-Since if your server supports this tag, if it doesn't you can get the header and check the Last-Modified date programmatically without downloading the HTTP contents.
Once you know an update is available, you can notify the user with your own notification code. If you plan to update the app programmatically, you will need to make sure you request the android.permission.INSTALL_PACKAGES permission in your manifest.

Categories

Resources