Page 1 of 1

EBookDroid revoked permission

Posted: 2022-04-17, 14:33 UTC
by qx87
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?

Re: EBookDroid revoked permission

Posted: 2022-04-17, 16:48 UTC
by ghisler(Author)
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.

Re: EBookDroid revoked permission

Posted: 2022-08-03, 04:11 UTC
by Bvo
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.
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.

Re: EBookDroid revoked permission

Posted: 2022-08-04, 07:49 UTC
by ghisler(Author)
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.

Re: EBookDroid revoked permission

Posted: 2022-08-04, 23:12 UTC
by Bvo
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 :-(

Re: EBookDroid revoked permission

Posted: 2022-08-07, 08:23 UTC
by ghisler(Author)
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.