And Google broke Raccoon again…

Why do they always do this when I have absolutely no spare time to fix problems?


Problem description: Pagination is broken. You just get the first page over and over again when trying to get more results.

Analysis: In the past (talking Gingerbread times here), pagination was the job of the client app. A search request was a HTTP GET request with four url parameters:

  • “c”: category number (apps, music, …)
  • “q”: query text (what the user typed into the form)
  • “o”: offset (number of entries to skip in the result set)
  • “l”: length (number of entries to put in the result set)

So, assuming you wanted 15 entries per page and see the third page, you’d give Play o=45 and l=15.

This pagination mechanism is reasonably idiotic and a considerable pain to implement on the client. It’s also not a meaningful thing to do on the server either. An app could always get a sudden popularity boost in between queries and that would mess pagination up (in the worst case, you would see one app twice and the boosted app not at all). So I guess that’s why Google retired client side pagination. You can still pass a length parameter, it seems, but the offset is now ignored. The new way of doing things is to navigate through a linked list. That is, every search response contains “next” url from which subsequent pages can be retrieved.

Personally, I think thats a great change, as it makes client side filtering of search results possible, but it also means that Google is phasing out pre Jelly Bean support from Play (not really sure what Android Version Raccoon’s communication layer is based upon).

Workaround: None (except changing the pagesize in replace withLimit(10) with whatever you find appropriate). This is a non trivial change and in the worst case requires rewriting a piece of the com layer. Not sure when I’ll find the time for that.


Posted in Android, Note to self