Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,742,869 Members 39,324 Now Online
XDA Developers Android and Mobile Development Forum

[Q] Last read confusion

Tip us?
 
richardcoop
Old
#1  
Member - OP
Thanks Meter 3
Posts: 63
Join Date: Jan 2014
Default [Q] Last read confusion

I'm using the stock nook reader and renate's Library.apk. How can you make sure the last read icon on the top bar corresponds to the last read file in the library?

I am not sure where this icon gets its link. It doesn't seem to always open the last read file.
 
nmyshkin
Old
#2  
Senior Member
Thanks Meter 7
Posts: 117
Join Date: Nov 2013
I've been thinking about asking this question (although I am using the stock reader AND library apps). My "reading now" button is getting really cranky of late. It often just goes to the first page (cover) or sometimes it goes to the first page AND displays a two-option message about the different current reading positions in two Nook readers (!) and which one do I want (generally neither is correct). Right now the only sure way to get to the correct page is to go to the Library screen and select the book from there. So the Nook does remember, but the Reading Now button is not functioning properly.

For a time I had a number of B&N apps disabled (renamed ".bak") and gradually discovered the imponderable connections that seemed to render little things inoperable. I've had to restore quite a few of the apps to running to keep everything functioning except Nook Community (because the constant "nagifications" drove me crazy) but this button behavior has me baffled (as does the reference to two Nook readers!)

I wonder, are you using any sort of "cleaning" app? I am using Clean Master and find it helpful in freeing up memory but I'm beginning to think that some of the data it is throwing out might just contain the info that the button needs to function properly. It certainly messes with Tasker.
 
Renate NST
Old
#3  
Renate NST's Avatar
Recognized Contributor / Recognized Developer
Thanks Meter 783
Posts: 1,956
Join Date: Feb 2012
Location: Boston
The "Last Read" icon on the status bar sends out the intent com.bn.nook.launch.LAST_BOOK
This would normally be handled by Home.apk

If you deleted Home.apk and are using my Library.apk it has its own receiver for that.
Depending on which version Nook software you have it will query
  • content://com.bn.nook.reader.providers.lastreadingpointprovi der/
  • content://com.bn.nook.reader.common.providers.lastreadingpoi ntprovider/
The LRP database is maintained by the Reader(RMSDK).apk.
Checking for the latest modification gives you the last book read.
My Library.apk sends an intent out to open that book.

Currently Library.apk does not update the order of books displayed in "Last read" unless the refresh button is hit.

Two things to look for if you are having problems:
  • If you let the battery die and the WiFi is always off the clock time will be wrong.
  • If you crash or shutdown improperly Reader(RMSDK).apk will not get a chance to update the LRP.

P.S. I just noticed a possible anomaly if you read PDF's in the reader too.

 
Renate NST
Old
#4  
Renate NST's Avatar
Recognized Contributor / Recognized Developer
Thanks Meter 783
Posts: 1,956
Join Date: Feb 2012
Location: Boston
Oh! It just occurred to me one thing.
I remember opening a book that you have been reading already and it opens at page 1.
This was tied to opening the book in different ways.
There are different ways to open a book:
  • Through the "Last Read" icon and stock Home.apk
  • Through the stock Library.apk
  • Through my Library.apk
  • Through a file manager application

The LRP database is /data/data/com.bn.nook.reader.activities/databases/lastreadingpoint.db
Code:
Select Code
CREATE TABLE lastreadingpoint
(_id integer primary key autoincrement,
 ean text,         // file URI
 luid text,
 offsetrmsdk text, // subfile path fragment
 lastupdated long, // Unix milliseconds last read
 bookdna int,      // always 1?
 sync_status int   // always 1?
);
ean (which normally might stand for European Article Number, i.e. "UPC") is a URI, not a path.
Code:
Select Code
sqlite> select ean from lastreadingpoint;
file:///sdcard/Books/aboveall.epub
...
There may be cases where a single book gets different ean's.
If you could look at LRP and see if this is so?

 
nmyshkin
Old
#5  
Senior Member
Thanks Meter 7
Posts: 117
Join Date: Nov 2013
I actually managed to locate that db file on my own (!) and what seemed to be a companion with related information (readerlocal.db). They seemed to be full of junk info (books that had since been removed, etc.) although there were no duplicate entries, which is what I had suspected.

Anyway, I got a little "brave" (i.e., foolhardy) and decided to clean up both files in a parallel way. Then I pushed them back, reset the permissions and rebooted.

Yikes. My Nook is set to go to the B&N Home screen only on reboot. That screen flickered and flashed, never filling in any of the images. I could still use the "N" button to access other parts of the system and they were working fine, but any return to the Home screen via the Back button showed it was still in distress.

So....restore from backup...again.

It seems OK for now. I have noticed that the little "refresh" button in the Library does sometimes seem to go on and on and on without any accomplishment. I have suspected the issue was how I accessed the book-in-progress as you described. Since I sometimes read more than one book at a time, I'm all over the place with how I do things (including a Library icon in my App home screen). I'm going to try being more disciplined for a while and see how it behaves.
 
