0

I have an application on the play store and for first time i have updated it. How to alert the users that there is a new Updation available in google play store through the app when they open it,just like a notification or alert and redirect to that linked apk page.

startActivity(new Intent( Intent.ACTION_VIEW, Uri.parse("https://play.google.com/store/apps/details?id=com.novtory.provider") ));

I think the above code may help to link the page but i want to know how to send a notification when there is a new update available without using any third party library.Please help me out.

Anish Yesudasan
  • 11
  • 1
  • 1
  • 8

2 Answers2

0

You do not need to do anything specific for this. Since you mentioned that you are using Android Play, the update notification is taken care of by Google Play.

You need to just update the APK with higher versionCode and Google Play should do the rest.

From https://stackoverflow.com/a/9878292/4427731

Community
  • 1
  • 1
Nirel
  • 1,855
  • 1
  • 15
  • 26
0

In your first screen or splash screen call a web api which will return you the latest version code. And then compare it with the current app's version code. If it is not latest show user an alert dialog that he needs to update the app. And then redirect the user to play store with your app using Intent. Note that you have to update the latest version code on your server every time you upload the update.

H.T
  • 161
  • 7