Mobileread
Open pdfs in Moon+ Reader without importing/copying
#1  memokun 08-30-2020, 02:08 PM
I use Calibre Companion to organize my books and want to use Moon+ Reader only for reading. When I open a PDF though, it copies the file to its default directory, and when I open it again, it asks if I want to overwrite the file. Is there any way to just open the file directly from where CC has saved it without importing/copying it?

(It's not a CC issue, Moon+ Reader behaves the same way when I open a PDF from a file manager.)
Reply 

#2  pazos 08-30-2020, 02:27 PM
This is the Google way of doing things since android 7.1.

Cannot be fixed. You can still open files directly with old versions of applications. For instance https://f-droid.org/en/packages/com.amaze.filemanager/ will open the file in Moon Reader without making a copy.

The same happens with old versions of CC (up to 5.3, IIRC)

There's a workaround that app devs can implement to fight against it, but is not recommended for Play Store applications, specially looking at the near future with forced scoped storage.
Reply 

#3  memokun 08-30-2020, 02:52 PM
Should have guessed ��
Thanks for the explanation, though!
One more question: How come it can open epubs without asking whether to overwrite them?
Reply 

#4  pazos 08-30-2020, 05:02 PM
Quote memokun
Should have guessed ��
Thanks for the explanation, though!
One more question: How come it can open epubs without asking whether to overwrite them?
Sorry, I don't know. I'm not a heavy user of Moon+. But probably there's an option somewhere to avoid the question and just overwrite the file.
Reply 

#5  Nigol 09-14-2020, 07:43 PM
Quote pazos
This is the Google way of doing things since android 7.1.

Cannot be fixed. You can still open files directly with old versions of applications. For instance https://f-droid.org/en/packages/com.amaze.filemanager/ will open the file in Moon Reader without making a copy.

The same happens with old versions of CC (up to 5.3, IIRC)
Not entirely true, was just looking for a way to stop this behavior. I am also a user of CC but use ReadEra instead. When opening from CC both Moon & ReadEra will make a copy of the file, but when opening a file from a file manager (I tried OnePlus File Manager, Solid Explorer & Samsung My Files) and opening it with ReadEra does not create a copy but opens it directly. The only one that did do a copy was Google Files I had preinstalled on my OnePlus.

So does this mean that Samsung, OnePlus and Solid Explorer are all doing thing that they shouldn't? And why does it do a copy when opening from CC? I am guessing it's something CC (and Google obviously) does explicitly when calling it's Intent, it's sending a copy and all other file manager might just be using an older way that still works. When opening a file in ReadEra it will say Processing Request if it's only opening the file and Downloading File if it's creating a copy, so it's clearly receiving different signals when opening a file. And in Moon's case they just decided to do their own thing and copy the files either way.

It's really annoying and kind of defeats the purpose of Calibre Companion, that should be an Organizer and your other apps Reader only, but now whenever you open a file it creates a copy in your Download folder (for ReadEra), and you then have multiple copies. Because instead of using CC, we could just use the Reader directly to manage the files so there will be no need to create a copy.
Reply 

#6  pazos 09-15-2020, 04:59 AM
Faith is not involved here. Just code.

Workarounds are possible and implemented in https://github.com/pazos/filesResolver. KOReader implements the first workaround and MoonReader the second one.

Google engineers also expected workarounds from "lame" internal apps: https://github.com/aosp-mirror/platform_frameworks_base/blob/a4ddee215e41ea232340c14ef92d6e9f290e5174/core/java/android/os/StrictMode.java#L1434
Reply 

Today's Posts | Search this Thread | Login | Register