Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(android): Redirect to Google Play Store if WebView is below the minimum #5648

Closed

Conversation

thomasvidas
Copy link
Contributor

Update WebView Version

Fixes #4884

@thomasvidas
Copy link
Contributor Author

thomasvidas commented May 27, 2022

Future improvements to be made:

  • Customizable text/icon. Should we add this to the Capacitor config?
  • Localization. We should check the locale and use the localized version of this message for non-English speaking countries.
  • Better support for Android R and above. The R minimum WebView version is 61, but the TYPE_TOAST was deprecated in O, and the replacement requires a system permission. We should modify the splash screen plugin to allow this alert on top or add steps on how to add the permission.
  • Allow users to specify their own minimum, allowing them to set their app to a minimum of WebView 80 should they wish to

theproducer added a commit that referenced this pull request Jun 24, 2022
@jcesarmobile
Copy link
Member

closing in favor of #5723

@jcesarmobile jcesarmobile deleted the feature/android/show-warning-on-old-webview branch April 24, 2023 10:01
@francolondra

This comment was marked as abuse.

@francolondra
Copy link

I was investigating and the problem comes from chrome, which has a version lower than 60, so what I implemented was to force it to be updated, I created that script and put it in the angular index.html. It worked very well for me.
<script type="text/javascript"> var userAgentArray = window.navigator.userAgent.split(" "); var chromeVersion = a.find(c => c.includes('Chrome/')); var version = b.split("/")[1]; var numberVersion = parseInt(c.toString().split(".")[0]); if(numberVersion <=60) { alert("Debe actualizar su navegador chrome.") var url = "https://play.google.com/store/apps/details?id=com.android.chrome"; window.open(url); } </script>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants