Tuesday, July 19, 2011

Re: [android-developers] Stock browser not altering the history database properly on back button press

Yeah, this test would work only for new URL in the history.
What you are doing is right, since you want to get the URL of
currently rendered web page.

I would change the following in your cursor:

final String whereClause = Browser.BookmarkColumns.VISITS + " > 0";

... and don't do any conditions on DATE. Could the date be negative or
zero? and if so, what does that mean? Regardless of the answer, you
could be discarding valuable data, as you don't know, what is the
right value of the DATE column. If it is milliseconds since 1.01.1970.
then it will always be > 0. If it is some other convention and it
could have negative values, then you are filtering potentially good
data.

Also

final String orderBy = Browser.BookmarkColumns.DATE + " DESC";

... so that the first row returned is the one you are looking for.


Other than this, I can't think of anything else you have missed.

Daniel

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

No comments:

Post a Comment