Answer the question
In order to leave comments, you need to log in
How to update the application?
Good afternoon. When a new version of my application is released on the play market, I display a dialog about this that there is a new version of the program. And when I click on the update button, I run the following code:
private void startActivityForUpgrade() {
final String appPackageName = getPackageName();
try {
startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("market://details?id=" + appPackageName)));
} catch (android.content.ActivityNotFoundException e) {
startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("https://play.google.com/store/apps/details?id=" + appPackageName)));
}
}
Answer the question
In order to leave comments, you need to log in
You have something with testing this feature. Record a video where this is played, I do not believe. Well, in general, IMHO, you do not need to do this.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question