The code below is in a Flex mobile app. It debugs fine in desktop emulation, on an iPhone4 and on a Droid (Android 2.2) -- i.e., it get the token without fail.
The Flex API is 3.0 and the AGS build (i.e., token server) is 10.03
On a Droid RAZR MAXX (supported by Flex) with Android 4.04, the returned Fault event does not have a message that contains anything meaningful - like a 403 error. The status code is 0 - just a generic IOErrorEvent (See screen grab)
TIA
[ATTACH=CONFIG]17051[/ATTACH]
private function RequestToken(username:String, password:String, tokenServiceURL:String):void {
var http:HTTPService = new HTTPService();
http.addEventListener( ResultEvent.RESULT, tokenResultHandler );
http.addEventListener( FaultEvent.FAULT, faultHandler );
var param:Object = {
"request" : "gettoken",
"username": username,
"password": password,
"clientid" : "requestip",
"expiration" : 3600
};
http.url = tokenServiceURL;
http.method = "POST";
http.resultFormat = "text";
http.request = param;
http.send();
}
private function tokenResultHandler(event:ResultEvent):void {
var restToken:String = StringUtil.trim(event.result.toString());
navigator.pushView(AnotherView, restToken, null, null);
}
private function faultHandler(event:FaultEvent):void
{
trace("FAIL!!!!!!");
trace(" Your RAZR MAXX does not compute.");
}