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

Enhacement: allow the apkg packages to be shared with AnkiDroid

Open criticalAY opened this issue 1 year ago • 8 comments

Purpose / Description

Working on #15264 we enabled the images to be shared with AnkiDroid, similarly enabling the application to register itself for the share intent which is not enabled as of now, I originally included it in the PR I mentioned but since it was not part of that was removed for later

  • Fixes #15618

How Has This Been Tested?

Tested on Google emualtor API 34

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
  • [ ] 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

criticalAY avatar Feb 15 '24 18:02 criticalAY

Does having <data android:mimeType="application/octet-stream"/> under SEND mean that a significant amount of non-AnkiDroid file types are impacted?

We don't want the content that we receive to be generic it would allow all types of files even the ones that are not relevant to us, Only those that are mentioned in this filter, i.e in our case

 <data android:mimeType="application/apkg"/>
                <data android:mimeType="application/colpkg"/>
                <data android:mimeType="application/vnd.anki"/>
                <data android:mimeType="application/x-apkg"/>
                <data android:mimeType="application/x-colpkg"/>
                <data android:mimeType="application/octet-stream"/>
                <data android:mimeType="application/zip"/>
                <data android:mimeType="text/tab-separated-values"/>
                <data android:mimeType="text/comma-separated-values"/>

criticalAY avatar Feb 17 '24 16:02 criticalAY

application/octet-stream is effectively equivalent to "unknown binary file"

It's provided to us by Gmail downloads, but I don't know whether it's ever provided by the share dialog if an apkg is selected

The same with application/zip: we want to confirm that we're provided with it for either apkg or colpkg

We should confirm that these are necessary, as they (rightfully) frustrate users

david-allison avatar Feb 18 '24 12:02 david-allison

I will test it and get back

criticalAY avatar Feb 18 '24 16:02 criticalAY

Does having <data android:mimeType="application/octet-stream"/> under SEND mean that a significant amount of non-AnkiDroid file types are impacted?

Need this one for gmail as apkg won't have AnkiDroid as an option in this case

The same with application/zip: we want to confirm that we're provided with it for either apkg or colpkg

Don't need zip files as we don't handle them in our codebase

criticalAY avatar Feb 22 '24 16:02 criticalAY

Release note - before possibly altering share sheet experience for users (this has been a sore point in the past!) I want to make the branch cut for release-2.17

mikehardy avatar Feb 22 '24 16:02 mikehardy

apkg is a zip, and a file may still come through as application/zip, could you quickly confirm this no longer happens on API 24, and if not, we can remove it and users will be happy

david-allison avatar Feb 22 '24 20:02 david-allison

Even in API24 zip files are not (apkg as zip) actually API allows zip files to be opened and that result adding it to AnkiDroid

criticalAY avatar Feb 22 '24 21:02 criticalAY

As noted, merge after we cut for 2.17

david-allison avatar Feb 22 '24 21:02 david-allison

Hi there @criticalAY! This is the OpenCollective Notice for PRs merged from 2024-03-01 through 2024-03-31

If you are interested in compensation for this work, the process with details is here:

https://github.com/ankidroid/Anki-Android/wiki/OpenCollective-Payment-Process#how-to-get-paid

We only post one comment per person per month to avoid spamming you, regardless of the number of PRs merged, but this note applies to all PRs merged for this month

Please understand that our monthly budget is never guaranteed to cover all claims - the cap on payments-per-person may be lower, but we try to make our process as fair and transparent as possible, we just need your understanding.

Thanks!

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