GithubHelp home page GithubHelp logo

buggins / coolreader Goto Github PK

View Code? Open in Web Editor NEW
374.0 374.0 100.0 49.08 MB

Official site of CoolReader project. Sourceforge repository is obsolete.

License: GNU General Public License v2.0

CMake 1.06% Makefile 0.66% C 33.56% C++ 48.75% CSS 1.04% Java 12.19% Shell 2.06% QMake 0.06% Clarion 0.01% Roff 0.08% sed 0.01% Perl 0.33% Python 0.05% PHP 0.04% M4 0.01% Lua 0.01% NASL 0.03% AIDL 0.06%

coolreader's People

Contributors

andymender avatar avnik avatar band-a-prend avatar buggins avatar data-man avatar dbedrenko avatar dottedmag avatar erofeevk avatar erosennin avatar exl avatar frankyifei avatar isira-seneviratne avatar jellby avatar jperon avatar macnuts avatar niluje avatar norbi24 avatar ourairquality avatar pazos avatar pkb avatar plotn avatar poire-z avatar probonopd avatar radioxoma avatar roshavagarga avatar s-trace avatar simfeo avatar t3d avatar virxkane avatar zwim avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

coolreader's Issues

Android version: slow startup when connection is slow

Due to getting package and in-app purchases of donations from google play, application startup hands on getting this data.
It's needed only in About dialog. Simple fix possible: delay getting donation information until About dialog is open.

Paragraphs inside list items are displayed on a separate line

Here is an HTML file to reproduce the bug:

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr">
<head>
  <meta http-equiv="Content-type" content="application/xhtml+xml; charset=UTF-8" />
  <title>List</title>
</head>
<body>

<ul>
  <li><p>Item 1.</p></li>
  <li><p>Item 2.</p></li>
  <li>Item 3.</li>
  <li><p>Item 4.</p></li>
</ul>

</body>
</html>

I opened it with cr3qt/cr3 and it is displayed as follows:
1

In Firefox, all list items look the same:
1

Same HTML packed in EPUB also displays incorrectly.

3.2.39 (fb2) hidden text formatted with built-in styles

One of historical advantages of CoolReader was the support of styling, including built-in styles for spacing text formatting.

In 3.2.39 this feature is broken.

I.e. file:

<?xml version="1.0" encoding="utf-8"?>
<FictionBook xmlns="http://www.gribuser.ru/xml/fictionbook/2.0" xmlns:l="http://www.w3.org/1999/xlink">
<stylesheet type="text/css">
  style[name="razryadka"] {
  letter-spacing: 0.4em;
  }
</stylesheet>
  <description>
…
<p>One, <style name="razryadka">two</style>, three.</p>
…

Displays only:

One, , three.

coolreader.org is down

Just reporting that coolreader.org apparently is parked by some domains company and also causes both Firefox and my AV to complain:
image

I need help

I want to import him into Android Sudio, but he gave an error. I don't know what I should do next.
image
image
I hope I can get a detailed explanation telling me what the first step should be and what to do in the second step.

Android add momentum in scroll view

In the Android app in scroll view mode, when I lift my finger, the document stop scrolling immediately. It would be nice it if had momentum and kept scrolling a bit after I lift my finger.

Momentum works in the table of contents, options, when browsing through a catalog, and everywhere else that I have had to scroll except for the document reader itself.

Crash on propsApply

1,053 occurences

pid: 0, tid: 0 >>> org.coolreader <<<

backtrace:

#00 pc 00000000000990b6 /data/app/org.coolreader-2/lib/arm/libcr3engine-3-1-2.so (_ZN10LVCacheMapIP8ldomNode5LVRefI14LFormattedTextEE5clearEv+21)
#1 pc 000000000012c315 /data/app/org.coolreader-2/lib/arm/libcr3engine-3-1-2.so (_ZN9LVDocView10propsApplyE9LVFastRefI14CRPropAccessorE+2804)
#2 pc 00000000000746e9 /data/app/org.coolreader-2/lib/arm/libcr3engine-3-1-2.so (Java_org_coolreader_crengine_DocView_applySettingsInternal+304)
#3 pc 00000000000ed615 /data/app/org.coolreader-2/oat/arm/base.odex

