Quote:
Originally Posted by stumped
the " read" button mechanism in CC has changed. it now tries to hand off a copy of the book to a reader app ( as per google rules). that may not be possible with your device, for the reader app which is part of the OS.
|
Absolutely true. I wonder if packaging eveything in a single APK has something to do with the ExposedFileUri exception, see below.
Quote:
Originally Posted by ottischwenk
Why the hell was it changed?
|
Because the new CC dev bumped the android API level to be able to push an update to the Google Play Store.
Each API level is tied to certain rules. When you bump the API level you're accepting the new rules, enforced by the android VM.
In this case the new rule is: crash the VM for a given package if an activity or a service try to send the full path of a file outside the boundaries of the application. It generates an ExposedFileUri exception.
Quote:
Originally Posted by stumped
complain to the developers, if you like, or to Google. It was google's idea, to change how apps are allowed to share files, in order to "improve security".
In other threads, weren't you one of the fans of newer android versions, for improved security?. well , welcome to the world of unexpected consequences
|
Improved security I dunno, but makes *some* sense. The app that sends the path has no way to check if the receiving app has permissions to read on that particular directory.
Quote:
Originally Posted by stumped
there's nothing any other user here can do about it.
|
True. Users have nothing to do, but developers can fix that issue. For instance, reading apps can figure out a path from a file provider uri without making a hard copy when the file provider is serving a local file (no dropbox or gdrive). That's what KOReader does.
But it is easier for CC dev to remove that specific VM policy and provide an option to the user. I would implement it this way:
1. Assign the "read" button to the legacy behaviour (send the path of the book)
2. Add a new button "send to" with the new behaviour (send the book itself)
3. Provide an option in settings to enable legacy behaviour
4. If legacy behaviour is not enabled the "read" button will be disabled and the user will notice that he/she is sending the book to the reading app of choice.
Both workarounds (for sending and receiving apps) are showcased in
https://github.com/pazos/filesResolver. Removing the offended VM policy is just adding a few lines to CC app subclass:
https://github.com/pazos/filesResolv...App.kt#L11-L13