введите описание изображения здесь
function loginState(){
$.ajax({
type : 'POST',
url: "https://www.examplesite.com",
contentType : "application/json; charset-utf-8",
data : JSON.stringify({
action : 'appLoginState'
}),
success: function(result){
if(result['state'] == false){
window.location.href = ("file:///android_asset/www/index.html");
}else if(result['state'] == true){
window.location = ('main.html');
}
},
error: function(xhr, status, error){
alert(xhr.responseText);
}
});
}
window.location.href = ("file: ///android_asset/www/index.html");не работает.