In the EBookDroid application, for some time now, when opening a book, a message appears
"This book has been deleted or the Total Commander application has revoked reading permissions. Please open the book again through the Total Commander app. Don't worry, the settings, notes and bookmarks for this file are saved" (translated from Russian).
Previously, everything worked fine – it was possible to open a book that had not been opened for years, and now it has become impossible to read books comfortly.
Yes, I can open books with the built-in EBookDroid opener, but I want to use favorite TotalCmd.
Is there any way to fix the situation?
EBookDroid revoked permission
Moderators: Hacker, petermad, Stefan2, white
- ghisler(Author)
- Site Admin
- Posts: 50386
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: EBookDroid revoked permission
This happens because Total Commander now sends files to other apps as content: URLs. To make such a link permanent, the target app needs to call a specific function. If it doesn't do that, then Android (not Total Commander!) makes the connection expire.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Re: EBookDroid revoked permission
The developers said that it's partially true - if the app asks for a file than it's responsible to make the link permanent, if the app's receiving the link than sender responsible for the flag.ghisler(Author) wrote: 2022-04-17, 16:48 UTC This happens because Total Commander now sends files to other apps as content: URLs. To make such a link permanent, the target app needs to call a specific function. If it doesn't do that, then Android (not Total Commander!) makes the connection expire.
- ghisler(Author)
- Site Admin
- Posts: 50386
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: EBookDroid revoked permission
The sending app needs to include the flag "FLAG_GRANT_PERSISTABLE_URI_PERMISSION". Total Commander does that. However, the receiving app also needs to call resolver.takePersistableUriPermission(), otherwise the URL will become invalid after restarting the receiving app.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Re: EBookDroid revoked permission
The dev's answer:
_
The flag must be set when you send an answer to requesting app and only if the app requested permanent link. So the flag is permission to make a link permanent.
But if external app (ex. TC) is initiator of sending a document the flag will be not processed by the system at all.
_
So actually I don't know what is correct implementation to resolve the problem
_
The flag must be set when you send an answer to requesting app and only if the app requested permanent link. So the flag is permission to make a link permanent.
But if external app (ex. TC) is initiator of sending a document the flag will be not processed by the system at all.
_
So actually I don't know what is correct implementation to resolve the problem

- ghisler(Author)
- Site Admin
- Posts: 50386
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: EBookDroid revoked permission
The dev seems to mix up some things here. He is on the receiving end of the intent, so if the intent has the flag FLAG_GRANT_PERSISTABLE_URI_PERMISSION set, he just needs to call resolver.takePersistableUriPermission() with the url he received, that's all.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com