Thursday, October 27, 2011

Android Application with JSON


var xhr = Titanium.Network.createHTTPClient();
xhr.onload = function()
{
    var data = JSON.parse(this.responseText);
 
    var itemList = data.list;
    var x = 0;
 
    for(var i in itemList)
    {
        var thisItem = itemList[i];
        Ti.API.info('Article Title: ' + thisItem.title);
    }
};
xhr.open('POST', 'https://readitlaterlist.com/v2/get');
xhr.send({
    format:     'json',
    username:   '--username--',
    password:   '--password--',
    apikey:     '7f5dfZc6T730xy6aobA2e66Sb7gdk507'
});
http://developer.appcelerator.com/question/46881/trying-to-parse-jsonxml---works-fine-on-iphone-not-on-android

No comments:

Post a Comment