Skip to content

Instantly share code, notes, and snippets.

@varundwarkani
Created March 11, 2020 17:28
Show Gist options
  • Save varundwarkani/47a581af3382e8b24bae278edd598006 to your computer and use it in GitHub Desktop.
Save varundwarkani/47a581af3382e8b24bae278edd598006 to your computer and use it in GitHub Desktop.
InAppUpdatePopup
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