document-viewer icon indicating copy to clipboard operation
document-viewer copied to clipboard

Target at least API level 26 for new Google Play Release

Open robsmith11 opened this issue 5 years ago • 14 comments

Latest version on Google Play is 2 versions behind the release in F-Droid. I'm guessing most people install from Google Play, so would be good to update it.

robsmith11 avatar Nov 27 '18 00:11 robsmith11

Is the project stalled...? Please don't let it die, there's really no (open source) alternative for this great app! @ericwa

ghost avatar Dec 14 '18 13:12 ghost

It looks like @ericwa was the last active committer. Maybe he can comment?

I'd give it a shot to update the code and build it, but I've never done any Android or mobile development, so the size of this project is a bit intimidating.

robsmith11 avatar Dec 15 '18 02:12 robsmith11

Hi. @dschuermann handles the Google Play account for this app. Should we / would it be much trouble to push v2.8.1 to Google Play? It's been on F-Droid for a while (Dec 2017).

I still use this app a lot, just haven't had time / motivation to work on it recently. I'd like to at least fix crash bugs reported on Android 8.1.

ericwa avatar Dec 15 '18 08:12 ericwa

Hey, I fixed the build for the newest NDK, but I wasn't able to upload the new apks, because Google now requires us to target API level 26. I suspect this requires more testing. If anyone wants to take a shot, go for it.

Your app currently targets API level 22 and must target at least API level 26 to ensure it is built on the latest APIs optimized for security and performance. Change your app's target API level to at least 26. Learn how.

dschuermann avatar Dec 19 '18 17:12 dschuermann

Cool - thanks. So the big hurdle as far as I can see is, to target API 23+, we need to ask permission at runtime for the READ_EXTERNAL_STORAGE / WRITE_EXTERNAL_STORAGE permissions.

https://developer.android.com/about/versions/marshmallow/android-6.0-changes https://developer.android.com/guide/topics/permissions/overview#dangerous_permissions

Also looks like file:// Intents were disabled in Android 7.0 between packages (not sure if this would affect us?) https://developer.android.com/about/versions/nougat/android-7.0-changes#permfilesys

That's all I noticed from the Android 6 though 9 changes that sounded relevant.

ericwa avatar Dec 21 '18 02:12 ericwa

Is anyone using this app on Android 9?

I'd like to upgrade my phone and tablet from Android 8, but wondering if I should wait until the API upgrades are complete. Reading PDFs is so much nicer with this app, so wouldn't want to lose it if it's unusable with Aneroid 9..

robsmith11 avatar Mar 05 '19 23:03 robsmith11

I made a bit of progress with targeting API 28. It's a hacky solution, but there's a new main activity that asks for permission for WRITE_EXTERNAL_STORAGE before launching the original RecentActivity (the bookshelf activity.) At least I can launch the app on the Android Q emulator and have my pdf's in /sdcard show up and the pdf's can be viewed.

It seems to be crashing often when closing a PDF and returning to the bookshelf, with:

2019-03-15 02:26:00.654 6291-6305/org.sufficientlysecure.viewer A/libc: Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x695f6775 in tid 6305 (FinalizerDaemon), pid 6291 (lysecure.viewer)

Not sure what's going on here..

ericwa avatar Mar 15 '19 08:03 ericwa

Just a wild guess, but is it related to JSON deserialization?

There seem to be a few similar crashes reported with JSON libraries: https://stackoverflow.com/questions/46340947/segv-maperr-since-android-7 https://stackoverflow.com/questions/28110943/retrofit-native-crash-fatal-signal-11-sigsegv

robsmith11 avatar Mar 16 '19 05:03 robsmith11

Is it possible to publish an APK with the latest fixes? Even if it sometimes crashes when closing books, it might be an improvement for some users.

robsmith11 avatar May 17 '19 16:05 robsmith11

Hi, people.

On Fri, May 17, 2019 at 1:58 PM robsmith11 [email protected] wrote:

Is it possible to publish an APK with the latest fixes? Even if it sometimes crashes when closing books, it might be an improvement for some users.

I agree completely. Even if there are some known issues/bugs, a new version uploaded to the Play Store and to F-Droid would be very helpful to some users.

If I happen to have some time available (and, most importantly, an appropriate environment at my disposal), I would like to take a look at removing the restriction that the screen should have an aspect ratio of 16:9 (I have a tablet that has a different aspect ratio and some part of the screen is left unused/padded).

Well, that's it for now.

Thank you,

Rogério Brito.

-- Rogério Brito : rbrito@{ime.usp.br,gmail.com} : GPG key 4096R/BCFCAAAA http://cynic.cc/blog/ : github.com/rbrito : profiles.google.com/rbrito DebianQA: http://qa.debian.org/developer.php?login=rbrito%40ime.usp.br

rbrito avatar May 21 '19 20:05 rbrito

Maybe it's worth making a CI script. E.g. Travis CI allows downloading the compiled APKs.

ildar avatar May 23 '19 11:05 ildar

It seems to be crashing often when closing a PDF and returning to the bookshelf, with:

2019-03-15 02:26:00.654 6291-6305/org.sufficientlysecure.viewer A/libc: Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x695f6775 in tid 6305 (FinalizerDaemon), pid 6291 (lysecure.viewer)

Not sure what's going on here..

@ericwa

I think I have found a solution after 2 days of digging through the SIGSEGV error without getting anywhere. What surprised me, is that mupdf in palystore which is still using mupdf v1.11 library does not crash (mupdf that has annotations and highlight; not the mupdf mini nor mupdf viewer since those mini and viewer have been already updated to v1.15).

So I tried the following in the settings of the app and solved the issue of crashes on Android 10 emulator: Performance settings -> Pages in Memory -> anything other than the default 0 (tested 1,4,16 all working fine).

And btw, the crash issue happens in the older version of document viewer app that is present in playstore , and not just after your upgrade of Target SDK to 28. I have tested both.

Can you confirm that this solves the crash issue for you as well? I think Android 8,9,10 are affected.

Few questions:

  1. Does this parameter mean how many pages are stored for already rendered pages that have been viewed recently from the pdf file?

  2. Is there any issues with my setting of this parameter as the default? Let's say if I make it 4 , does it have any problems with older devices?

  3. What does 0 value even mean?

hwasiti avatar Jul 18 '19 03:07 hwasiti

FYI for others experiencing crashes.. I just tried out another document reader that is actively developed, also open source, and supports just as many if not more features and file formats:

https://f-droid.org/en/packages/com.foobnix.pro.pdf.reader/

I don't mean to offend the SufficientlySecure devs -- they created an awesome app -- but it seems lately they are busy with other areas of their lives, so perhaps it's time to move on to another app.

robsmith11 avatar Nov 28 '19 21:11 robsmith11

I agree that the development of this document-viewer has been slower than before. My pull request on Jul 2018 that solved most reported crashes for Android 8 and above still have not been Merged after 1 year. Despite that the rating in playstore decreased dramatically because of this crash, where the solution is very easy with my pull request.

I have looked into librera app, and indeed it has way more features. However, the disadvantage is the crowded gui, which makes using it a bit complicated. And while it supports even highlighting with multi color, but it is complicated to use at best, and usually buggy.

hwasiti avatar Dec 08 '19 10:12 hwasiti