How to send notification to the user - java

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.

Related

Update database on server when app is being uninstalled

I know there might be many questions like my question. But It is different. Actually, I am making a static chart that will show how many devices currently having my Android app installed and how many devices have uninstalled it.
For this, I am creating a uniqueID when the app is installed on a device and saving uniqueID along with FCM token to SQL database on the server.
To Create uniqueID:
uniqueID = UUID.randomUUID().toString()
Now, while I am saving every device with a token and uniqueID to the database. Of course, the device will be considered to have active app installation even when uninstalled the app.
So, I want to add a field in the database as inactive against the device that has uninstalled the app. To achieve this, I am thinking to send a request to the database and update the information when the app uninstallation is triggered.
Is this possible? And if yes, then can anyone please tell me how. Or are there any other method to achieve this. Thanks in advance.
Yes it it possible. You can send a push notification to your app to all your active users everyday from your backend side, and on your Android side, call an API on your server to confirm that you exist. If a client does not confirm his existence in a period of time (like 3 days), you know they have uninstalled the app. This is what Adjust and other statistics do for uninstall statistics.
You can't easily run your own code when an app is uninstalled. It is possible to run code in another app, but that requires that you get the user to install both apps.
In addition to the approach Adib described, you can consider using Google Analytics for Firebase to detect uninstalls of your app by Android users. As shown in the answer to this question, Firebase automatically tracks uninstalls in that case.
Maybe you want to use Firebase Analytics and the event app_remove. Mark it as a conversion and use Functions to remove the user from your Firebase Project(if anonymous) and/or any other data associated with the user(Storage, Database, Firestore, etc.) or anything else you might want to do upon user removal of the app.

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.

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 to force users to update app?

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.

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