Code Monkey home page Code Monkey logo

epub_viewer's Introduction

Hi there 👋🏾

I am a Software Engineer focused on Flutter💙 and Javascript💛. Also a Google Developer Expert for Flutter

              

epub_viewer's People

Contributors

ameteku avatar bkoznov avatar elmissouri16 avatar imgbotapp avatar jideguru avatar jobic10 avatar munjata 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  avatar

epub_viewer's Issues

Custom pop up menu

Issue / Feature -

How to implement custom pop-up menu, such as highlight, note, and can I add menu options myself?
Is the WebView used to show the content of chapter

Platform (android, iOS or both) - both
Crash / Error -
Steps to reproduce / Describe in detail -

file cannot open on ios

Issue / Feature -
Platform (android, iOS or both) - ios
Crash / Error -
Screen Shot 2020-10-13 at 10 05 01

Simulator Screen Shot - iPhone SE (2nd generation) - 2020-10-13 at 10 02 43

Steps to reproduce / Describe in detail -

flutter_webview

Hello, I would like to ask how to customize the pop-up menu of selected text in flutter_webview

Folio version

Hi,

thank you for your efforts on this project. I wanted to know where does this version comes from
com.jideguru:folioreader:0.6.1

Do you have an active fork for us to see the code changes.

thank you for the great work.

Note: C:\src\flutter\.pub-cache\hosted\pub.dartlang.org\epub_viewer-0.1.7\android\src\main\java\com\jideguru\epub_viewer\EpubViewerPlugin.java uses unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details.

Issue / Feature -
Platform - Anroid
Crash / Error - Note: C:\src\flutter.pub-cache\hosted\pub.dartlang.org\epub_viewer-0.1.7\android\src\main\java\com\jideguru\epub_viewer\EpubViewerPlugin.java uses unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details.

i running project in release mode. these is writing in console. can you solve this issue ?

Running Gradle task 'assembleRelease'...
Note: C:\src\flutter.pub-cache\hosted\pub.dartlang.org\epub_viewer-0.1.7\android\src\main\java\com\jideguru\epub_viewer\EpubViewerPlugin.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.

Running Gradle task 'assembleRelease'...
Running Gradle task 'assembleRelease'... Done 548.6s (!)
√ Built build\app\outputs\flutter-apk\app-release.apk (14.4MB).
Installing build\app\outputs\flutter-apk\app.apk... 4.7s

Flutter run key commands.
h Repeat this help message.
c Clear the screen
q Quit (terminate the application on the device).
I/flutterEbookAp(11876): Reinit property: dalvik.vm.checkjni= false
E/flutterEbookAp(11876): Not starting debugger since process cannot load the jdwp agent.
I/flutterEbookAp(11876): QarthPatchMonintor::Init
I/flutterEbookAp(11876):
I/flutterEbookAp(11876): QarthPatchMonintor::StartWatch
I/flutterEbookAp(11876):
I/flutterEbookAp(11876): QarthPatchMonintor::WatchPackage: /data/hotpatch/fwkhotpatch/
I/flutterEbookAp(11876):
I/flutterEbookAp(11876): QarthPatchMonintor::CheckAndWatchPatch: /data/hotpatch/fwkhotpatch/dev.jideguru.flutterEbookApp
I/flutterEbookAp(11876):
I/flutterEbookAp(11876): QarthPatchMonintor::CheckAndWatchPatch: /data/hotpatch/fwkhotpatch/all
I/flutterEbookAp(11876):
I/flutterEbookAp(11876): QarthPatchMonintor::Run
I/flutterEbookAp(11876):
I/flutterEbookAp(11876): QarthPatchMonintor::Reading
I/flutterEbookAp(11876):
I/flutterEbookAp(11876): QarthPatchMonintor::CheckNotifyEvent
I/flutterEbookAp(11876):
I/flutterEbookAp(11876): QarthPatchMonintor::CheckNotifyEvent before read
I/flutterEbookAp(11876):

Blank screen is shown when epub_viewer initiates.

Issue / Feature - Blank screen is shown when epub_viewer initiates.
Platform (android, iOS or both) -
Crash / Error - The app crashes when the drawer is clicked.

Steps to reproduce / Describe in detail -
Screenshot 2020-09-30 at 12 35 04 AM

Screenshot disable / copy share option disable

The plugin is awesome. Loved the work!
Issue / Feature -Is it possible to add feature which disables screenshots. I have disbaled with secure flags in manifest file but screenshots are still enabled on the plugin. Also want to disable the copy and share option. Is there anyway I could tweak the android files somewhere?
Platform (android, iOS or both) - Looking for android currently. Both will be cool.
Crash / Error -

Steps to reproduce / Describe in detail -

Custom Fonts

Can we add custom fonts ? . I want to add different Unicode fonts for "Kannada" language . If yes what should be the extensions of font file ?

Dart based epub reader

What are the challenges in writing a pure epub reader/viewer using dartlang instead of using a native plugin ?

Bookmark

Issue / Feature - Feature
Platform (android, iOS or both) - Android preferably

Steps to reproduce / Describe in detail -

Bookmark feature is not available in folioreader, can this be achieved here? One way I was thinking to store the last location on some button press, is this possible, any insight would be helpful.

Search and Config menus are not shown

Issue / Feature
When I add the package to my app, the search and config menus are not shown in the appbar, instead an overflow menu is shown with "Go Back". The sample app and the FlutterEbookApp are working fine. I don't know what am I missing.

Platform (android, iOS or both)
Android - didn't check on iOS

**Steps to reproduce / Describe in detail **
I'm following the tutorial. I don't know what am I missing:

app\build.gradle

buildTypes {
        release {
            signingConfig signingConfigs.signConfig
            minifyEnabled false
            shrinkResources false
        }
        debug {
            minifyEnabled false
            shrinkResources false
        }
    }

pubsec.yaml

dependencies:
  flutter:
    sdk: flutter
...
  epub_viewer: ^0.1.9

Usage:

EpubViewer.setConfig(
                            identifier: 'androidBook',
                            themeColor: Theme.of(context).accentColor,
                            scrollDirection: EpubScrollDirection.VERTICAL,
                            enableTts: false,
                            allowSharing: true,
                          );
                          await EpubViewer.openAsset(
                            'assets/TheSilverChair.epub',
                          );

// Get locator which you can save in your database
                          EpubViewer.locatorStream.listen((locator) {
                            print(
                                'LOCATOR: ${EpubLocator.fromJson(jsonDecode(locator))}');
                            // convert locator from string to json and save to your database to be retrieved later
                          });

Pages left feature not working in Horizontal Scroll

Hi @JideGuru
The page viewer shows the remaining pages for the current chapter of the epub, and not the complete epub itself and it doesn't work in Horizontal scroll at all. In horizontal scroll, it sticks at 1 page left.
I have tested these on android only.

functionalities

Platform - Both

how can i remove Copy, Share , Define functionalities ?

for example : When i select text only appears colors highlight

Font not found MyanmarZg exp

When i am running app on android (realme device) i got error such as below:
E/AndroidRuntime(22852): java.lang.RuntimeException: Font asset not found /system/fonts/MyanmarZg_exp.ttf
How to fix that?

App crashing on physical device, working fine on emulator

Issue / Feature - Opening Assets and Network Epubs
Platform (android, iOS or both) -
Crash / Error - The app runs perfectly on the emulator but the same apk crashes when installed on a real device.

Steps to reproduce / Describe in detail - I just installed the plugin and wrote the code as directed.

Can you help me in a direction that can help me solve this issue? Any help will be appreciated.

Changing epub sdk

hello,
would you mind trying a sdk change to Readium, a more stable & well maintained epub sdk for android?
folio is not fixing some big issues, like randering a big TOC, and opening big epub files.
thanks,
Tayeb.

typing notes on reading

Issue / Feature - When typing notes, UI scrolls the end on iOS, this is tolearble on iPhone but on iPad it cuts the view.
Platform (android, iOS or both) - tested only on iOS for now.

features are disabled/crash

it takes too long to load a epub from assets + when you press light/night mode or try any other features it crashs. -
Platform (android) -
Crash / Error -

1.downloaded the codes(comment everything thats not related to "load from assets") note: had some issues and started to fix them one by one. 2.put assets in lib folder 3.write lib/assets/book.epub in both pubspec.yaml and in code (it doesnt even open the file otherwise)


here the content of debug console when i scroll in epub:

