Anki-Android icon indicating copy to clipboard operation
Anki-Android copied to clipboard

Productionised Webview Check using Dialog Boxes

Open aayush-tripathi opened this issue 11 months ago • 7 comments

Purpose / Description

Added dialog boxes which inform the users in older android devices of their old WebView versions (<=77) and also helps them update the WebView to a newer version.

Fixes

  • Fixes #15855

Approach

The earlier debug only test informed the devs whether the WebView version was outdated , I have worked on that further and have introduced a dialog box for the users with a link to Wiki (Exact page can be changed by modifying the const val WEBVIEW_UPDATION_LINK with information regarding updating to the latest version.

Also , I tried to differentiate between the packages com.android.webview and com.google.android.webview as this requires special steps : com.android.webview has to be disabled and com.google.android.webview has to be installed as of https://github.com/ankidroid/Anki-Android/issues/15847#issuecomment-1988304056.

How Has This Been Tested?

  • Unit Tests (./gradlew jacocoUnitTestReport)

  • Ran on a virtual device (Android 7.0 , API 24 ) containing an older webview version to ensure the dialog box works

    ( I was unable to test whether the dialog box works for devices having "com.android.webview" )

https://github.com/ankidroid/Anki-Android/assets/112811133/fbcb92c2-5784-4390-9d1e-62df31e3d1df

Checklist

Please, go through these checks before submitting the PR.

  • [X] You have a descriptive commit message with a short title (first line, max 50 chars).
  • [x] You have commented your code, particularly in hard-to-understand areas
  • [X] You have performed a self-review of your own code
  • [X] UI changes: include screenshots of all affected screens (in particular showing any new or changed strings)
  • [ ] UI Changes: You have tested your change using the Google Accessibility Scanner

aayush-tripathi avatar Mar 13 '24 18:03 aayush-tripathi

Message to maintainers, this PR contains strings changes.

  1. Before merging this PR, it is best to run the "Sync Translations" GitHub action, then make and merge a PR from the i18n_sync branch to get translations cleaned out.
  2. Then merge this PR, and immediately do another translation PR so the huge change made by this PR's key changes are all by themselves.

Read more about updating strings on the wiki,

github-actions[bot] avatar Mar 13 '24 18:03 github-actions[bot]

Hey, I have made some changes. Could you please review them?

aayush-tripathi avatar Mar 15 '24 14:03 aayush-tripathi

Screenshot 2024-03-20 192302 Screenshot 2024-03-20 192249

Is this good as per the discord messages?

aayush-tripathi avatar Mar 20 '24 13:03 aayush-tripathi

Screenshot 2024-03-21 000717

Added the package name and version.

aayush-tripathi avatar Mar 21 '24 12:03 aayush-tripathi

The branch seems to have conflict. Can you try fixing the conflict.

neeldoshii avatar Apr 02 '24 21:04 neeldoshii

Just a feedback @aayush-tripathi, next time instead of using [Merge branch 'main' into main] use git rebase.

neeldoshii avatar Apr 04 '24 19:04 neeldoshii

Hello 👋, this PR has had no activity for more than 2 weeks and needs a reply from the author. If you think this is a mistake please comment and ping a maintainer to get this merged ASAP! Thanks for contributing! You have 7 days until this gets closed automatically

github-actions[bot] avatar Apr 28 '24 09:04 github-actions[bot]