I am trying to do request cross domain using phonegap/cordova v2.4 in Kindle Fire. I am also using jquery/jquery mobile for the test case. I have had no issues in the past with android devices but when I migrated to Kindle, I cant seem to get the requests to work. My very Simple JS
function deviceInfo(){
alert('hi');
$.ajax({
url: "URL",
dataType: 'jsonp',
crossDomain:true,
success: function(suc){
alert('suc');
},
failure:function(msg){
alert('msg');
}
});}
$(function() {
document.addEventListener("deviceready", deviceInfo, true);
});
My config file for phonegap has the following
<access origin="*" />
<access origin=".*"/>
<access origin="http://127.0.0.1*" />
<access origin="http://localhost:65198*" />
I have tried multiple variations to try to get it to allow any url but cross domain still seems to be an issue. I can test it locally in a web browser and it works fine. I have also tried using a local and remote server and neither work in the app but fine in the browser.
Also tried phonegap jQuery .ajax cross domain requests work in browser, fail in Android SDK And I have these permissions
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.READ_PHONE_STATE" />