Based on GeoTweet example from Sencha, I am trying to develop an Android App using PhoneGap and Sencha that reads a JSON as shown in this example code: https://github.com/nelstrom/GeoTweets/blob/master/public/javascripts/geotweets.js
My code looks like:
var refresh = function() {
alert("Yo");
Ext.util.JSONP.request({
url: 'http://localhost:3000/actors.json',
callbackKey: 'callback',
params: {
time : new Date().getTime()
},
callback: function(data) {
alert("Yo Yo");
data = data.results;
}
});
};
Here, the first alert is displayed but Ext.util.JSONP.request is never executed (I don’t see request being logged by my server) I am not sure is going wrong here.
Instead of localhost put in 10.0.2.2 so you URL will be http://10.0.2.2:3000/actors.json