Droid reader with pre-compiled JNI libraries

273 views
Skip to first unread message

Prakash

unread,
May 24, 2011, 6:00:49 AM5/24/11
to DroidReader Developer List
Hi...

I'm new to android development, I need to view PDF file with in my
application, to do that I download Droid Reader source by SVN, then I
did the following steps as per the read me file.

1. downloaded and moved the mentioned third party libraries to
specified directory
2. symbolic link also created successfully.

after that I having problem while compiling the native JNI library
because of the problem with Cygwin installation. So can I run droid
reader with pre-compiled JNI libraries? if so where can I get it?.

FYI :I'm working on Windows 7 (32bit), eclipse galileo, Android SDK,
Android NDK -r5b , Cygwin.

Thank you,

Prakash.D

Hans-Werner Hilse

unread,
May 24, 2011, 6:05:27 AM5/24/11
to droidreader-d...@googlegroups.com
Hi,

for those versions that are published, I think you could just extract
a pre-compiled version of the JNI library from the APK files. They're
ZIP files, so you might just rename them to ".zip" and extract the
library.

-hwh

2011/5/24 Prakash <prakas...@gmail.com>:

Prakash. D

unread,
May 24, 2011, 9:32:53 AM5/24/11
to droidreader-d...@googlegroups.com
Thank you,

I got the pre-compiled version of JNI library from the APK, and moved to libs/, then project build successfully without any errors, but it throws the following exception while click on Open File option.

 android.content.ActivityNotFoundException: No Activity found to handle Intent { act=org.openintents.action.PICK_FILE dat=file://null (has extras) }

how to fix this problem?

FYI: I using droid reader revision r66
--
With Regards
Prakash.D

Hans-Werner Hilse

unread,
May 24, 2011, 10:28:43 AM5/24/11
to droidreader-d...@googlegroups.com
Hi,

I think the "precompiled" (i.e. packaged) versions of the library can
only be expected to work with the corresponding version of DroidReader
sources.

However, the error you are facing right now probably just means that
you do not have a File manager installed that handles the pick-file
intent. I suggest to install OI File Manager - or use a file manager
of your choice to open PDF files by clicking on them in the file
manager itself. DroidReader just relies on other apps to facilitate
file browsing.

-hwh

2011/5/24 Prakash. D <prakas...@gmail.com>:

Prakash. D

unread,
May 31, 2011, 2:52:42 AM5/31/11
to droidreader-d...@googlegroups.com
Hi,

             I am working in Droid Reader to view PDF within my application. As per your suggestion I installed OI File Manager 1.1.5 in my emulator. Then I successfully build the project without any errors, but it throws the following error

              "DroidReader(process de.hilse.droidreader) has stopped unexpectedly"

Please help to solve this problem.









With Regards
Prakash.D

Hans-Werner Hilse

unread,
May 31, 2011, 5:28:47 AM5/31/11
to droidreader-d...@googlegroups.com
Hi,

well, without debug info it's hard to tell. Check whether verbose
logging is enabled and then check the output of "adb logcat".

You're using the sources that match the version of the APK you have
extracted the .so file from, right?

-hwh

2011/5/31 Prakash. D <prakas...@gmail.com>:

Prakash. D

unread,
May 31, 2011, 6:32:54 AM5/31/11
to droidreader-d...@googlegroups.com
Thank you.

I am using droidreader-0.3 and droidreader-0.3.apk. Also in "adb logcat" i can find the following errors.

No implementation found for native Lde/hilses/droidreader/PdfDocument;.nativeIsMemoryHog (J)I     


ERROR/AndroidRuntime(784): java.lang.UnsatisfiedLinkError: nativeIsMemoryHog

  

ERROR/AndroidRuntime(784):     at de.hilses.droidreader.PdfDocument.nativeIsMemoryHog(Native Method)

ERROR/AndroidRuntime(784):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)

Who can i solve this problems?


With Regards
Prakash.D

Hans-Werner Hilse

unread,
May 31, 2011, 9:30:36 AM5/31/11
to droidreader-d...@googlegroups.com
Hi,

this is because the source code you are using is newer than the
compiled library. I'd suggest to check out the corresponding version,
it's tagged in Subversion. Note that this will probably work up to
version 0.5. The method "nativeIsMemoryHog" was introduced in a later
version.

-hwh

2011/5/31 Prakash. D <prakas...@gmail.com>:

Prakash. D

unread,
Jun 1, 2011, 1:44:40 AM6/1/11
to droidreader-d...@googlegroups.com
Hi,

            Now i changed my .apk to droidreader-0.5.apk as you suggest. But still i am having the same problem in the method "nativeIsMemoryHog".

Also in error log I am getting this error message

                 " Invalid ZIP archive: libs/armeabi/libpdfrender.so [in DroidReader] "

I think there is some problem in the pre-compiled version of the JNI library from the APK files.

Please help me out from this problems.






Thank you,

Prakash.D

Hans-Werner Hilse

unread,
Jun 1, 2011, 4:46:02 AM6/1/11
to droidreader-d...@googlegroups.com
Hi,

My suggestion was not really to use the v0.5 APK to make the error go
away - it was a general suggestion that doesn't have anything to do
with the problem.

To make the error go away, you have to use a *source* code version
that *corresponds* to the version of the APK. To make it clear: Since
v0.5, development has continued. However, there is no released binary
version since v0.5. So you have to check out *old* sources, dating to
the v0.5 release.

Just check out *sources* of the same version as the APK you are using.
Use the subversion tags to do this:

svn checkout http://droidreader.googlecode.com/svn/tags/v0_5 droidreader-0.5

Use that source code along with the 0.5 APK's .so file.


-hwh


2011/6/1 Prakash. D <prakas...@gmail.com>:

Prakash. D

unread,
Jun 1, 2011, 6:45:16 AM6/1/11
to droidreader-d...@googlegroups.com
Hi,

        Thanks. By using the svn checkout which you send

       http://droidreader.googlecode.com/svn/tags/v0_5

and by droidreader-0.5.apk i got the output. Now I can able to view the PDF files within my application.




Thank you,
Prakash.D

Prakash. D

unread,
Aug 8, 2011, 9:14:45 AM8/8/11
to droidreader-d...@googlegroups.com
Hi,

        I used Droid Reader to read PDF files with in my application. It works for me. My current task is to read the PDF file in assets folder and with out using file manager. Is it possible to read the PDF files with out using file manager? If so please help me to solve the problem.

Thank you,
Prakash. D
Reply all
Reply to author
Forward
0 new messages