|
|
Thread Tools | Search this Thread |
09-23-2020, 12:53 PM | #1 |
Connoisseur
Posts: 64
Karma: 144
Join Date: Aug 2019
Device: Tolino Vision HD4, BOOX Poke2
|
Starting KOReader from CC works only if KOReader was not running before
I have Calibre Companion 5.4.4.19 on Onyx BOOX Poke 2 (Android 9)
and I use to open books directly from CC by clicking the Read button there to open Koreader (2020.08.01) with that book. But this works only if Koreader was not running before, if KOReader was already open with another book before, it remains hanging. I've collected logcat logs to see what is going on and see that CC starts Koreader apparently with this: I ActivityManager: START u0 {act=android.intent.action.VIEW dat=content://com.multipie.calibreandroid.provider/external/Calibre_Companion/Después del amor - Sonsoles Ónega.epub typ=application/epub+zip flg=0x10008001 cmp=org.koreader.launcher/.MainActivity} from uid 10083 and then, if KOreader was not running before I see later that it gets started and it opens. If it was already open before, it shows these lines: KOReader: Engine thread destroy requested! KOReader: got error waiting for events: ffi/input_android.lua:168: application forced to quit and then it hangs ... Not a huge problem for me as I know it, but perhaps easy to solve ? Btw, I observed the same behaviour on my Samsung S7 mobile with Android 8 so it is not specific to Onyx device Thanks, Norbert |
09-23-2020, 01:20 PM | #2 | |
cosiñeiro
Posts: 1,254
Karma: 2189337
Join Date: Apr 2014
Device: BQ Cervantes 4
|
Quote:
See if you can reproduce with any recent-ish filemanager on your device. If you can reproduce that's a fw thing. If not it is probably a CC thing. The expected behaviour is a) file can be opened both with the program running or not. (If the device is too fast you won't see the "opening xxx" message but that's all) b) some apps that serve content with a non standard file provider will open KO but won't open the new book, so you'll see the last screen, like if you bring KO back to the front. |
|
Advert | |
|
09-23-2020, 01:46 PM | #3 |
BLAM!
Posts: 13,477
Karma: 26012464
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
Is the obvious encoding issue in the filename relevant here? (i.e., does files with low-ascii only filenames behave?)
|
09-23-2020, 03:11 PM | #4 |
cosiñeiro
Posts: 1,254
Karma: 2189337
Join Date: Apr 2014
Device: BQ Cervantes 4
|
|
09-24-2020, 04:19 AM | #5 |
Connoisseur
Posts: 64
Karma: 144
Join Date: Aug 2019
Device: Tolino Vision HD4, BOOX Poke2
|
I have just tried to start KOReader from Filemanager+ - and there it works fine !
But on the other hand, if I do the same from CC but set it up to open a book with ALReader or with Neoreader then it works there also ... I mean if ALreader is already open I am still able to open a new book in it from CC. I did a logcat from my attempts with Filemanager+ - at the first glance, it looks like that the command is almost the same - except for the flg property ... with Filemanager+ it is flg=0x10000003, and CC sets it to flg=0x10008001, not sure whether this can make the difference ? From Filemanager+ (full log is also attached) ActivityManager: START u0 {act=android.intent.action.VIEW dat=content://com.alphainventor.filemanager.fileprovider/root/storage/emulated/0/Calibre_Companion/Como polvo en el viento - Leonardo Padura.epub typ=application/epub+zip flg=0x10000003 cmp=org.koreader.launcher/.MainActivity} from uid 10081 |
Advert | |
|
09-24-2020, 05:35 AM | #6 | ||
cosiñeiro
Posts: 1,254
Karma: 2189337
Join Date: Apr 2014
Device: BQ Cervantes 4
|
Quote:
When a program receives an intent with a content uri it is expected to copy the stream and save it into its own file (thus making a copy). That's how all programs work (including MoonReader, Readera, Pocketbook, AlReader?) KOReader tries to resolve the absolute path of the file without making a copy. From the log attached: Code:
09-24 10:05:10.137 3224 3239 V KOReader: [FileUtils] trying to resolve a file path from content delivered by com.alphainventor.filemanager.fileprovider 09-24 10:05:10.151 3224 3239 I KOReader: intent file path /storage/emulated/0/Calibre_Companion/Conversaci├│n en La Catedral - Mario Vargas Llosa.epub The trick works fine with most file providers and, since KOReader is not in the play store, will continue to work as is, as we're not forced to bump target API each few months to publish updates. Quote:
TL;DR: If you manage to reproduce the same bug on a different (non onyx) device we can discard fw quirks and point fingers to CC. OTOH if you reproduce the bug on other apps while opening books in KO we can discard CC bugs and see if we can find a -non hackish - workaround. If the issue just affects CC I won't try to fix it. Use a chaley version of it, which will start the activity with a file uri scheme and won't require the "guess-the-path" workaround. |
||
09-24-2020, 10:21 AM | #7 |
Connoisseur
Posts: 64
Karma: 144
Join Date: Aug 2019
Device: Tolino Vision HD4, BOOX Poke2
|
Hola Pazos,
Thanks a lot for explanation. For me also it looks it's something with CC, as in my understanding would there be occuring any issue with guessing the path, then it should be never working ... Meanwhile, I have installed Calibre Sync as per recommendation from another user in the CC forum, and there everything works like a charm ! And it has for me somehow more logical UI ... will start with it so am not interested anymore in CC |
09-24-2020, 12:10 PM | #8 |
Junior Member
Posts: 9
Karma: 10
Join Date: Sep 2018
Device: Nook Glowlight 3, Boox Leaf 2, Boox Note Air2 Plus
|
I've observed the same behavior of CC and KOReader on a Likebook Mars
|
Thread Tools | Search this Thread |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
KOReader running on BQ/Fnac devices | pazos | KOReader | 64 | Yesterday 04:59 PM |
Koreader running on Kobos (all of them, hopefully!) | giorgio130 | KOReader | 3517 | 02-25-2024 04:53 PM |
Running dropbox sync from within KOReader? | ctop | Kobo Developer's Corner | 1 | 01-30-2020 11:33 AM |
Koreader not starting on Kobo Touch 2.0 | SUNGOLD | Kobo Reader | 2 | 09-21-2018 03:57 AM |
Upon Starting Koreader directed to wifi | Kristoffer_1 | KOReader | 6 | 09-12-2018 12:10 PM |