Object WebViewVersionCompatibility.Companion
-
- All Implemented Interfaces:
public class WebViewVersionCompatibility.Companion
-
-
Field Summary
Fields Modifier and Type Field Description public final static WebViewVersionCompatibility.CompanionINSTANCE
-
Method Summary
Modifier and Type Method Description final BooleanisOutdated(Context context, Integer requiredVersion)Determines whether the WebView component version installed on the device is less than the requiredVersion.final BooleandisplayUpdateDialogIfOutdated(Activity activity, Integer requiredVersion)Display an alert dialog if the WebView component version installed on the device is less than the requiredVersion.-
-
Method Detail
-
isOutdated
final Boolean isOutdated(Context context, Integer requiredVersion)
Determines whether the WebView component version installed on the device is less than the
requiredVersion.- Returns:
True if the WebView is outdated, otherwise false.
-
displayUpdateDialogIfOutdated
final Boolean displayUpdateDialogIfOutdated(Activity activity, Integer requiredVersion)
Display an alert dialog if the WebView component version installed on the device is less than the
requiredVersion. The user can tap "Update" to update the corresponding "Google Chrome" or "Android System WebView" app in the Play Store.- Returns:
True if the WebView is outdated and the dialog is displayed, otherwise false.
-
-
-
-