View Single Post
Old 04-16-2013, 07:31 PM   #8
rupor
meat popsicle
rupor rocks like Gibraltar!rupor rocks like Gibraltar!rupor rocks like Gibraltar!rupor rocks like Gibraltar!rupor rocks like Gibraltar!rupor rocks like Gibraltar!rupor rocks like Gibraltar!rupor rocks like Gibraltar!rupor rocks like Gibraltar!rupor rocks like Gibraltar!rupor rocks like Gibraltar!
 
rupor's Avatar
 
Posts: 225
Karma: 100000
Join Date: Jul 2007
Location: USA
Device: Kindles, Pixels, iPads
I am "the rupor" and yes - I came from Russia, but I live in the US.

Basically there are 2 ways of doing it - simple and guaranteed. You could see examples in "ebookdownloader/EBookDownloaderView.java" - one is completly async, but requires book to be in the device database already (so it reading application just brought this book from somewhere it will fail), another one requires connection to ContentManagement service and waiting for the completion.

Code:
SonyBookSelector selector = new SonyBookSelector( this );
long l = selector.getContentId( path );
if( l != 0 )
{
    selector.setReadingTime( l );
    selector.requestBookSelection( l );
}
else
{
    selector.selectBook( path );
}

Last edited by rupor; 04-16-2013 at 07:34 PM.
rupor is offline   Reply With Quote