When i use ajax code to retrieve a json data, in tizen wearable emulator 2.3.1, I'm getting not able to connect to proxy error.
But when I searched, everyone is telling no need to give any specific proxy settings for emulator. If internet works fine in Tizen ide, then it will work in Tizen emulator too. But I'm getting proxy error.
Can someone help me solve this proxy error?
Update:
Where should I change the proxy?
Code sample:
$.getJSON( "http://api.geonames.org/citiesJSON? north=44.1&south=-9.9&east=-22.4&west=55.2&lang=de&username=demo", function( data ) {
$('#divText').html(data.result);
})
.fail(function( err ) {
//Never called
console.log( err );
});
}
Add internet access privilege for your Tizen application in the config.xml file.Internet Privilege allows the application to access the Internet.
<tizen:privilege name="tizen.org/privilege/internet"/>
Also defining external access Policy may be required to access network. According to the W3C Access Requests Policy (WARP), you cannot access external network resources by default. If you require access to an external network resource, you must request network resource permissions for the Web application using the Policy in the config.xml file.
<access origin="*" subdomains="true"/>
Now your application should be able to access internet from the emulator as well as real devices.