Skip to content

Instantly share code, notes, and snippets.

@t4kemyh4nd
Created October 15, 2023 06:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save t4kemyh4nd/22847e1061cd6edfa793a24b32708256 to your computer and use it in GitHub Desktop.
Save t4kemyh4nd/22847e1061cd6edfa793a24b32708256 to your computer and use it in GitHub Desktop.
@CalledByNative
private void installWebApkAsync(final String packageName, int version, final String title,
String token, final int source, final Bitmap icon) {
// Check whether the WebAPK package is already installed. The WebAPK may have been installed
// by another Chrome version (e.g. Chrome Dev). We have to do this check because the Play
// install API fails silently if the package is already installed.
if (isWebApkInstalled(packageName)) {
notify(WebApkInstallResult.SUCCESS);
return;
}
// redacted
mInstallDelegate.installAsync(packageName, version, title, token, callback);
// redacted
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment