AnFengDe / AnFengDe_EPUB

EPUB 3.0 SDK for Android and iPhone, Offical team site : http://epub.anfengde.com
146 stars 79 forks source link

Load book content without using the UI component of AnFengDe_EPUB Sdk #31

Open radman22 opened 9 years ago

radman22 commented 9 years ago

First of all I want to appreciate that what an awesome product you have just developed but now I want some help that I want to load the content of an epub book without using the UI component of the sdk .

You guys don't provide access to the UI component classes of your UI sdk and in your UI component sample the files are loading from the assets folder. I want the files to be loaded directly from a mobile file explorer path instead from the assets folder so is there any way your sdk can provide that because I can not change you bookinit() function in bookview class and if I use you EPUBJNI loader it does not give me a sample of how to load the content of book using your sdk .

So help please, I am making an epub reader and my back is against the wall.

AnFengDe commented 9 years ago

https://github.com/AnFengDe/AnFengDe_EPUB/blob/master/android/EPUB_SDK_Example/src/com/anfengde/epub_sdk_example/ExampleActivity.java

Yes, you can use epub sdk only, build UI yourself.

radman22 commented 9 years ago

Yes, I know that I can develop my own UI but my main question is that how can I load the content of epub book. just like I can get chapter count, chapter title etc but what is the way of loading the content of epub book , and can I get a detailed doc of your sdk . example you are showing me does not load the contents of the book or table of content , I request a detailed doc to be uploaded on your website.

AnFengDe commented 9 years ago

Can you give me your mail? I will send you epub sdk C API document.

You can use epub_get_doc_root and spine items path.

radman22 commented 9 years ago

radmanshiekh@gmail.com is my email and can you provide the java doc please because I am making an epub reader in android

abayomiabayomi commented 9 years ago

I need help.I have tried using the library and the example without success. All I get is after compilation , it displays splash screen and then crashes. I have read your tutorial over and over and over without getting a solution to it. Please help. I really want to use your library to publish a book free for my community.

AnFengDe commented 9 years ago

HI, abayomiabayoml Please report more detail, android version or ios version crash after display splash screen? How about your IDE version or setting, let us check it.

abayomiabayomi commented 9 years ago

Thank you. It is the android version and the IDE version is 22.3.0

I used the epub ui library with the example CallepubUI.