richardcoop
Old
#6  
Member - OP
Thanks Meter 3
Posts: 63
Join Date: Jan 2014
Quote:
Originally Posted by nmyshkin View Post
I actually managed to locate that db file on my own (!) and what seemed to be a companion with related information (readerlocal.db). They seemed to be full of junk info (books that had since been removed, etc.) although there were no duplicate entries, which is what I had suspected.

Anyway, I got a little "brave" (i.e., foolhardy) and decided to clean up both files in a parallel way. Then I pushed them back, reset the permissions and rebooted.

Yikes. My Nook is set to go to the B&N Home screen only on reboot. That screen flickered and flashed, never filling in any of the images. I could still use the "N" button to access other parts of the system and they were working fine, but any return to the Home screen via the Back button showed it was still in distress.

So....restore from backup...again.

It seems OK for now. I have noticed that the little "refresh" button in the Library does sometimes seem to go on and on and on without any accomplishment. I have suspected the issue was how I accessed the book-in-progress as you described. Since I sometimes read more than one book at a time, I'm all over the place with how I do things (including a Library icon in my App home screen). I'm going to try being more disciplined for a while and see how it behaves.
Would it be possible to write an app that simulates opening the last read book from only one of the Library apps and then map that to the last read icon to simplify this whole system?
 
mergen3107
Old
#7  
Senior Member
Thanks Meter 5
Posts: 125
Join Date: Dec 2009
Location: Astana
Guys, if you are concerned about why sometimes the last read option goes to the 1st page, then it was already fixed by our forum users somewhere here. (I could hardly remember and trace where it all started but finally it was successfully solved)
Just install a file this package (internal.db deep in the 'data' folder. You could delete 'system' folder - this is hyphenations dictionary for Russian) through cwm or replace it manually (the zip contains detailed path) and here you go.
 
nmyshkin
Old
#8  
Senior Member
Thanks Meter 7
Posts: 117
Join Date: Nov 2013
Quote:
Originally Posted by mergen3107 View Post
Guys, if you are concerned about why sometimes the last read option goes to the 1st page, then it was already fixed by our forum users somewhere here. (I could hardly remember and trace where it all started but finally it was successfully solved)
Just install a file this package (internal.db deep in the 'data' folder. You could delete 'system' folder - this is hyphenations dictionary for Russian) through cwm or replace it manually (the zip contains detailed path) and here you go.
Now that was an interesting trip! Once I had Google do some translating there were a number of really interesting posts that were (mostly) intelligible. I'd want to compare that modified internal.db file with what's already on my Nook before I did any replacing. A lot of the work from that site is "russified" (not surprisingly) and there may be other changes there not really needed/wanted, but it's a good start.

I noticed in another posting there that someone said there is a related issue with in what state the Nook is connected via USB. Apparently the hypothesis is that if you don't connect while in the Library you stand a good chance of scrambling the "reading now" database entry. I've certainly been hooking up with my Nook in all kinds of states, so if that's correct, no wonder my database file was so messed up!
 
nmyshkin
Old
#9  
Senior Member
Thanks Meter 7
Posts: 117
Join Date: Nov 2013
Installation of the internal.db file from the Russian source will not work. I've tried a side-by-side comparison of the file with the one from my Nook (FW 1.21) and there are differences (beyond the region identifier, which is easily changed). It's not at all clear what changes have been made or from what firmware the modified file came. In any case, it causes havoc when exchanged for the native internal.db

The Russian discussion points to this thread on XDA which approaches (and apparently solves) the problem another way. I'm going to give it a try.
 
richardcoop
Old
#10  
Member - OP
Thanks Meter 3
Posts: 63
Join Date: Jan 2014
Quote:
Originally Posted by nmyshkin View Post
Installation of the internal.db file from the Russian source will not work. I've tried a side-by-side comparison of the file with the one from my Nook (FW 1.21) and there are differences (beyond the region identifier, which is easily changed). It's not at all clear what changes have been made or from what firmware the modified file came. In any case, it causes havoc when exchanged for the native internal.db

The Russian discussion points to this thread on XDA which approaches (and apparently solves) the problem another way. I'm going to give it a try.
Do I read this correctly, http://bit.ly/Q7MytN from that thread there should be no problem if renates Library.apk is used exclusively and the stock Library.apk has the bug?

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


XDA PORTAL POSTS

Slide Dial Replacement Dialer Lets You Make Calls from Anywhere

If you frequently make phone calls, your dialer (aka phone app)is one of the … more

Navigate with Your Samsung Gear 2 Using DMA Navi Watch

Whether you’re travelling to a new destination or exploring some previously … more

Xperia Z1 Stereo Speaker Mod, Cell Phone Unlocking Legal Again! – XDA Developer TV

Cell Phone Unlocking is legal again!! That and much … more