How to force users to update app? - java

I have a condition where the internal DB will be changed and after the migration the old app will no longer work. Is there a way that google play or apple app store provides any flag which does this job?
Also I don't have any version check in my current app (which is already with customers) so cannot display any message in the current app to download new app and ask them to update or quit the app.
I am using Adobe Flash Builder 4.6 to create IOS & Android apps.

You can not force users to update the application but you can send them push notification for updating the application if they want to and you have implemented into current version.
But when you release the update they are able to get notify by app store and if they want they can install the update from there..

As you cannot force users to update the app using Google play or AppStore build-in feature, you can use third party librairies that do exactly what you want. appgrades.io allows you to block any version of your app by displaying a view or popup (that you can customise on appgrades Dashboard) with a custom message to ask your users to update the app. You can even add an update button that sends the users to the appstore/Google play where they can update the app. No code needed. Just integrate the SDK in your app and block any version anytime.
The other solution would be coding what appgrades does by checking with your api the latest available version and block the app with a view when you are running a lower version.

Related

How to test your app while not effecting active users?

I am soon ready to release my app on the play store but I would like to know how can I edit/add features/update my app without affecting my users. For example if I decided to add or remove something from the server I don't want the whole app to crash on the users. Basically running a clone where I can try out anything I want and it stays separate from the original app. How do I do that?
I am really sorry if I confused you all and my English is not the best.
For that you would run a development server and have multiple builds of your app.
You can use google play to distribute that app to your test users, described here or you can manually install the app on test devices. Manually installing is faster(if you have a few test users) than waiting for google play to push an update.
As for how to set it up, that would depend on what you are doing and with what tools. Usually you would set up multiple builds in android with BuildConfig.java variables. There you can either check the build type and use a specific API key/Server URL or you can pass a different value depending on the build. More info here.
Basically in your build.gradle you would have:
android {
...
buildTypes {
release {
buildConfigField("String", "SERVER_URL", "https://api.example.com/")
}
debug {
buildConfigField("String", "SERVER_URL", "https://api.dev.example.com")
}
}
}
You can switch which variant you are building from Build > Select Build Variant... or from the sidebar in Android Studio
Now you can access these from your code as:
BuildConfig.SERVER_URL
Next you would distribute that app to your test users.
As for the server side it depends on how you have it set up now and how you want to set it up.
Google Play’s Core library (on 1.5.0 or higher) has a feature for apps running on devices using Android 5.0 (API level 21) or higher and Chrome OS devices, called In-app updates. If you want users to try a new app feature or apply updates to improve performance or fix bugs, the Play Core library offers two methods. You can notify users about an available update using the Flexible or Immediate approach.
The In-app updates has a new request flow for you to prompt active users to update the app. Using the Flexible approach, the update is downloaded and installed in the background while the app is still in use. With the Immediate option, the user has to accept the update request after which Google Play manages the installation and restart the app.
Set a priority for each update in the Google Play Developer API, which determines how your app recommends an update, using an integer value between 0 and 5, with the default being 0 and 5 being the highest priority.

Adding updates to android app programatically to update the app when ever the user comes online

I have an android app that the features may keep updating from time to time. Those features are hard coded into the app and I feel that if like 100 users download the app and when some features of the app is updated and re-upload to the play store those users who have installed the app prior now may have lost out on some of the latest features uploaded to the play store.
To tackle this issue I arrived at this solution as described in the url but yet to implement it in the onCreate method
Intent intent = new Intent(Intent.ACTION_VIEW ,Uri.parse("market://details?id=com.package.name"));
startActivity(intent);
Is there a way to automatically update application on Android?
I want to be guided properly please, if this approach will solve my doubts. Kindly assist!
if you used web serivce then pass your app version to web team.
and then getting first web service call one flag for app is old or not
and you can manullay set dialog when app is open. and then redirect appp to playsotre.
The solution you are looking for is REACT NATIVE APPS.
React Native apps allows you to change and add many features without uploading the app to play store.
https://facebook.github.io/react-native/showcase.html
UPDATE
But If you want to use android native development then.
Make an API in your backend which will return the latest version of your app in its response like:
{
appVersion: "4.2.1"
}
Then in your android app on the first activity make a call to this API and compare the version of your application with the API version.
String currentVersion = BuildConfig.VERSION_NAME;
If it doesn't match then show a message to the user to update the app from play store and give a button which will redirect to your app link on google play store.
Whenever you update your app in play store change the version in your API.
You can also maintain versions for major and minor update.
{
majorVersion:4
minorVersion:1
patchVersion:2
}
Then in your app:
String majorVersion = android.optString("majorVersion");
String minorVersion = android.optString("minorVersion");
String patchVersion = android.optString("patchVersion");
String[] ab = BuildConfig.VERSION_NAME.split("\\.", 3);
String appMajorVersion = ab[0];
String appMinorVersion = ab[1];
And use if else to check whether you need to force update or not.

How to send notification to the user

I have an app in the google play and now i want to upload new version my question is how to make notification in the app that say their is a new version can you help me please
You should make some notification managing on your app's client side.
Some mechanism that compares the latest app version extracted from the push notification and compare it with user's actual app version.
When releasing your app to Google Play, always store in some shared preferences (for example) your actual application version, that later will be compared with latest.
Another option, is to ask some server the latest version, every time the user opens your application.

Android automatically download and install apk

we have our android application which is running in kiosk mode. We would like to have feature to automatically check for updates, install those updates and run application again.
We can use some android service for that (actually, that's preferable way).
Do anybody has idea how we can accomplish that?
Thank you.
When the user has activated the auto update option in Play Store, then your update will automatically installed once the user has Wifi. If the user hasn't set this option you can do nothing about that.
You can ping your API every time your app starts, and your API has to tell you whether there is a new version. With this information you can display a popup to the user which forwards him to your PlayStore entry. But the user must select to update your app, you can not automate this process.
What you could do: If you write an HTML5 app, or you have a WebView which loads content from the network, then you can do your magic updates by simple updating the sources on server side.

How does downloading game updates works?

Let's say I published a game and after some point of time I wanted to release an all new feature for the game. Of course the app must be able recognize and download the update. How does this work specifically with Google Play apps? Does the app download the entire new version of APK from the market and reinstalls itself? I'm using Java for the development, if this info helps. Any tips you can give me about this topic?
With Google Play, the user is notified that app updates are available. It is up to the user to initiate the download of the updates.
You can always include in your app a check to your server as to whether an update is available. However, this becomes a maintenance issue.

Categories

Resources