3.2.39 broken table view and some others

After updating to 3.2.39 I've find that coolreader begins incorrectly display tables, missing empty lines and change behaviour in display documet's sections.

Previous (expected) view
3 2 2 1-r2

3.2.39 view:
3 2 39

Patch to Fix: Qt5, wxGTK2.8, wxGTK3.0 build fails and some other issues.

Info:
Patch allows to build Coolreader3 with Qt5 or wxWindgets GUI for Linux systems.
Qt5 build early failed due to absence of "-std=c++11 -fPIC" options in ../cr3qt/CMakeLIsts.txt
and absence of Qt5 libraries in linking library list of ../cr3qt/CMakeLIsts.txt.
wxWidgets build early failed due to absence of "fonconfig" in linking library list of ../cr3wx/CMakeLIsts.txt.

Coolreader3 is compiling now both for wxGTK 2.8 and wxGTK 3.0 via internal conditional choosing of wxGTK version.
NOTE: wxGTK-gtk3:3.0 (that is not the same as wxGTK 3.0) is compiling too but GUI is corrupted (for example a toolbar has no icons displaying).

Also...

  • Adding installation of cr3.{desktop, png, xmp} files to add CoolReader3 icon to application menu when WX GUI was compiled.
  • "iCCP: known incorrect sRGB profile" warning popup window when "Toolbar size" is setting to "Medium buttons" in WX GUI application is disabled in patch (
    iccp_known_incorrect_srgb_profile
    )
    This is the temporary solution until upstream of Coolreader3 will fix iCCP profiles of "22x22/*.png" icons. See related wxGTK issue: http://trac.wxwidgets.org/ticket/15331 for more details.
  • The wxWidgets version is displayed now in "About" window of WX GUI.
  • Copyright is changed to appropriate the date of CREngine library release date and date of "CoolReader 3.1.2-71" tag. That is "(c) 1998-2015 Vadim Lopatin" and CREngine build date to "2015-07-02".

Preview of patch (as diff) in Gentoo buggzilla: https://bugs.gentoo.org/attachment.cgi?id=491992&action=diff
Raw (as text): https://629720.bugs.gentoo.org/attachment.cgi?id=491992&action=diff&format=raw

Please do a review of this patch. I hope it will be useful.

Maybe it worth to change "(c) 1998-2015 Vadim Lopatin" to "(c) 1998-2017 Vadim Lopatin" for master branch as patch was made for tag "3.1.2-71" branch of 2015 year.

Or patch with 2017 years dates except of CREngine build date (see attachment coolreader_qt5_wx_build_fix_git_version.txt):

coolreader_qt5_wx_build_fix_git_version.txt

Recognize Energy Sistem eReaders as Eink devices

Hi, first of all, thanks @buggins for your wonderful software!

