what's the frequency of the letter "t" in:
q: getting more than 2000 records in salesforce native android app using restrequest.getrequestforquery() i'm in a tricky situation where my org has more than 2,000 records for objects which i'm trying to fetch in my android native app
restrequest restrequest = restrequest.getrequestforquery( getstring(r.string.api_version), soql);

and then i get the response using
registrationactivity.client.sendasync(restrequest, new asyncrequestcallback() {
@override
  public void onsuccess(restrequest request, restresponse result) {
}

this approach suffers the limitation that it can only return 2,000 records in the soql. in the response, i'm getting the nextrecordsurl in the response and i can retrieve it as
nextrecordsurl =result.asjsonobject().getstring("nextrecordsurl").tostring();

now, my understanding is that i will need to fire http get requests to this url using this approach
http h = new http();
httprequest req = new httprequest();
req.setendpoint("http://na1.salesforce.com" + nextrecordsurl);
req.setmethod('get');
req.setheader('authorization', 'oauth ' + userinfo.getsessionid());
req.setheader('content-type', 'application/json');
httpresponse res = h.send(req);

and then parse the response. while this approach is theoretically possible, i'm not very keen on mixing 2 approaches - getting the initial records using restclient getrequestforquery() method and follow up data (more than 2,000 records) using the httprequest method.
can anyone guide me on the correct/ coherent way of fetching object data (more than 2,000 records) in a native force.com android app?

a: the restrequest object (which you initially construct one of with the getrequestforquery method), has a generic constructor which you can use for the querymore case.
restrequest querymore = new restrequest(restmethod.get, nextrecordsurl, null);

you can then use the restrequest object the exact same way as before by passing it to sendasync on your restclient instance.

user
The passage contains one hundred and seventy-five "t"s.
assistant