I am developing an app where i am using browser field to load html files in it. My code is as follows.
Main.java
//pushing screen to browser field page..
public Main()
{
// Push a screen onto the UI stack for rendering.
pushScreen(new WebViewController());
}
WebViewController.java
BrowserFieldConfig bfConfig = new BrowserFieldConfig();
bfConfig.setProperty(BrowserFieldConfig.NAVIGATION_MODE,
BrowserFieldConfig.NAVIGATION_MODE_POINTER);
bfConfig.setProperty(BrowserFieldConfig.JAVASCRIPT_ENABLED,
Boolean.TRUE);
bfConfig.setProperty(BrowserFieldConfig.ALLOW_CS_XHR, Boolean.TRUE);
bfConfig.setProperty(BrowserFieldConfig.INITIAL_SCALE, new Float(0.0));
bwf = new BrowserField(bfConfig);
add(bwf);
UiApplication.getUiApplication().invokeLater(new Runnable() {
public void run() {
// TODO Auto-generated method stub
bwf.requestContent("local:///html/index.html");
}
}, 500, false);
All my server code & UI design is in javascript & html pages respectively which invokes from index.html page...
As per the following code it is working(executing) in simulator & getting data from server during runtime. But when i am running in BlackBerry device only UI design is loading from index.html page but not getting the data from server. I am not getting any idea whats the error is. I enabled javascript in Blackberry device also but still it is not working..
As i am new to this blackberry developing, unable to find whats there problem with my app while running in Blackberry device.
As per the following code should i have to add any external code to get data from server (like just to access internet in Blackberry device after signing)
In simulator it is working good & getting data from server. When executing in Blackberry device only main page UI (UI in index.html) is loading but not getting data from server.
Can anyone help me with this.....