On the computer it works fine, so no error messages, but on the mobile device I am unable to debug so I can't see any error messages, but I am sure callback function is not being called, the request is not being made at all. I can confirm this because I have set the PHP file to create a file on the disk when it is requested.
So the request is not going through or something, and the callback function is not being triggered, I don't have android SDK, is there a way for me to remotely debug my apps?
I believe the build process by phonegap is causing this, but I don't know how or why.
As I mentioned before, I created a new project and did not modify it, trying to isolate the problem, I just edited the main view, here it is:
Code:
Ext.define('ajaxTest.view.Main', {
extend: 'Ext.tab.Panel',
xtype: 'main',
requires: [
'Ext.TitleBar',
'Ext.Video',
'Ext.Ajax'
],
config: {
tabBarPosition: 'bottom',
items: [
{
title: 'Welcome',
iconCls: 'home',
id: 'home',
styleHtmlContent: true,
scrollable: true,
items: {
docked: 'top',
xtype: 'titlebar',
title: 'Welcome to Sencha Touch 2',
},
html: [
"You've just generated a new Sencha Touch 2 project. What you're looking at right now is the ",
"contents of <a target='_blank' href=\"app/view/Main.js\">app/view/Main.js</a> - edit that file ",
"and refresh to change what's rendered here."
].join(""),
},
{
xtype: 'button',
iconCls: 'refresh',
handler: function(){
Ext.Ajax.request({
url: 'http://192.168.0.200/DVD/store.php',
timeout:80000,
callback: function(options, success, response) {
var home = Ext.getCmp('home');
home.setHtml(response.responseText);
}
});
},
}
]
}
});
Then I ran 'sencha app build android', I zipped the contents of android directory and uploaded them to phonegap.