I am using the following code in the main activity , its giving the function display() is not defined
public class cordovaExample extends DroidGap {
Cont
From Cordova 2.6 you can override onMessage in your CordovaActivity (DroidGap), you have to capture the message "onPageFinished", then you can call any function declared on the document:
@Override
public Object onMessage(String id, Object data) {
if("onPageFinished".equals(id)) {
sendJavascript("display('abc');");
}
return super.onMessage(id, data);
}
And in the HTML:
Other option is to call it in the onResume() function of the CordovaActivity:
@Override
public void onResume() {
super.onResume();
sendJavascript("display('abc');");
}