[fbreader] Failed to download books on FBReaderJ

267 views
Skip to first unread message

michael schiller

unread,
Apr 27, 2010, 1:19:57 PM4/27/10
to FBReader
Hi

I downloaded the source code and was able to build the reader under
android-7 platform.
When installing the reader on a device, everything worked fine except
for the book download.
After debugging I found out that the reader can not create any file or
directory on the SD card file system.
The same reader downloaded from the APP Store works fine.
Any clue for what is the problem?

10x
Michael

--
You received this message because you are subscribed to the Google Groups "FBReader" group.
To post to this group, send email to fbre...@googlegroups.com.
To unsubscribe from this group, send email to fbreader+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/fbreader?hl=en.

geometer

unread,
Apr 27, 2010, 4:47:01 PM4/27/10
to FBReader
Michael,

AFAIK there is no tricks we use during package building. The only
idea: we use our own generated key for signing the package.
May be sdcard is read-only for applications signed with a standard
debug key?

Please let me know what is the solution -- that's really very strange.

Best,

-- Nikolay

bout.vasiliy

unread,
Apr 27, 2010, 5:42:59 PM4/27/10
to FBReader
It's very interesting.

There is another place in FBReaderJ code where application writes data
to files.
This is in the org.geometerplus.fbreader.network.NetworkImage class.

Can you check, if application can create file and write image data to
it in the synchronizeInternal(boolean) method.

You can check it by opening network catalog with books, that you
haven't opened before (i.e. there is no cached images for books
covers). If you can see books covers, than application is able to
write images to your SD card.

If application can create file and write image data to it, than there
must be an error in the BookDownloader code.
If it can't, than probably there is a problem with security.

If there is exception thrown while fbreader attempts to write data to
file, can you send me its stacktrace?

On Apr 27, 9:19 pm, michael schiller <schiller...@gmail.com> wrote:

Ken You

unread,
Apr 27, 2010, 11:22:50 PM4/27/10
to FBReader

It will be built on android-4 with ant.
Try again with android-4 platform.

michael schiller

unread,
Apr 28, 2010, 4:37:47 AM4/28/10
to FBReader
Hi

I solved the problem by adding a permission (WRITE_EXTERNAL_STORAGE)
to the manifest.
Not sure why it is not already defined.

Thanks

geometer

unread,
Apr 29, 2010, 7:57:12 AM4/29/10
to FBReader
Michael,

Thank you for the information. I've added this permission in the
manifest. :) I think it works in our compiled version just because we
use old (android-3) platform: we'd like to have an application that
works on old phones too.

Best,

-- Nikolay
Reply all
Reply to author
Forward
0 new messages