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

CookieManager.setAcceptFileSchemeCookies deprecated in API30

Open mikehardy opened this issue 5 years ago • 11 comments

Deprecated: loading HTML via files and allowing local cookies

https://developer.android.com/reference/android/webkit/CookieManager#setAcceptFileSchemeCookies(boolean)

Forward-port target: AndroidX WebKit stuff:

https://developer.android.com/reference/androidx/webkit/WebViewAssetLoader

mikehardy avatar Sep 15 '20 19:09 mikehardy

Hello 👋, this issue has been opened for more than 2 months with no activity on it. If the issue is still here, please keep in mind that we need community support and help to fix it! Just comment something like still searching for solutions and if you found one, please open a pull request! You have 7 days until this gets closed automatically

github-actions[bot] avatar Nov 14 '20 19:11 github-actions[bot]

Hello 👋, this issue has been opened for more than 2 months with no activity on it. If the issue is still here, please keep in mind that we need community support and help to fix it! Just comment something like still searching for solutions and if you found one, please open a pull request! You have 7 days until this gets closed automatically

github-actions[bot] avatar Apr 16 '21 02:04 github-actions[bot]

Should be fixed by the new backend switching to a separate HTTP server.

dae avatar Aug 31 '23 08:08 dae

setAcceptFileSchemeCookies may not be necessary anymore. So that needs

  1. Testing if it is still required
  2. Removing it if not

BrayanDSO avatar Mar 28 '24 15:03 BrayanDSO

HI @BrayanDSO @david-allison @mikehardy I can do the aforementioned tasks and have started to work on it. Can u please assign this task to me? Thank you!!!

jaivsh avatar Oct 07 '24 18:10 jaivsh

Sure!

david-allison avatar Oct 07 '24 18:10 david-allison

Hi @david-allison @BrayanDSO, here are the updates:

I've successfully created my own decks and synced them without any issues. The functionality is operating smoothly in both versions of the app: one version of the code has the main line of concern, CookieManager.setAcceptFileSchemeCookies, commented out, while the other version has that line intact.

Additionally, I imported a large deck from AnkiWeb (https://ankiweb.net/shared/info/1981482084) into both applications. After importing the deck, I ensured that it was synced properly. To verify the syncing process, I re-logged into the app multiple times, confirming that the imported files were correctly reflected in both versions.

Overall, both versions handled the import seamlessly, and the core functionalities are working as expected with no significant glitches.

Image Image

jaivsh avatar Oct 11 '24 19:10 jaivsh

Sounds good. Let's kill the line of code once the 2.20 alpha starts.

No point in introducing this much risk just before a large release

david-allison avatar Oct 11 '24 19:10 david-allison

Thanks for your feedback regarding the line in the code.

Given the current situation, I can remove the code block for PR creation if it would help streamline things. I noticed that the function is referenced in AnkiDroidApp.kt twice—once in the onCreate() method and once in the definition itself. I can handle those references accordingly for the next steps.

Just wanted to ensure I’m aligned with what’s best for the project moving forward.

Looking forward to your thoughts!

jaivsh avatar Oct 11 '24 19:10 jaivsh

The PR would be great! We'll aim to get it merged in the next couple of weeks once we start 2.20

david-allison avatar Oct 11 '24 19:10 david-allison

I also would rather have this in 2.20. There's always someone with a out of the curve notetype whose workflow may be broken

BrayanDSO avatar Oct 11 '24 23:10 BrayanDSO