Timeout error on Android browsers (simulator and device)

Mar 30, 2012 at 3:56 PM

Hi all,

The issue I'm having is that an OData.read request will timeout from an Android device (or simulator).  The exact same code works in Chrome on my laptop.  Please let me know if there is something I'm overlooking.  Any help is appreciated!

Here is the source:

		<button id="searchButton">go</button>
		<p id="text">Testing datajs and odata stuff.</p>
		<script type="text/javascript" src="js/datajs-1.0.2.min.js"></script>

		<script type="text/javascript">
			var clickEventFunction = function () 
	    			var onSuccess = function(data, resomething)
					alert( "success" );
					var paragraph = document.getElementById( "text" );
					paragraph.innerHTML = data.results[0].Name;

	    			var onError = function(error)
		    			var paragraph = document.getElementById( "text" );
		    			paragraph.innerHTML = error.message;

            			OData.defaultHttpClient.enableJsonpCallback = true;
            			OData.read("http://odata.netflix.com/v1/Catalog/Genres?$top=3", onSuccess, onError);


			var searchButton = document.getElementById( "searchButton" );
			searchButton.addEventListener("click", clickEventFunction);

Apr 3, 2012 at 9:27 PM

Hi Akinzie,

    There seems to be a problem with the Android browser in which the JSONP callback is not invoked... I've found serval posts similar to this one on the web http://stackoverflow.com/questions/9397863/jsonp-request-callback-not-being-called .  Still I will take a look, could you please let me know which Android version are you using?


Alex Trigo.

Apr 3, 2012 at 9:55 PM

Thanks for the response!  The Android device I'm using is version 3.2.  But on the emulator I tried 2.2 and 4.0.3, and they all behaved the same way.