I just started research on the inApp update. all code done as per google document
appUpdateManager.getAppUpdateInfo().addOnSuccessListener(new OnSuccessListener<AppUpdateInfo>() {
@Override
public void onSuccess(AppUpdateInfo result) {
tvPackageName.setText("packagename : "+result.packageName());
tvCurrentVersionCode.setText("Current version: " + BuildConfig.VERSION_CODE);
tvAvailableVersion.setText("available version : "+result.availableVersionCode());
tvUpdateAvailibility.setText("update availibility : "+ result.updateAvailability());
tvInstallStatus.setText("install status: "+ result.installStatus());
if (result.updateAvailability() == UpdateAvailability.UPDATE_AVAILABLE &&
result.isUpdateTypeAllowed(AppUpdateType.FLEXIBLE)) {
try {
appUpdateManager.startUpdateFlowForResult(
result, AppUpdateType.FLEXIBLE, activity, RC_APP_UPDATE);
} catch (IntentSender.SendIntentException e) {
e.printStackTrace();
}
} else if (result.installStatus() == InstallStatus.DOWNLOADED) {
popupSnackbarForCompleteUpdate();
} else {
Log.e("issue", "checkForAppUpdateAvailability: something else");
}
}
});
but Now very important part Testing in-app update with internal app sharing
for that I follow (Android Dev Summit '19) video of test_inappupdate with internal app sharing*
I did the same as he said but update popup dialog not getting in my app
step 1 : I set test mode from playstore app
step 2 : I upload version code - 10 app at inappsharing
step 3 : share link and download app from link
step 4 : as per android video screen shot said i upload new build with same version.
step 5 : click on new generated link.
step 6 : open app again (but popup dialog not open ,state= UPDATE_NOT_AVAILABLE)