I have a shopping app on playstore.
There are many new updates which the user must have.
The new Apk needs to be update by all users.
How can I force all my users to update their app?
Have a file on a server which contains version of the most recently released APK. On app startup get the file and compare current APK version with what is the latest version. At that point you can either let the user continue or gracefully direct them to the Play Store.
You'll have to update the file on the server every time you update the APK, but additionally you can provide additional controls or messages that you can show like when a old version will no longer work to give your users time to upgrade.
Regardless you'll have to code this into the app before the user gets it.
Hmm you can do this by below approach.
Add an updated code version of your app to the server
Make a web service that return that version code you placed on
server
If you have BaseActivity do the third on that else do the third step on that activity that is first Activity or launcher Activity
In onResume method hit that service and get App version code and match that code with current app code. If both are same then it is ok else Prompt the user and take the user out of the app by killing the app.
NTOE: You can use below code to get the current version of the app that is installed in your device.
PackageInfo pInfo = getPackageManager().getPackageInfo(getPackageName(), 0);
String version = pInfo.versionName;
Hope that helps you.
Yes you can, You have to manage apk current version with web service. Need to follow below steps,
Whenever your app is started call any service which is sending your current app version and based on this server send response like "0" or "1" as pre-defined. if you got above value like "0" for existing app and "1" for app update now you can manage the dialog or some actionable view which is redirect app to your playstore app.
That's all! This way you can forcefully update app.
Happy Coding!!!
You can use appgrades.io to provide a customised view in your app blocking the navigation and asking the user to update the app. No need to manage app versioning in your app/api if you could use third party librairies that perform such a task.
You can't do this. Your API must work with an old versions of your APK.
And remember that user can uninstall some of your updates.
As a last resort you may check a version of API in APK, show warning and don't let use your application.
Related
This is a repeated question as i have not got answer . Hope someone will look at this and answer .
I have an android application which has number of downloads . I want to update the app with some major fixes and updates . Because of this update, end user may get failed authentication and need to reenter his credentials which I dont like. At the same time i want keep same package name to keep downloads and app reputation on playstore.
So how can i achive these
1.update android app on playstore which will not push automatic updates even if end user turn-on autoupdate in settings .
Previous app downloads and userfeedback should be there
So this way old users still continue using old version and any new users who download app from playstore will enjoy new app .
Thank you
Ok, you mentioned keeping a package name and stuff... Changing that should never be an option. The user could have ten of the same app, all with different features because your updates are all packaged separately. There isn't really a way to stop Google Play from auto updating apps, the users may just have to deal with reentering credentials. Since there isn't a way around this, you could simply apologize to the user. Example:
When the user logs in, save a boolean called something like, "wasLoggedIn". Then, on your login/startup page check if that is true. If it is, display a dialog such as, "Sorry for the inconvenience, you have been logged out due to an error." This will make the user a little more comfortable logging in again.
I have created an Android application, published an initial version on Google Play Store and installed the APK on a test device.
How can i update new version without prompting?
I have seen sometimes Play store send notification for update
available and user can update after click on that notification but
some application is updating automatically.
hows it possible.?
I want that user get update automatically.
Your help would be highly appreciated.
No, it's not possible (unless the user clicked on the checkbox update automatically).
The only thing you could do is build yourself a shell of an application that would update itself from the internet when it gets run (but that would be quite an undertaking on your part and probably not worth your time).
No. Google Play cannot update applications automatically without user permission.
Are there any special requirements my app should obey to ensure users are notofied when an update is available? (My current app is freeware if it matters)
Google play shows automatic update once you release a newer version of your app in google play. But the update can be see only if the user visits your app in Google play.
If you want to show the update notification at the launch of your application, then some extra coding is required.
You can write a code inside the start of your application to read a file from some server, which contains the version number of your app.
Evereytime you update the application, you can change the version number in the server.
So, once the app gets a different version number as compared t previous one saved in sharedPreference, you can write logic to launch googleplay to update your app and also update your sharedPreference with latest version number.
Hope you understand what I am trying to say.
I would like to do some clean action in my application before it will be updated from Goole Play. Eg. delete some files from previous app version.
There's any way to do this in Android?
Can't you do this at the time your app starts for the first time after update? Looks a lot easier. Just store last updated app version in user preferences or in a file and verify it every time app starts.
There is no API call for this, or any unofficial method either. However, you could have your app check a file on a server everytime it runs. You could store the latest version code in that and check it against the installed app's version code. If the version code is higher, then there is an update available. You can then do your clean up operation, and prompt the user to update the app. However, sometimes users don't update apps, so you should make sure that either the data being cleaned up is non-essential to functionality, or you force users to update the app by not letting them get past the update prompt until they have updated it.
I have created the the android application and it was given to all my clients. Now I update my application and want that changes are done to all my clients. I don't want that client to uninstall the application and install the updated application again. I want that when the client opens the application shows a notification which asks the client to install the updated application and then log in.
I want to achieve this functionality does anyone have any idea how to do this?
Please do reply me it's very important for my side.
How did you distribute the application? Through the android market? If so when you upload a new version their phone will periodically notify them that updates to some of the apps are available. If you did not implement this functionality in the version of your application that has already gone out then I am afraid you don't really have a way to make this happen.
Moving forward what you can do to implement something like this is have a webservice that returns the current version code for the application. In your apps onCreate() method call this webservice and compare the result with the version code of the app on the system. If the one from the webservice is greater then prompt the user to go download the new version.
Edit: If you didn't implement this in the version you've given out already then you have no choice but to just send out a new apk file to them. You can use some process similar to what i've stated above in the new version so from here on out you'll be able to set a value on the server that will lead to the users being prompted to download new version.