See the error message from the logcat :01-20 07:49:00.169: D/jdwp(23046): sendBufferedRequest : len=0x43 01-20 07:49:00.171: W/asset(23046): AssetManager-->addDefaultAssets CIP path not exsit! 01-20 07:49:00.175: D/dalvikvm(23046): open_cached_dex_file : /data/app/com.anfengde.ui.call-1.apk /data/dalvik-cache/data@app@com.anfengde.ui.call-1.apk@classes.dex 01-20 07:49:00.226: D/dalvikvm(23046): GC_FOR_ALLOC freed 74K (1423), 10% free 2648K/2924K, paused 14ms, total 14ms 01-20 07:49:00.227: I/dalvikvm-heap(23046): Grow heap (frag case) to 5.124MB for 2457616-byte allocation 01-20 07:49:00.264: D/dalvikvm(23046): GC_FOR_ALLOC freed <1K (4), 6% free 5048K/5328K, paused 37ms, total 37ms 01-20 07:49:00.372: D/dalvikvm(23046): create interp thread : stack size=128KB 01-20 07:49:00.372: D/dalvikvm(23046): create new thread 01-20 07:49:00.372: D/dalvikvm(23046): new thread created 01-20 07:49:00.372: D/dalvikvm(23046): update thread list 01-20 07:49:00.372: D/dalvikvm(23046): threadid=11: interp stack at 0x5f130000 01-20 07:49:00.372: D/dalvikvm(23046): threadid=11: created from interp 01-20 07:49:00.372: D/dalvikvm(23046): start new thread 01-20 07:49:00.374: D/dalvikvm(23046): threadid=11: notify debugger 01-20 07:49:00.374: D/dalvikvm(23046): threadid=11 (Thread-864): calling run() 01-20 07:49:00.444: D/GraphicBuffer(23046): create handle(0x5e716070) (w:800, h:1280, f:2) 01-20 07:49:02.422: D/dalvikvm(23046): threadid=11: exiting 01-20 07:49:02.422: D/dalvikvm(23046): threadid=11: bye! 01-20 07:49:02.447: D/ActivityThread(23046): hoder:android.app.IActivityManager$ContentProviderHolder@4234f1d8,provider,holder.Provider:android.content.ContentProviderProxy@42357228 01-20 07:49:02.452: W/asset(23046): AssetManager-->addDefaultAssets CIP path not exsit! 01-20 07:49:02.453: W/asset(23046): AssetManager-->addDefaultAssets CIP path not exsit! 01-20 07:49:02.458: I/TextToSpeech(23046): Sucessfully bound to com.google.android.tts 01-20 07:49:02.492: D/dalvikvm(23046): GC_FOR_ALLOC freed 2426K (476), 37% free 4636K/7276K, paused 9ms, total 9ms 01-20 07:49:02.509: I/webkit/webview_proxy(23046): WebView() constructor=com.anfengde.epub.ui.EPubWebView{42352438 VFE.HV.. ......I. 0,0-0,0} 01-20 07:49:02.522: D/dalvikvm(23046): create interp thread : stack size=128KB 01-20 07:49:02.522: D/dalvikvm(23046): create new thread 01-20 07:49:02.523: D/dalvikvm(23046): new thread created 01-20 07:49:02.523: D/dalvikvm(23046): update thread list 01-20 07:49:02.523: D/dalvikvm(23046): threadid=11: interp stack at 0x5f1c9000 01-20 07:49:02.523: D/dalvikvm(23046): threadid=11: created from interp 01-20 07:49:02.523: D/dalvikvm(23046): start new thread 01-20 07:49:02.523: D/dalvikvm(23046): threadid=11: notify debugger 01-20 07:49:02.523: D/dalvikvm(23046): threadid=11 (WebViewCoreThread): calling run() 01-20 07:49:02.542: D/dalvikvm(23046): create interp thread : stack size=128KB 01-20 07:49:02.543: D/webkit/webcore(23046): sWebCoreHandler.handleMessage() 0 obj=android.webkit.WebViewCore@42355900 01-20 07:49:02.544: D/dalvikvm(23046): create new thread 01-20 07:49:02.545: D/dalvikvm(23046): new thread created 01-20 07:49:02.545: D/dalvikvm(23046): update thread list 01-20 07:49:02.547: D/dalvikvm(23046): threadid=12: interp stack at 0x5f1e9000 01-20 07:49:02.547: D/dalvikvm(23046): threadid=12: created from interp 01-20 07:49:02.547: D/dalvikvm(23046): start new thread 01-20 07:49:02.552: D/dalvikvm(23046): threadid=12: notify debugger 01-20 07:49:02.552: D/dalvikvm(23046): threadid=12 (Thread-866): calling run() 01-20 07:49:02.558: D/dalvikvm(23046): create interp thread : stack size=128KB 01-20 07:49:02.558: D/dalvikvm(23046): create new thread 01-20 07:49:02.561: D/dalvikvm(23046): new thread created 01-20 07:49:02.561: D/dalvikvm(23046): update thread list 01-20 07:49:02.564: D/dalvikvm(23046): create interp thread : stack size=128KB 01-20 07:49:02.564: D/dalvikvm(23046): create new thread 01-20 07:49:02.565: D/dalvikvm(23046): new thread created 01-20 07:49:02.565: D/dalvikvm(23046): update thread list 01-20 07:49:02.565: D/dalvikvm(23046): threadid=13: interp stack at 0x5f209000 01-20 07:49:02.565: D/dalvikvm(23046): threadid=13: created from interp 01-20 07:49:02.566: D/dalvikvm(23046): start new thread 01-20 07:49:02.566: D/dalvikvm(23046): threadid=13: notify debugger 01-20 07:49:02.566: D/dalvikvm(23046): threadid=13 (CookieSyncManager): calling run() 01-20 07:49:02.576: D/dalvikvm(23046): threadid=14: interp stack at 0x5f229000 01-20 07:49:02.576: D/dalvikvm(23046): threadid=14: created from interp 01-20 07:49:02.577: D/dalvikvm(23046): start new thread 01-20 07:49:02.577: D/dalvikvm(23046): threadid=14: notify debugger 01-20 07:49:02.577: D/dalvikvm(23046): threadid=14 (AsyncTask #1): calling run() 01-20 07:49:02.579: D/dalvikvm(23046): threadid=12: exiting 01-20 07:49:02.579: D/dalvikvm(23046): threadid=12: bye! 01-20 07:49:02.622: D/dalvikvm(23046): Trying to load lib /data/app-lib/com.anfengde.ui.call-1/libepubjni.so 0x423627c8 01-20 07:49:02.625: D/dalvikvm(23046): Added shared lib /data/app-lib/com.anfengde.ui.call-1/libepubjni.so 0x423627c8 01-20 07:49:02.626: D/dalvikvm(23046): No JNI_OnLoad found in /data/app-lib/com.anfengde.ui.call-1/libepubjni.so 0x423627c8, skipping init 01-20 07:49:02.627: D/dalvikvm(23046): DexOpt: couldn't find static field Lcom/anfengde/epub/ui/R$drawable;.twitter_bird_callout 01-20 07:49:02.627: W/dalvikvm(23046): VFY: unable to resolve static field 1507 (twitter_bird_callout) in Lcom/anfengde/epub/ui/R$drawable; 01-20 07:49:02.627: D/dalvikvm(23046): VFY: replacing opcode 0x60 at 0x02f6 01-20 07:49:02.629: D/AndroidRuntime(23046): Shutting down VM 01-20 07:49:02.629: W/dalvikvm(23046): threadid=1: thread exiting with uncaught exception (group=0x4209e9a8) 01-20 07:49:02.629: W/dalvikvm(23046): threadid=1: uncaught exception occurred 01-20 07:49:02.630: W/System.err(23046): java.lang.NoSuchFieldError: com.anfengde.epub.ui.R$drawable.twitter_bird_callout 01-20 07:49:02.633: W/System.err(23046): at com.anfengde.epub.core.value.ResourceFiles.getImageResourceArray(ResourceFiles.java:285) 01-20 07:49:02.633: W/System.err(23046): at com.anfengde.epub.core.value.ResourceFiles.copyResourceFiles(ResourceFiles.java:484) 01-20 07:49:02.634: W/System.err(23046): at com.anfengde.epub.ui.BookView.initBook(BookView.java:209) 01-20 07:49:02.634: W/System.err(23046): at com.anfengde.ui.call.CallEPubUIActivity.onCreate(CallEPubUIActivity.java:22) 01-20 07:49:02.634: W/System.err(23046): at android.app.Activity.performCreate(Activity.java:5147) 01-20 07:49:02.634: W/System.err(23046): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1146) 01-20 07:49:02.634: W/System.err(23046): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2316) 01-20 07:49:02.634: W/System.err(23046): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2404) 01-20 07:49:02.634: W/System.err(23046): at android.app.ActivityThread.access$600(ActivityThread.java:166) 01-20 07:49:02.634: W/System.err(23046): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1374) 01-20 07:49:02.635: W/System.err(23046): at android.os.Handler.dispatchMessage(Handler.java:107) 01-20 07:49:02.635: W/System.err(23046): at android.os.Looper.loop(Looper.java:194) 01-20 07:49:02.635: W/System.err(23046): at android.app.ActivityThread.main(ActivityThread.java:5377) 01-20 07:49:02.637: W/System.err(23046): at java.lang.reflect.Method.invokeNative(Native Method) 01-20 07:49:02.637: W/System.err(23046): at java.lang.reflect.Method.invoke(Method.java:525) 01-20 07:49:02.638: W/System.err(23046): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839) 01-20 07:49:02.638: W/System.err(23046): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:606) 01-20 07:49:02.638: W/System.err(23046): at dalvik.system.NativeStart.main(Native Method) 01-20 07:49:02.638: W/dalvikvm(23046): threadid=1: calling UncaughtExceptionHandler 01-20 07:49:02.641: D/dalvikvm(23046): create interp thread : stack size=128KB 01-20 07:49:02.642: D/dalvikvm(23046): create new thread 01-20 07:49:02.642: D/dalvikvm(23046): new thread created 01-20 07:49:02.642: D/dalvikvm(23046): update thread list 01-20 07:49:02.642: D/dalvikvm(23046): threadid=12: interp stack at 0x5f9ca000 01-20 07:49:02.642: D/dalvikvm(23046): threadid=12: created from interp 01-20 07:49:02.642: D/dalvikvm(23046): start new thread 01-20 07:49:02.643: D/dalvikvm(23046): threadid=12: notify debugger 01-20 07:49:02.643: D/dalvikvm(23046): threadid=12 (SharedPreferencesImpl-load): calling run() 01-20 07:49:02.647: D/dalvikvm(23046): threadid=12: exiting 01-20 07:49:02.647: D/dalvikvm(23046): threadid=12: bye! 01-20 07:49:02.649: E/AndroidRuntime(23046): FATAL EXCEPTION: main 01-20 07:49:02.649: E/AndroidRuntime(23046): java.lang.NoSuchFieldError: com.anfengde.epub.ui.R$drawable.twitter_bird_callout 01-20 07:49:02.649: E/AndroidRuntime(23046): at com.anfengde.epub.core.value.ResourceFiles.getImageResourceArray(ResourceFiles.java:285) 01-20 07:49:02.649: E/AndroidRuntime(23046): at com.anfengde.epub.core.value.ResourceFiles.copyResourceFiles(ResourceFiles.java:484) 01-20 07:49:02.649: E/AndroidRuntime(23046): at com.anfengde.epub.ui.BookView.initBook(BookView.java:209) 01-20 07:49:02.649: E/AndroidRuntime(23046): at com.anfengde.ui.call.CallEPubUIActivity.onCreate(CallEPubUIActivity.java:22) 01-20 07:49:02.649: E/AndroidRuntime(23046): at android.app.Activity.performCreate(Activity.java:5147) 01-20 07:49:02.649: E/AndroidRuntime(23046): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1146) 01-20 07:49:02.649: E/AndroidRuntime(23046): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2316) 01-20 07:49:02.649: E/AndroidRuntime(23046): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2404) 01-20 07:49:02.649: E/AndroidRuntime(23046): at android.app.ActivityThread.access$600(ActivityThread.java:166) 01-20 07:49:02.649: E/AndroidRuntime(23046): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1374) 01-20 07:49:02.649: E/AndroidRuntime(23046): at android.os.Handler.dispatchMessage(Handler.java:107) 01-20 07:49:02.649: E/AndroidRuntime(23046): at android.os.Looper.loop(Looper.java:194) 01-20 07:49:02.649: E/AndroidRuntime(23046): at android.app.ActivityThread.main(ActivityThread.java:5377) 01-20 07:49:02.649: E/AndroidRuntime(23046): at java.lang.reflect.Method.invokeNative(Native Method) 01-20 07:49:02.649: E/AndroidRuntime(23046): at java.lang.reflect.Method.invoke(Method.java:525) 01-20 07:49:02.649: E/AndroidRuntime(23046): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839) 01-20 07:49:02.649: E/AndroidRuntime(23046): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:606) 01-20 07:49:02.649: E/AndroidRuntime(23046): at dalvik.system.NativeStart.main(Native Method) 01-20 07:49:02.659: D/webkit/webcore(23046): sWebCoreHandler.handleMessage() done 01-20 07:49:02.666: I/Process(23046): Sending signal. PID: 23046 SIG: 9

abayomiabayomi commented 9 years ago

This is the link for the eclipse compiled https://www.dropbox.com/s/q0h5dtji81k7hwd/SplashActivity.zip?dl=0 Please download and check where things went wrong cos i dont know why its only showing splashscreen before crashing. Hope to hear from you soon.

abayomiabayomi commented 9 years ago

Hello, have you checked the cause of the problem. Please respond.

abayomiabayomi commented 9 years ago

Can someone please respond to me?

AnFengDe commented 9 years ago

Sorry, abayomiabayomi We are all busy working on business project. :-< I make sure to check this issue at the end of the project, we have to continue to work overtime for about two months, after all commercial projects related to my job

abayomiabayomi commented 9 years ago

Hello, can you please look to fix this issue now. Its already over 2months.