I see that @virxkane added support for onyx devices. I would like to use a subset of that to add support for energy sistem ereaders (they're just another boyue clone based on rk3026 platform).

I tested that Onyx fast update works on my device by changing device brand and device manufacturer. High quality & fast mode 2 didn't work.

The way to properly detect these devices is

(BRAND.toLowerCase().contentEquals("energysistem") &&  MODEL.toLowerCase().startsWith("ereader"));

If I append that to EINK_ONYX my device is recognized as an onyx and I can switch between e-ink update modes and set an update interval. Since just one mode works I wonder if it is possible to add a new kind of device (for example EINK_RK3026) and don't provide an option to change the update mode in settings.

Switching language in TTS according to the langauge of the document

(this is roughly the same as this Sourceforge bug, but reformulated)

I use CoolReader on Android (the latest version out of F-Droid repository)

I guess there is plenty of people who read books in multiple languages (e.g., majority of those who are native non-English have some English books together with books in their native language). If we want to use TTS on them (and thank you, that Coolreader has actually working FLOSS TTS plugin built-in, contrary to some others who have it as a proprietary add-on), we have to switch language in the system settings otherwise I get a bizzare Czech engine trying to pronounce English, which gets too much pretty fast (or I guess, most maintainers are Russians, I cannot even imagine how the nice Harry Potter fanfiction sounds through the Russian language engine).

Considering that every EPub book have its language defined in dc:language element, it shouldn't be that complicated to pull this information out of it and send it (and possibly reinitialize) TTS engine after the start of new book.

Thank you for quite cool reading program!

Custom font doesn't stick after losing focus [Android]

Android version 3.2.29-1

I've installed, long ago, a TTF font to the subdir of /.cr3/fonts but unfortunately after the app loses focus (goes background) and is called back (foreground) the default font comes back alive.

To resume the custom font I have to go Options >> CSS >> check Enable document internal styles >> resume reading and back to Options unchecking the previous option and then the custom font is back.

The font file is correctly registered and the Font face doesn't change ... it just doesn't stick.

This misbehavior started upon last update.

Please advise if this is not an app issue but a user one.

Thanks.

Document Info dialog

It's useful to see document properties for some document types like epub or fb2.

User request: Hello, is there a possibility to read the metadata of a e-pub file, i alwais insert in calibre information about the book, but i can't find a way to read it in cool reader. Thanks!

chmlib-0001-Patch-to-fix-integer-types-problem-by-Goswin-von-Bre.patch

From be20aa9e5992f371fa0f73be16bb1b145192a428 Mon Sep 17 00:00:00 2001
From: Jed Wing <[email protected]>
Date: Wed, 27 May 2009 18:25:42 -0700
Subject: [PATCH 1/2] Patch to fix integer types problem by Goswin von
 Brederlow.

This came from Goswin von Brederlow <[email protected]> via
Kartik Mistry, the maintainer of the Debian package of chmlib.
diff -ur coolreader-cr3.2.27.orig/thirdparty/chmlib/src/chm_lib.c coolreader-cr3.2.27/thirdparty/chmlib/src/chm_lib.c
--- coolreader-cr3.2.27.orig/thirdparty/chmlib/src/chm_lib.c	2019-01-23 12:15:37.000000000 +0300
+++ coolreader-cr3.2.27/thirdparty/chmlib/src/chm_lib.c	2019-01-25 10:16:13.656735173 +0300
@@ -56,6 +56,7 @@
 
 #include "lzx.h"
 
+#include <stdint.h>
 #include <stdlib.h>
 #include <string.h>
 #ifdef CHM_DEBUG
@@ -154,22 +155,9 @@
 typedef __int64                 Int64;
 typedef unsigned __int64        UInt64;
 
-/* I386, 32-bit, non-Windows */
-/* Sparc        */
-/* MIPS         */
-/* PPC          */
-#elif __i386__ || __sun || __sgi || __ppc__ || __arm__ || __mips__
-typedef unsigned char           UChar;
-typedef short                   Int16;
-typedef unsigned short          UInt16;
-typedef long                    Int32;
-typedef unsigned long           UInt32;
-typedef long long               Int64;
-typedef unsigned long long      UInt64;
-
 /* x86-64 */
 /* Note that these may be appropriate for other 64-bit machines. */
-#elif __x86_64__ || __ia64__ || __aarch64__
++#elif defined(__LP64__)
 typedef unsigned char           UChar;
 typedef short                   Int16;
 typedef unsigned short          UInt16;
@@ -178,10 +166,19 @@
 typedef long                    Int64;
 typedef unsigned long           UInt64;
 
+/* I386, 32-bit, non-Windows */
+/* Sparc        */
+/* MIPS         */
+/* PPC          */
 #else
 
-/* yielding an error is preferable to yielding incorrect behavior */
-#error "Please define the sized types for your platform in chm_lib.c"
+typedef unsigned char           UChar;
+typedef short                   Int16;
+typedef unsigned short          UInt16;
+typedef long                    Int32;
+typedef unsigned long           UInt32;
+typedef long long               Int64;
+typedef unsigned long long      UInt64;
 #endif
 
 /* GCC */

Considerations for other formats

According to https://manual.calibre-ebook.com/faq.html#what-formats-does-calibre-support-conversion-to-from there are other formats that coolreader does not cover.

  • AZW, AZW3 and AZW4 (Amazon Ebooks)
  • CBZ, CBR and CBC (Comic Book Files)
  • DOCX (which is different from DOC)
  • DJVU (a common ebook format)
  • ODT (Open Document, similar to DOCX)

There are also other formats that may be of concern but are more rare.

  • FBZ (which is a ZIP file based on FB2)
  • LIT (Microsoft Ebook format)
  • LRF (Defunct Sony Ebook format)
  • OEB (Open Ebook format)
  • PRC (PDB replacement for Mobipocket)
  • PML (Palm Markup Language)
  • RB (NuvoMedia ebook format)
  • SNB (Samsung galaxy Ebook format)
  • TCR (Psion ebook format)

Would it be possible to implement AZW and Comicbook formats?

P.S. FBReader is a goner, RIP

Android crash

When browsing files or opening a document (after enabling simple folder view).

Honor 6X.

--------- beginning of crash
12-23 12:09:37.581 17654 17708 F libc    : stack corruption detected
12-23 12:09:37.581 17654 17708 E cr3eng  : cr_sigaction(6)
12-23 12:09:37.581 17654 17708 F libc    : Fatal signal 6 (SIGABRT) in tid 17708 (BackgroundThrea)
12-23 12:09:37.582   368   368 W         : debuggerd: handling request: pid=17654 uid=10110 gid=10110 tid=17708
12-23 12:09:37.657 17712 17712 F DEBUG   : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
12-23 12:09:37.657 17712 17712 F DEBUG   : Build fingerprint: 'HONOR/BLN-L21/HWBLN-H:7.0/HONORBLN-L21/C432B369:user/release-keys'
12-23 12:09:37.657 17712 17712 F DEBUG   : Revision: '0'
12-23 12:09:37.657 17712 17712 F DEBUG   : ABI: 'arm64'
12-23 12:09:37.657 17712 17712 F DEBUG   : pid: 17654, tid: 17708, name: BackgroundThrea  >>> org.coolreader <<<
12-23 12:09:37.657 17712 17712 F DEBUG   : signal 6 (SIGABRT), code 0 (SI_USER), fault addr --------
12-23 12:09:37.662 17712 17712 F DEBUG   : Abort message: 'stack corruption detected'
12-23 12:09:37.662 17712 17712 F DEBUG   :     x0   0000000000000000  x1   000000000000452c  x2   0000000000000006  x3   0000000000000008
12-23 12:09:37.662 17712 17712 F DEBUG   :     x4   00000078c7994a98  x5   0080008080808080  x6   0000000000000000  x7   0000000000000010
12-23 12:09:37.662 17712 17712 F DEBUG   :     x8   0000000000000083  x9   ffffffffffffffdf  x10  0000000000000000  x11  0000000000000001
12-23 12:09:37.662 17712 17712 F DEBUG   :     x12  ffffffffffffffff  x13  0000000000000000  x14  0000000000000000  x15  0008a99c4140a741
12-23 12:09:37.662 17712 17712 F DEBUG   :     x16  00000078d1a4dec8  x17  00000078d19f6c28  x18  0000000000000000  x19  00000078c79974f8
12-23 12:09:37.662 17712 17712 F DEBUG   :     x20  0000000000000006  x21  00000078c7997450  x22  0000000000000002  x23  00000078cda20a7e
12-23 12:09:37.662 17712 17712 F DEBUG   :     x24  000000000000000c  x25  da0f2733ba6088a7  x26  00000078aca1aa98  x27  da0f2733ba6088a7
12-23 12:09:37.662 17712 17712 F DEBUG   :     x28  0000000000000003  x29  00000078c7994d10  x30  00000078d19f40d0
12-23 12:09:37.662 17712 17712 F DEBUG   :     sp   00000078c7994cf0  pc   00000078d19f6c30  pstate 0000000060000000
12-23 12:09:37.666 17712 17712 F DEBUG   : 
12-23 12:09:37.666 17712 17712 F DEBUG   : backtrace:
12-23 12:09:37.666 17712 17712 F DEBUG   :     #00 pc 000000000006bc30  /system/lib64/libc.so (tgkill+8)
12-23 12:09:37.666 17712 17712 F DEBUG   :     #01 pc 00000000000690cc  /system/lib64/libc.so (pthread_kill+64)
12-23 12:09:37.666 17712 17712 F DEBUG   :     #02 pc 0000000000023e68  /system/lib64/libc.so (raise+24)
12-23 12:09:37.666 17712 17712 F DEBUG   :     #03 pc 000000000001c8ec  /system/lib64/libc.so (abort+52)
12-23 12:09:37.666 17712 17712 F DEBUG   :     #04 pc 0000000000020e74  /system/lib64/libc.so (__libc_fatal+104)
12-23 12:09:37.666 17712 17712 F DEBUG   :     #05 pc 000000000006ab14  /system/lib64/libc.so (__stack_chk_fail+16)
12-23 12:09:37.666 17712 17712 F DEBUG   :     #06 pc 00000000000976cc  /data/app/org.coolreader-1/lib/arm64/libcr3engine-3-1-1.so (_ZN14JNIGraphicsLib4lockEP7_JNIEnvP8_jobject+368)
12-23 12:09:37.666 17712 17712 F DEBUG   :     #07 pc 000000000009b7d0  /data/app/org.coolreader-1/lib/arm64/libcr3engine-3-1-1.so (Java_org_coolreader_crengine_DocView_getPageImageInternal+212)
12-23 12:09:37.666 17712 17712 F DEBUG   :     #08 pc 00000000000f6154  /data/app/org.coolreader-1/oat/arm64/base.odex (offset 0xef000)

That's all the info I have right now.

signed integer overflow: -1909805408 * 31 cannot be represented in type 'int'

Built on debian sid using the method in README.

After sudo make install:

$ cr3
2019/03/29 23:57:14.5992 WARN Changing log level from 3 to 1
/tmp/coolreader/crengine/src/lvstring.cpp:101:42: runtime error: signed integer overflow: -1909805408 * 31 cannot be represented in type 'int'
Fatal Error: Cannot open font file(s) .ttf 
Cannot work without font
Cannot init CREngine - exiting

In-App refresh for eInk devices

Hey,

I am not sure whether you're aware that your CoolReader has grown pretty popular on the german Tolino eReader device. It ships with a closed source standard app that is alright in terms of usage, but also has some restrictions you obviously can't fix. That's why many users use a little workaround to install alternative reader apps such as yours.

Anyway, along with the recent update Android has been updated to 4.4.2 which moved the eInk display refresh from the system's responsibilities to the app's. This means that you quickly run into serious ghosting on the display.

Are you by any chance planning to implement some functionality to overcome this problem in the near future? I'm pretty new to eInk and I can't properly gauge how much effort this would be for you. I can, however offer you to run tests on my device if that helps in any way.

Lukas

chmlib-0002-Fix-for-extract_chmLib-confusing-empty-files-with-di.patch

From 5998ff5105a9cd3f684519927e2ac78d3b6a3c30 Mon Sep 17 00:00:00 2001
From: Jed Wing <[email protected]>
Date: Wed, 27 May 2009 18:41:10 -0700
Subject: [PATCH 2/2] Fix for extract_chmLib confusing empty files with
 directories.

Patch from Paul Wise <[email protected]> via Kartik Mistry, the maintainer of the
Debian chmlib package.
diff -ur coolreader-cr3.2.27.orig/thirdparty/chmlib/src/extract_chmLib.c coolreader-cr3.2.27/thirdparty/chmlib/src/extract_chmLib.c
--- coolreader-cr3.2.27.orig/thirdparty/chmlib/src/extract_chmLib.c	2019-01-23 12:15:37.000000000 +0300
+++ coolreader-cr3.2.27/thirdparty/chmlib/src/extract_chmLib.c	2019-01-25 10:20:10.216753482 +0300
@@ -102,6 +102,7 @@
               struct chmUnitInfo *ui,
               void *context)
 {
+    LONGUINT64 ui_path_len;
     char buffer[32768];
     struct extract_context *ctx = (struct extract_context *)context;
     char *i;
@@ -119,7 +120,11 @@
     if (snprintf(buffer, sizeof(buffer), "%s%s", ctx->base_path, ui->path) > 1024)
         return CHM_ENUMERATOR_FAILURE;
 
-    if (ui->length != 0)
+    /* Get the length of the path */
+    ui_path_len = strlen(ui->path)-1;
+
+    /* Distinguish between files and dirs */
+    if (ui->path[ui_path_len] != '/' )
     {
         FILE *fout;
         LONGINT64 len, remain=ui->length;

Need `libintl_gettext` on musl libc

The musl libc doesn't have the libintl_gettext symbol builtin, I think you should manually link -lintl or find gettext, I'm not sure.

/home/user/ereader-buildroot/output/host/lib/gcc/arm-buildroot-linux-musleabihf/4.9.4/../../../../arm-buildroot-linux-musleabihf/bin/ld: ../crengine/libcrengine.a(cri18n.cpp.o): undefined reference to sym
bol 'libintl_gettext'
/home/user/ereader-buildroot/output/host/lib/gcc/arm-buildroot-linux-musleabihf/4.9.4/../../../../arm-buildroot-linux-musleabihf/bin/ld: /home/user/ereader-buildroot/output/host/arm-buildroot-linux-muslea
bihf/sysroot/usr/lib/libintl.so.8: error adding symbols: DSO missing from command line

Android: app crashes while running TTS in backgroud

Sympthoms

  • While TTS is running in the background the app crashes frequently.
  • The current position is not remembered. It's required to search the position manually once the app is started again.
  • If the user's ViewMode setting is "Pages" before the crash, then it's overwritten with the setting "Scroll" that is temporarily active during the TTS processing.

Assumptions

  • The CoolReader instance is killed by the system to release the resources.

Tried measures

  • Disabling energy saving for CoolReader doesn't help.
  • Disabling energy saving in the mobile device doesn't help.

Affected devices:

  • Samsung Galaxy Note 3
  • Samsung Galaxy Note 4
  • Samsung Galaxy Note 9

It looks like the issue is a common one.

Suggestion of the solution
Adding optional notification which should be active in the notification area while TTS is running.

Effects:

  • Preventing CoolReader from being killed by the OS
  • Possibility of functional improvement - placing TTS playback buttons (Play/Pause, Stop, Next, ...)

spurious-executable-perm

coolreader3-debuginfo.x86_64: W: spurious-executable-perm /usr/src/debug/coolreader-cr3.2.27/crengine/src/hyphman.cpp

coolreader3-debuginfo.x86_64: W: spurious-executable-perm /usr/src/debug/coolreader-cr3.2.27/crengine/src/lvrend.cpp

coolreader3-debuginfo.x86_64: W: spurious-executable-perm /usr/src/debug/coolreader-cr3.2.27/crengine/src/lvtextfm.cpp

Merge with KOReader fork of crengine

KOReader developers (ping @Frenzie @poire-z) maintain a fork of crengine: https://github.com/koreader/crengine/ Quick diff shows that there are list item display fixes (see #90), several new CSS properties support, fix for <cite> bug (https://sourceforge.net/p/crengine/bugs/268/) and other enhancements. Are there any plans to merge these fixes back into coolreader?

Related issue about another fork: koreader/crengine#267

(KOReader is great, but it focuses on e-ink devices, so it does not even support changing background color. For this reason, it can't be used as a drop-in replacement for CoolReader on Android.)

Cannot open very large books

From the last Android Market update, I cannot open very large books anymore. The reader hangs at the last tick of "formatting document".

Android: processIntent is broken for Intent.ACTION_VIEW if the scheme of the uri is content.

The behaviour is not something new, but each day is more common because of the uriExposedException on api level 24+. That makes most filemanagers forced to feed a content scheme via a fileProvider.

I see you're trying to figure out the file path in https://github.com/buggins/coolreader/blob/master/android/src/org/coolreader/CoolReader.java#L298-L354. This fails on most filemanagers, which leds to a message like:

device-2020-01-27-211748

On KOReader we use a workaround for figuring out the path of a file shared via fileProvider. That should work on Coolreader too.

The implementation is here

On our case if the uri contains a content that cannot be resolved to a file path we just return null and avoid further processing. In the case of Coolreader it could do the same or, alternatively, import the file. Again, the code for doing that in ko is available here

Please @virxkane, @buggins , consider that. At least the workaround to figure the file path.

Improper ONYX BOOX i63ML Newton detection

ONYX BOOX i63ML Newton not being detected as EINK_ONYX. This commit is too strict. My devise brand is 'MacCenter' (not 'maccentre') and manufacturer is 'Onyx-Intl' (not 'onyx'). Here the build.prop's from latest two Newton i63ML firmwares 2014-08-25-update-050fb06.zip, 2016-01-27-update-e346d7e.zip:

    ro.product.model=I63MLP_HD
    ro.product.brand=MacCenter        # Not 'maccentre'
    ro.product.name=I63MLP_HD
    ro.product.device=I63MLP_HD
    ro.product.board=I63MLP_HD
    ro.product.cpu.abi=armeabi-v7a
    ro.product.cpu.abi2=armeabi
    ro.product.manufacturer=Onyx-Intl    # Not 'onyx'. May be use `manufacturer.startsWith("onyx")`?
    ro.product.locale.language=ru
    ro.product.locale.region=RU

When I manually changed two strings in my build.prop (rooted device), CoolReader been able to successfully set a contrast theme and show some screen update settings.

Cannot compile on Linux

This is my Travis CI build script:
https://github.com/probonopd/coolreader/blob/patch-1/.travis.yml

This is the complete build log:
https://api.travis-ci.com/v3/job/199509649/log.txt

At global scope:
cc1plus: warning: unrecognized command line option "-Wno-misleading-indentation" [enabled by default]
[ 55%] Linking C static library libharfbuzz-subset.a
[ 55%] Built target harfbuzz-subset
[ 55%] Building CXX object crengine/CMakeFiles/crengine.dir/src/lvstream.cpp.o
In file included from /home/travis/build/probonopd/coolreader/crengine/src/../include/lvstream.h:32:0,
                 from /home/travis/build/probonopd/coolreader/crengine/src/lvstream.cpp:27:
/home/travis/build/probonopd/coolreader/crengine/src/../include/lvstring.h: In function ‘void LVRemovePathDelimiter(lString8&)’:
/home/travis/build/probonopd/coolreader/crengine/src/../include/lvstring.h:375:6: warning: assuming signed overflow does not occur when assuming that (X - c) > X is always false [-Wstrict-overflow]
      if (pos > pchunk->len)
      ^
/home/travis/build/probonopd/coolreader/crengine/src/../include/lvstring.h:375:6: warning: assuming signed overflow does not occur when assuming that (X - c) > X is always false [-Wstrict-overflow]
      if (pos > pchunk->len)
      ^
make[1]: *** [crengine/CMakeFiles/crengine.dir/all] Error 2
make: *** [all] Error 2

Support for eink in Boyue RK3386 devices

Hi, First of all, thanks a lot for your great work @buggins. CR is amazingly good.

I realized that CoolReader and Koreader don't refresh the screen in this device (boyue T103D "Likebook Mimas") and I found in the BoyueLauncher.apk some potentially useful classes in case it could be possible to add support for this device.
In the boyueOS app (boyuelauncher.apk) in Classes.DEX (com.boyue.api.impl )
screenshot_20190221-120831

The link of the APK
boyuelauncher.zip

Tell me if there's something else I could do to help.
And thanks in advance.
The koreader issue
koreader/koreader#4595

edit: rephrasing and correction.

Android: dictionary mode

When dictionary mode is on, single touch on word opens dictionary.
For turning pages in this mode, use swipe.
For opening menu, use long tap on any tap zone.

Orbot HTTP Error 405

I'm trying to use Tor onion service as OPDS catalog through Orbot, but getting an HTTP Error 405 (Method Not Allowed). Resent Orbot version from F-Droid (16.0.5) provides VPN, so, may be it's better to get rid of all onion-link related code and implicit proxy handling?

Similar issue on 4pda.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.