Does anyone know what the max length of the json response is and whether this is the same in iOS and Android?
I currently am hitting a 400 error with my makeWebRequest when the phone is Android, but I never get the issue when it is iPhone.
I believe I have the latest version of GCM Android as I installed a fresh copy of it it last night on my wife's phone to investigate the 400 error.
The url is exactly the same as it is when sending to an iPhone, so I assume it has to be a difference in how GCM on Android handles the response compared to iPhone.
The issue happens on the newer type of devices: first reported by a Chronos user, but also reproduced by me on 935 and f5s. So I don't think it is an object count issue and it is giving 400 error, not crashing, so is different from the original issue posted here.
To me 400 means a bad request. So could it be that the default options / headers for the request are not handled correctly on Android?
I have the code as follows:var options = {
:methods => Comm.HTTP_REQUEST_METHOD_GET,
:responseType => Comm.HTTP_RESPONSE_CONTENT_TYPE_JSON
};
Comm.makeWebRequest(url, null, options, method(:onReceive));
Another thing: My url contains all the querystring parameters. I am not using the params dictionary for this purpose. Could this also be an issue?
My METAR/TAF widget regularly pulls in tightly packed (minimal hashes, single dimension arrays) JSON that is around the 1000 byte mark. If you let me know what the size of your 400-error response is, I'll doctor a special response to mimic that size for my app on Android and see if the same thing happens.
Cheers,
Douglas