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

Fixes the image loading #294

Merged
merged 5 commits into from
Jul 25, 2024
Merged

Conversation

Helle-Daryd
Copy link
Contributor

@Helle-Daryd Helle-Daryd commented Jul 23, 2024

It was just a case of requesting the correct permission for Android sdk level 33 and above.

This partially fixes, #278 but it file urls for other things are still limited and for Google's sake we would have to start doing remote syncing to private files, because Google diskikes the idea of people sharing files.

We are now requesting the correct permission on for Android sdk level
33 and above.
@amberin
Copy link
Member

amberin commented Jul 23, 2024

Thanks a bunch!

Are we sure that READ_EXTERNAL_FILES is not needed for importing notebooks, or anything else?

@amberin
Copy link
Member

amberin commented Jul 23, 2024

@Helle-Daryd ExternalLinksTest is failing on API 34, because a permission prompt appears. I opened a PR against your branch to fix that: Helle-Daryd#1

Grant the READ_MEDIA_IMAGES permission during ExternalLinksTest
@Helle-Daryd
Copy link
Contributor Author

Are we sure that READ_EXTERNAL_FILES is not needed for importing notebooks, or anything else?

According to READ_EXTERNAL_STORAGE (which is what EXTERNAL_FILES_ACCESS previously mapped to) it is literally a nop on Android sdk level 33 and up, hence dropping it as a permission as well. We use ActivityResultContract for importing files, etc. and MANAGE_EXTERNAL_STORAGE for repositories.

This also means that we need to still investigate the rest of the bug relating to file: urls, because those should still be launchable via intents, but may not currently be?

The other permission we use, MANAGE_EXTERNAL_STORAGE is part of some other bugs including issues with having the app up on Google Play, because Google dislikes the idea of files being visible and interchangeable between apps.

@amberin
Copy link
Member

amberin commented Jul 24, 2024

@Helle-Daryd Sigh, I forgot to add SDK_INT logic to the permission rule... I won't be at the computer for a while, but I'll fix it later if you haven't already.

@amberin
Copy link
Member

amberin commented Jul 24, 2024

@Helle-Daryd Helle-Daryd#2

Grant permission when running the relevant API version
@amberin amberin merged commit f762a4c into orgzly-revived:master Jul 25, 2024
4 checks passed
@k4r4b3y
Copy link

k4r4b3y commented Aug 2, 2024

When can we expect a new release? I just got bitten by #278 as well. The file links to image files using relative paths do not work. Orgzly Revived briefly shows a left-to-right-flowing loading bar above its UI, but apart from that no image gets displayed inline, nor am I being redirected to my android image viewer for viewing the file. I am on orgzly revived 1.8.24 from fdroid.

@amberin
Copy link
Member

amberin commented Aug 2, 2024

I just published 1.8.25 a few seconds ago. :) But it usually takes a few days before it's available via F-Droid.

@k4r4b3y It would be great if you could mark #278 as solved once you have confirmed that 1.8.25 solves the issue for you.

@k4r4b3y
Copy link

k4r4b3y commented Aug 2, 2024

@k4r4b3y It would be great if you could mark #278 as solved once you have confirmed that 1.8.25 solves the issue for you.

Can I mark the issue thread that doesn't belong to me as "marked"?

But it usually takes a few days before it's available via F-Droid.

Got it. I will be on the lookout.

@amberin
Copy link
Member

amberin commented Aug 2, 2024

Can I mark the issue thread that doesn't belong to me as "marked"?

Ah, no, probably not... But please leave a comment if you can. :)

@k4r4b3y
Copy link

k4r4b3y commented Aug 3, 2024

But please leave a comment if you can. :)

Understood.


While I have your attention, could you also comment on my other issue: #295

Is avif support something easy to bring in (like updating some imagemagick binaries or something -- sorry if I sound nonsensical) or if it would require some major work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants