Created
March 11, 2020 17:28
-
-
Save varundwarkani/47a581af3382e8b24bae278edd598006 to your computer and use it in GitHub Desktop.
InAppUpdatePopup
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private void popupSnackbarForCompleteUpdate() { | |
if (!isFinishing()) { | |
new AlertDialog.Builder(this) | |
.setMessage(getString(R.string.inapp_downloaded)) | |
.setCancelable(false) | |
.setPositiveButton(getString(R.string.install), new DialogInterface.OnClickListener() { | |
@Override | |
public void onClick(DialogInterface dialog, int which) { | |
appUpdateManager.unregisterListener(listener); | |
appUpdateManager.completeUpdate(); | |
} | |
}) | |
.setNegativeButton(getString(R.string.no), null) | |
.show(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment