fix(android): Catch when WebView provider unavailable #13101
+44
−5
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes: #11560
Fixes: KEYMAN-ANDROID-5E9
Fixes: KEYMAN-ANDROID-6MA
Keyman requires system WebView to be installed and enabled.
This updates KMManager to catch when the system WebView is not installed/enabled, and attempt to notify via Toast.
At the moment, the Toast notification doesn't appear when the system keyboard fails to initialize. I suspect there's no IME available to display the message...
User Testing
Setup - Install the PR build of Keyman for Android on an Android device/emulator.
Launch Keyman and enable as the default system keyboard. Then close the app.
Next, go to system Settings --> Apps --> expand and find "Android System WebView --> Disable.
This disables the system WebView which Keyman requires to run.
Launch Keyman for Android
Observe the splash screen and verify a Toast notification appears about the WebView failing
Verify Keyman automatically closes without errors about crashing