05-15-2012 02:05 AM
That's what gave 400 over network and IllegalArgumentException over wifi. Seems I might be at a dead end!
05-15-2012 05:25 AM
OK, I' am being a pillock. Ignore my comments. Now thinking....
Do you see the problem on a simulator?
05-15-2012 05:33 AM
No, works fine on a simulator.
05-19-2012 11:12 AM
Sorted it with the following. No idea why it's different to the URL encoding I tried before but it works:
String _confUrl = wd.getConfirmUrl().substring(wd.getConfirmUrl().in
_url = wd.getConfirmUrl().substring(0,wd.getConfirmUrl().
URLEncodedPostData _params = new URLEncodedPostData(
URLEncodedPostData.DEFAULT_CHARSET, false);
while (_confUrl.indexOf("=") > -1) {
if (_confUrl.indexOf("&") > -1) {
_params.append(_confUrl.substring(0, _confUrl.indexOf("=")),
_confUrl.substring(_confUrl.indexOf("=") + 1, _confUrl.indexOf("&")));
_confUrl = _confUrl.substring(_confUrl.indexOf("&") + 1);
} else {
_params.append(_confUrl.substring(0, _confUrl.indexOf("=")),
_confUrl.substring(_confUrl.indexOf("=") + 1));
_confUrl = _confUrl.substring(_confUrl.indexOf("=") + 1);
}
}
_url += new String(_params.getBytes());
05-19-2012 01:04 PM
Great!!!
So basically you get a 400 when here something, currently unknown, a little weird in your URL. But only when using the mobile network.
I do so love problems like this......