Launching lib\main.dart on G011A in debug mode...
lib\main.dart
√ Built build\app\outputs\flutter-apk\app-debug.apk.
Connecting to VM Service at ws://127.0.0.1:64818/aEB2GFdRzio=/ws
W/Java7Support( 4485): Unable to load JDK7 types (annotations, java.nio.file.Path): no Java7 support added
I/SavedLocation( 4485): -> savedLocation ->
W/art ( 4485): Before Android 4.1, method android.graphics.PorterDuffColorFilter androidx.vectordrawable.graphics.drawable.VectorDrawableCompat.updateTintFilter(android.graphics.PorterDuffColorFilter, android.content.res.ColorStateList, android.graphics.PorterDuff$Mode) would have incorrectly overridden the package-private method in android.graphics.drawable.Drawable
V/FolioActivity( 4485): -> initDistractionFreeMode
V/FolioActivity( 4485): -> hideSystemUI
V/FolioActivity( 4485): -> showSystemUI
I/art ( 4485): Rejecting re-init on previously-failed class java.lang.Class<androidx.core.view.ViewCompat$2>
V/FolioActivity( 4485): -> setNightMode
V/FolioActivity( 4485): -> initMediaController
V/FolioActivity( 4485): -> setupBook
V/FolioActivity( 4485): -> initBook
D/AppUtil ( 4485): -> getAvailablePortNumber -> portNumber 8080 available
V/FolioActivity( 4485): -> onPostCreate
V/FolioActivity( 4485): -> onResume
V/FolioAppBarLayout( 4485): -> onApplyWindowInsets
I/System.out( 4485): Failed to create TextToSpeech
I/art ( 4485): Rejecting re-init on previously-failed class java.lang.Class<com.folioreader.ui.view.FolioWebView$TextSelectionCb2>
I/WebViewFactory( 4485): Loading com.android.webview version 52.0.2743.100 (code 275610010)
I/art ( 4485): Rejecting re-init on previously-failed class java.lang.Class<com.android.webview.chromium.ServiceWorkerControllerAdapter>
I/art ( 4485): Rejecting re-init on previously-failed class java.lang.Class<com.android.webview.chromium.TokenBindingManagerAdapter>
I/cr_LibraryLoader( 4485): Time to load native libraries: 2 ms (timestamps 7784-7786)
I/cr_LibraryLoader( 4485): Expected native library version number "52.0.2743.100", actual native library version number "52.0.2743.100"
I/art ( 4485): Rejecting re-init on previously-failed class java.lang.Class<com.android.webview.chromium.WebMessagePortAdapter>
V/WebViewChromiumFactoryProvider( 4485): Binding Chromium to main looper Looper (main, tid 1) {2c31c134}
I/cr_LibraryLoader( 4485): Expected native library version number "52.0.2743.100", actual native library version number "52.0.2743.100"
I/chromium( 4485): [INFO:library_loader_hooks.cc(143)] Chromium logging enabled: level = 0, default verbosity = 0
I/cr_BrowserStartup( 4485): Initializing chromium process, singleProcess=true
E/EGL_adreno( 4485): CreateContext rcMajorVersion:3, minorVersion:0
D/EGL_adreno( 4485): eglCreateContext: 0x95cace80: maj 3 min 0 rcv 3
W/cr_media( 4485): Requires BLUETOOTH permission
I/cr_DRP ( 4485): No DRP key due to exception:java.lang.ClassNotFoundException: com.android.webview.chromium.Drp
I/art ( 4485): Rejecting re-init on previously-failed class java.lang.Class<com.android.webview.chromium.WebViewContentsClientAdapter$WebResourceErrorImpl>
I/art ( 4485): Rejecting re-init on previously-failed class java.lang.Class<org.chromium.content.browser.FloatingWebActionModeCallback>
W/cr_AwContents( 4485): onDetachedFromWindow called when already detached. Ignoring
V/FolioWebView( 4485): -> init
V/FolioWebView( 4485): -> initViewTextSelection
V/ResourceHandler( 4485): Method: GET, Uri: /book2/OEBPS/cover.xml
I/System.out( 4485): Failed to create TextToSpeech
W/cr_AwContents( 4485): onDetachedFromWindow called when already detached. Ignoring
V/FolioWebView( 4485): -> init
V/FolioWebView( 4485): -> initViewTextSelection
V/ResourceHandler( 4485): Method: GET, Uri: /book2/OEBPS/GeographyofBli_copyright.html
I/System.out( 4485): Font family: Roboto
I/cr_Ime ( 4485): ImeThread is not enabled.
I/System.out( 4485): Font family: Roboto
I/cr_Ime ( 4485): ImeThread is not enabled.
E/libEGL ( 4485): validate_display:255 error 3008 (EGL_BAD_DISPLAY)
W/AudioCapabilities( 4485): Unsupported mime audio/x-ms-wma
W/AudioCapabilities( 4485): Unsupported mime audio/vnd.rn-realaudio
W/AudioCapabilities( 4485): Unsupported mime audio/mpeg-L2
W/AudioCapabilities( 4485): Unsupported mime audio/ac3
W/AudioCapabilities( 4485): Unsupported mime audio/x-ape
W/AudioCapabilities( 4485): Unsupported mime audio/vnd.dts
W/AudioCapabilities( 4485): Unsupported mime audio/ffmpeg
W/VideoCapabilities( 4485): Unsupported mime video/mpeg2
W/VideoCapabilities( 4485): Unsupported mime video/x-ms-wmv
W/VideoCapabilities( 4485): Unsupported mime video/vnd.rn-realvideo
W/VideoCapabilities( 4485): Unsupported mime video/vc1
W/VideoCapabilities( 4485): Unsupported mime video/x-flv
W/VideoCapabilities( 4485): Unsupported mime video/divx
W/VideoCapabilities( 4485): Unsupported mime video/ffmpeg
I/VideoCapabilities( 4485): Unsupported profile 4 for video/mp4v-es
E/cr_MediaCodecUtil( 4485): Decoder for type video/x-vnd.on2.vp9 is not supported on this device
D/ ( 4485): HostConnection::get() New Host Connection established 0x944dc880, tid 4573
E/EGL_adreno( 4485): CreateContext rcMajorVersion:3, minorVersion:0
D/EGL_adreno( 4485): eglCreateContext: 0xaed1a160: maj 3 min 0 rcv 3
W/cr_BindingManager( 4485): Cannot call determinedVisibility() - never saw a connection for the pid: 4485
V/CSSHandler( 4485): Method: GET, Uri: /styles/ltr-before.css
V/ResourceHandler( 4485): Method: GET, Uri: /book2/stylesheet.css
W/cr_BindingManager( 4485): Cannot call determinedVisibility() - never saw a connection for the pid: 4485
V/CSSHandler( 4485): Method: GET, Uri: /styles/ltr-default.css
V/ResourceHandler( 4485): Method: GET, Uri: /book2/page_styles.css
V/JSHandler( 4485): Method: GET, Uri: /scripts/touchHandling.js
V/CSSHandler( 4485): Method: GET, Uri: /styles/ltr-after.css
V/JSHandler( 4485): Method: GET, Uri: /scripts/utils.js
V/ResourceHandler( 4485): Method: GET, Uri: /book2/OEBPS/images/GeographyofBli-cover.jpg
V/FolioPageFragment( 4485): -> onPageFinished -> took from getEntryReadLocator
V/FolioActivity( 4485): -> onPageSelected -> DirectionalViewpager -> position = 1
W/TextToSpeech( 4485): isSpeaking failed: not bound to TTS engine
V/FolioActivity( 4485): -> onPageScrollStateChanged -> DirectionalViewpager -> position = 1
V/FolioPageFragment( 4485): -> scrollToLast -> isPageLoading = false
D/FolioWebView( 4485): -> dismissPopupWindow -> /OEBPS/cover.xml
V/FolioPageFragment( 4485): -> scrollToFirst -> isPageLoading = true
I/System.out( 4485): Failed to create TextToSpeech
W/cr_AwContents( 4485): onDetachedFromWindow called when already detached. Ignoring
V/FolioWebView( 4485): -> init
V/FolioWebView( 4485): -> initViewTextSelection
V/ResourceHandler( 4485): Method: GET, Uri: /book2/OEBPS/GeographyofBli_toc.html
V/WebViewConsole( 4485): -> scrollToLast [file:///android_asset/js/Bridge.js:493]
I/System.out( 4485): Font family: Roboto
I/cr_Ime ( 4485): ImeThread is not enabled.
W/cr_BindingManager( 4485): Cannot call determinedVisibility() - never saw a connection for the pid: 4485
V/CSSHandler( 4485): Method: GET, Uri: /styles/ltr-before.css
V/ResourceHandler( 4485): Method: GET, Uri: /book2/stylesheet.css
V/CSSHandler( 4485): Method: GET, Uri: /styles/ltr-default.css
V/ResourceHandler( 4485): Method: GET, Uri: /book2/page_styles.css
V/CSSHandler( 4485): Method: GET, Uri: /styles/ltr-after.css
V/JSHandler( 4485): Method: GET, Uri: /scripts/touchHandling.js
V/JSHandler( 4485): Method: GET, Uri: /scripts/utils.js


and here when i press the features iconbutton:

Restarted application in ۲٬۷۲۳ms.
V/FolioActivity( 4485): -> onOptionsItemSelected -> Configuration
W/art ( 4485): Before Android 4.1, method int androidx.appcompat.widget.DropDownListView.lookForSelectablePosition(int, boolean) would have incorrectly overridden the package-private method in android.widget.ListView
I/ListPopupWindow( 4485): Could not find method setEpicenterBounds(Rect) on PopupWindow. Oh well.
D/FolioWebView( 4485): -> dismissPopupWindow -> /OEBPS/cover.xml
V/FolioWebView( 4485): -> initViewTextSelection
V/FolioPageFragment( 4485): -> getLastReadLocator -> /OEBPS/GeographyofBli_copyright.html
D/FolioWebView( 4485): -> dismissPopupWindow -> /OEBPS/GeographyofBli_copyright.html
V/FolioWebView( 4485): -> initViewTextSelection
D/FolioWebView( 4485): -> dismissPopupWindow -> /OEBPS/GeographyofBli_toc.html
V/FolioWebView( 4485): -> initViewTextSelection
I/Choreographer( 4485): Skipped 302 frames! The application may be doing too much work on its main thread.
I/System.out( 4485): Font family: AndroidClock
I/System.out( 4485): Injected user font into CSS
I/System.out( 4485): - path: /system/fonts/AndroidClock.ttf
I/System.out( 4485): - family: 'AndroidClock'
E/WebViewConsole( 4485): Uncaught ReferenceError: DOMRect is not defined [file:///android_asset/js/Bridge.js:842]
I/System.out( 4485): Font family: AndroidClock
I/System.out( 4485): Injected user font into CSS
I/System.out( 4485): - path: /system/fonts/AndroidClock.ttf
I/System.out( 4485): - family: 'AndroidClock'
I/System.out( 4485): Font family: AndroidClock
I/System.out( 4485): Injected user font into CSS
I/System.out( 4485): - path: /system/fonts/AndroidClock.ttf
I/System.out( 4485): - family: 'AndroidClock'
W/cr_BindingManager( 4485): Cannot call determinedVisibility() - never saw a connection for the pid: 4485
V/ResourceHandler( 4485): Method: GET, Uri: /book2/stylesheet.css
V/CSSHandler( 4485): Method: GET, Uri: /styles/ltr-default.css
V/ResourceHandler( 4485): Method: GET, Uri: /book2/page_styles.css
V/CSSHandler( 4485): Method: GET, Uri: /styles/ltr-before.css
V/CSSHandler( 4485): Method: GET, Uri: /styles/ltr-after.css
W/cr_BindingManager( 4485): Cannot call determinedVisibility() - never saw a connection for the pid: 4485
V/JSHandler( 4485): Method: GET, Uri: /scripts/touchHandling.js
V/JSHandler( 4485): Method: GET, Uri: /scripts/utils.js
V/ResourceHandler( 4485): Method: GET, Uri: /book2/OEBPS/images/GeographyofBli-cover.jpg
D/AndroidRuntime( 4485): Shutting down VM
E/AndroidRuntime( 4485): FATAL EXCEPTION: main
E/AndroidRuntime( 4485): Process: com.example.text_epub_viewer, PID: 4485
E/AndroidRuntime( 4485): kotlin.KotlinNullPointerException
E/AndroidRuntime( 4485): at com.folioreader.ui.fragment.FolioPageFragment$webViewClient$1.onPageFinished(FolioPageFragment.kt:446)
E/AndroidRuntime( 4485): at com.android.webview.chromium.WebViewContentsClientAdapter.onPageFinished(WebViewContentsClientAdapter.java:531)
E/AndroidRuntime( 4485): at org.chromium.android_webview.AwContentsClientCallbackHelper$MyHandler.handleMessage(AwContentsClientCallbackHelper.java:188)
E/AndroidRuntime( 4485): at android.os.Handler.dispatchMessage(Handler.java:102)
E/AndroidRuntime( 4485): at android.os.Looper.loop(Looper.java:135)
E/AndroidRuntime( 4485): at android.app.ActivityThread.main(ActivityThread.java:5254)
E/AndroidRuntime( 4485): at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime( 4485): at java.lang.reflect.Method.invoke(Method.java:372)
E/AndroidRuntime( 4485): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
E/AndroidRuntime( 4485): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
I/Process ( 4485): Sending signal. PID: 4485 SIG: 9
Lost connection to device.
Exited (sigterm)

Disable Screenshots inside FolioReader

Hi @JideGuru,
I wanted to disable the screenshot inside FolioReader but both flutter_windowmanager as well as adding code to the native side don't seem to work. They disable screenshot inside the app but don't have any effect on folioReader. Is there any way to include this functionality?

Ebook Read Progression percentage

Thanks lot for this amazing package.
I would like to have a read progression feature
Issue / Feature - With the lastLocation and the epub file, be able to have the current page and the total pages.
Platform (android, iOS or both) - both
Crash / Error - NA

Steps to reproduce / Describe in detail -

App crash when trying to open the epub file

Issue - App crash when trying to open the epub file
Platform - Android

Describe in detail

  • Below is my code and the errors:
    EpubViewer.setConfig(
    themeColor: Theme.of(context).primaryColor,
    identifier: "book",
    scrollDirection: EpubScrollDirection.VERTICAL,
    allowSharing: true,
    enableTts: true,
    );
    note: it does not crash when I set the config but it crash when running the code below:
    ======= Error Part===========
    EpubViewer.open(
    filePath,
    );
    ==========================

  • This is the logs when the app crush:
    D/create table highlight( 3111): ****CREATE TABLE IF NOT EXISTS highlight_table ( _id INTEGER PRIMARY KEY AUTOINCREMENT,bookId TEXT,content TEXT,date TEXT,type TEXT,page_number INTEGER,pageId TEXT,rangy TEXT,uuid TEXT,note TEXT)
    I/SavedLocation( 3111): -> savedLocation ->
    W/Java7Support( 3111): Unable to load JDK7 types (annotations, java.nio.file.Path): no Java7 support added
    W/ActivityThread( 3111): handleWindowVisibility: no activity for token android.os.BinderProxy@c25d30d
    V/FolioActivity( 3111): -> initDistractionFreeMode
    V/FolioActivity( 3111): -> hideSystemUI
    V/FolioActivity( 3111): -> showSystemUI
    W/le.camEducatio( 3111): Accessing hidden method Landroid/view/View;->computeFitSystemWindows(Landroid/graphics/Rect;Landroid/graphics/Rect;)Z (greylist, reflection, allowed)
    W/le.camEducatio( 3111): Accessing hidden method Landroid/view/ViewGroup;->makeOptionalFitsSystemWindows()V (greylist, reflection, allowed)
    V/FolioActivity( 3111): -> setDayMode
    V/FolioActivity( 3111): -> initMediaController
    V/FolioActivity( 3111): -> onPostCreate
    V/FolioActivity( 3111): -> onResume
    D/EGL_emulation( 3111): eglMakeCurrent: 0xdca53a40: ver 3 0 (tinfo 0xbd0cce10)
    D/AndroidRuntime( 3111): Shutting down VM
    E/AndroidRuntime( 3111): FATAL EXCEPTION: main
    E/AndroidRuntime( 3111): Process: com.example.camEducation, PID: 3111
    E/AndroidRuntime( 3111): android.view.InflateException: Couldn't resolve menu item onClick handler goBackButtonClicked in class com.folioreader.ui.activity.FolioActivity
    E/AndroidRuntime( 3111): at androidx.appcompat.view.SupportMenuInflater$InflatedOnMenuItemClickListener.(SupportMenuInflater.java:255)
    E/AndroidRuntime( 3111): at androidx.appcompat.view.SupportMenuInflater$MenuState.setItem(SupportMenuInflater.java:484)
    E/AndroidRuntime( 3111): at androidx.appcompat.view.SupportMenuInflater$MenuState.addItem(SupportMenuInflater.java:532)
    E/AndroidRuntime( 3111): at androidx.appcompat.view.SupportMenuInflater.parseMenu(SupportMenuInflater.java:207)
    E/AndroidRuntime( 3111): at androidx.appcompat.view.SupportMenuInflater.inflate(SupportMenuInflater.java:129)
    E/AndroidRuntime( 3111): at com.folioreader.ui.activity.FolioActivity.onCreateOptionsMenu(FolioActivity.kt:398)
    E/AndroidRuntime( 3111): at android.app.Activity.onCreatePanelMenu(Activity.java:4074)
    E/AndroidRuntime( 3111): at androidx.fragment.app.FragmentActivity.onCreatePanelMenu(FragmentActivity.java:325)
    E/AndroidRuntime( 3111): at androidx.appcompat.view.WindowCallbackWrapper.onCreatePanelMenu(WindowCallbackWrapper.java:94)
    E/AndroidRuntime( 3111): at androidx.appcompat.app.AppCompatDelegateImpl$AppCompatWindowCallback.onCreatePanelMenu(AppCompatDelegateImpl.java:2830)
    E/AndroidRuntime( 3111): at androidx.appcompat.view.WindowCallbackWrapper.onCreatePanelMenu(WindowCallbackWrapper.java:94)
    E/AndroidRuntime( 3111): at androidx.appcompat.app.ToolbarActionBar.populateOptionsMenu(ToolbarActionBar.java:455)
    E/AndroidRuntime( 3111): at androidx.appcompat.app.ToolbarActionBar$1.run(ToolbarActionBar.java:56)
    E/AndroidRuntime( 3111): at android.os.Handler.handleCallback(Handler.java:883)
    E/AndroidRuntime( 3111): at android.os.Handler.dispatchMessage(Handler.java:100)
    E/AndroidRuntime( 3111): at android.os.Looper.loop(Looper.java:214)
    E/AndroidRuntime( 3111): at android.app.ActivityThread.main(ActivityThread.java:7356)
    E/AndroidRuntime( 3111): at java.lang.reflect.Method.invoke(Native Method)
    E/AndroidRuntime( 3111): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
    E/AndroidRuntime( 3111): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)
    E/AndroidRuntime( 3111): Caused by: java.lang.NoSuchMethodException: com.folioreader.ui.activity.FolioActivity.goBackButtonClicked [interface android.view.MenuItem]
    E/AndroidRuntime( 3111): at java.lang.Class.getMethod(Class.java:2072)
    E/AndroidRuntime( 3111): at java.lang.Class.getMethod(Class.java:1693)
    E/AndroidRuntime( 3111): at androidx.appcompat.view.SupportMenuInflater$InflatedOnMenuItemClickListener.(SupportMenuInflater.java:251)
    E/AndroidRuntime( 3111): ... 19 more

  • This pop up appear after the app crash:

Screen Shot 2020-09-29 at 11 50 31 AM

Unable to determine Swift version on iOS

I'm getting the following error when doing pod install:

[!] Unable to determine Swift version for the following pods:

- `RealmSwift` does not specify a Swift version and none of the targets (`Runner`) integrating it have the `SWIFT_VERSION` attribute set. Please contact the author or set the `SWIFT_VERSION` attribute in at least one of the targets that integrate this pod.
- `epub_kitty` does not specify a Swift version and none of the targets (`Runner`) integrating it have the `SWIFT_VERSION` attribute set. Please contact the author or set the `SWIFT_VERSION` attribute in at least one of the targets that integrate this pod.

set Scroll Direction as both vertical and horizontal

Hi @JideGuru, currently EpubScrollDirection only has options to set scroll direction as either vertical or Horizontal. I'm not getting the option to switch between the two inside folioReader. Can you please guide me on how to implement this switching feature?

WhatsApp Image 2020-09-08 at 7 03 58 PM

Font size cannot be modified

Issue / Feature - Font size cannot be modified
Platform (android, iOS or both) - iOS
Crash / Error -

Steps to reproduce / Describe in detail -

Show Sample reading!

Is there any option to restrict only 20 % of epub to be shown for sample reading feature just like google play books have it ?

Reading file from assets.

How do I read and show epub file from assets?
Like: assets/myfile.epub in my project. Could you show a sample code just for that? I don't need other features such as download. I just need to read file from my project's asset folder.

app crashing in relase mode

App Crashing in release mode showing the following error

n.a.a.e: Subscriber class com.folioreader.q.c.b and its super classes have no public methods with the @subscribe annotation

any idea what is this?

horizontal scrolling doesnt work for ios

with this config

EpubViewer.setConfig(
themeColor: Theme.of(context).accentColor,
identifier: "iosBook",
scrollDirection: EpubScrollDirection.HORIZONTAL,
allowSharing: true,
enableTts: true,
);

Failed to build ios app

Issue - failed to build ios app
Platform (iOS)
Describe in detail - I am using Xcode 12. I can not build my ios app. Below is the error that I got from Xcode:
Screen Shot 2020-09-29 at 11 37 51 AM
Undefined symbols for architecture x86_64:
"_RLMRealmPathForFile", referenced from:
default argument 0 of RealmSwift.Realm.Configuration.init(fileURL: Foundation.URL?, inMemoryIdentifier: Swift.String?, syncConfiguration: RealmSwift.SyncConfiguration?, encryptionKey: Foundation.Data?, readOnly: Swift.Bool, schemaVersion: Swift.UInt64, migrationBlock: (RealmSwift.Migration, Swift.UInt64) -> ()?, deleteRealmIfMigrationNeeded: Swift.Bool, shouldCompactOnLaunch: (Swift.Int, Swift.Int) -> Swift.Bool?, objectTypes: [RealmSwift.Object.Type]?) -> RealmSwift.Realm.Configuration in FolioReaderConfig.o
"OBJC_CLASS$_RLMNotificationToken", referenced from:
objc-class-ref in FolioReaderAddHighlightNote.o
objc-class-ref in Highlight+Helper.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Highlight, notes don't work

Issue / Feature - Highlight, notes don't work
Platform (android, iOS or both) - IOS,Android is not tested
Crash / Error -

Steps to reproduce / Describe in detail -

ios simulator open book crash

ios simulator open book crash
iOS
Crash - Fatal error: Unexpectedly found nil while unwrapping an Optional value: file /Users/menglingyu/development/flutter/.pub-cache/hosted/pub.flutter-io.cn/epub_viewer-0.1.9/ios/Classes/SwiftEpubKittyPlugin.swift, line 79

pubspec.yaml
...
version: 1.0.0+1

environment:
sdk: ">=2.7.0 <3.0.0"
...
epub_viewer:
dependency: "direct main"
description:
name: epub_viewer
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.1.9"

flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 1.20.4, on Mac OS X 10.15.1 19B88, locale zh-Hans-CN)
[✗] Android toolchain - develop for Android devices
✗ Unable to locate Android SDK.
Install Android Studio from: https://developer.android.com/studio/index.html
On first launch it will assist you in installing the Android SDK components.
(or visit https://flutter.dev/docs/get-started/install/macos#android-setup for detailed instructions).
If the Android SDK has been installed to a custom location, set ANDROID_SDK_ROOT to that location.
You may also want to add it to your PATH environment variable.

[✓] Xcode - develop for iOS and macOS (Xcode 11.3.1)
[!] Android Studio (not installed)
[✓] VS Code (version 1.52.0)

[✓] Connected device (1 available)

! Doctor found issues in 2 categories.

Load epub from assets

This plugin allows loading epub files from the Flutter assets folder?

I'm getting a book not found error.

Example app doesn't print current location

Issue / Feature -Issue
Platform (android, iOS or both) -android
Crash / Error - error

Steps to reproduce / Describe in detail -
In this example app print function in there doesn't print anything
EpubViewer.locatorStream.listen((locator) {
print(
'LOCATOR: ${EpubLocator.fromJson(jsonDecode(locator))}');
});

language

Hello. How can i change epub reader language(english) to other language?
for example words : copy, share, vertical, horizontal ?

i find these in ios file but android don't have? please help :)

/*
Localizable.strings
Runner

Created by 小发工作室 on 2019/11/16.
Copyright © 2019 The Chromium Authors. All rights reserved.
*/
"Highlight" = "高亮";
"Define" = "查询";
"Note" = "笔记";

"Day" = "白天";
"Night" = "夜晚";
"Horizontal" = "左右翻页";
"Vertical" = "上下翻页";
"minutes" = "分钟";
"1 minute" = "1 分钟";
"Less than a minute" = "少于1分钟";
"minutes" = "分钟";
"1 page left" = "剩余1页";
"pages left" = "剩余页数";

"Share" = "分享";
"Cancel" = "取消";
"Save" = "保存";
"Done" = "完成";
"Manage" = "管理";
"Search Web" = "网页查找";

"Contents" = "目录";
"Highlights" = "笔记";

Compile issue on Android version

I've created a new project and just added "epub_viewer: ^0.1.3" to pubspec.yaml
And run "pub get"

After that, when I try to run from android simulator, it failed to build.
Here is the issues

==========================
/Users/superflutter/Documents/TestProjects/flutter_epub_test/android/app/src/debug/AndroidManifest.xml Error:
uses-sdk:minSdkVersion 16 cannot be smaller than version 21 declared in library [:epub_viewer] /Users/superflutter/Documents/TestProjects/flutter_epub_test/build/epub_viewer/intermediates/library_manifest/debug/AndroidManifest.xml as the library might be using APIs not available in 16
Suggestion: use a compatible library with a minSdk of at most 16,
or increase this project's minSdk version to at least 21,
or use tools:overrideLibrary="com.jideguru.epub_viewer" to force usage (may lead to runtime failures)

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':app:processDebugManifest'.

Manifest merger failed : uses-sdk:minSdkVersion 16 cannot be smaller than version 21 declared in library [:epub_viewer] /Users/superflutter/Documents/TestProjects/flutter_epub_test/build/epub_viewer/intermediates/library_manifest/debug/AndroidManifest.xml as the library might be using APIs not available in 16
Suggestion: use a compatible library with a minSdk of at most 16,
or increase this project's minSdk version to at least 21,
or use tools:overrideLibrary="com.jideguru.epub_viewer" to force usage (may lead to runtime failures)

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

BUILD FAILED in 28s
Exception: Gradle task assembleDebug failed with exit code 1

Android not working in release build.

Working fine with debug build but after make release build app going to crash
please help me out thanks in advance .

minifyEnabled false
shrinkResources false

after adding this project not build

Support for epub v3.

I observed that the epub reader doesnot open epub v3( Like alice in wonderland). Everything is blank and the app crash atimes. Please help.

Could you add a function to scroll to next page based on certain condition?

Issue / Feature -
Platform (android, iOS or both) -
Crash / Error -

Steps to reproduce / Describe in detail -
I am building a speed reading app. When a user opens a book, a dialog asks to enter a target reading speed. According to this speed, the pages turn automatically. Could it in the package?

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.