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): Load alternative layout when no WebView #7141

Merged
merged 3 commits into from
Jan 15, 2024
Merged

Conversation

jcesarmobile
Copy link
Member

@jcesarmobile jcesarmobile commented Dec 18, 2023

Add a basic layout with a text error message for when there is no WebView installed on the device or is disabled.

Users can use their own text by adding a <string name="no_webview_text">custom text</string> entry in their strings.xml, or create their own no_webview.xml layout that would replace Capacitor's default one.

Added some bridge != null checks as if the app fails to create the WebView, the bridge will be null and crash.

closes #5257

Copy link
Contributor

@giralte-ionic giralte-ionic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good stuff and should be in cap6 for sure

@jcesarmobile jcesarmobile merged commit 87c399a into main Jan 15, 2024
6 checks passed
@jcesarmobile jcesarmobile deleted the no-webview branch January 15, 2024 18:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

bug: Capacitor silently crashes if no Android WebView is available
3 participants