After screwing around for so many days, i finally found a workaround for uploading files through webview in Android 4+ i am using AgateWebView. link in this answer. however, i cannot get it to work as per my requirement. i want a webkit webview which extends an activity and still uses the AgateWebview for uploading files.
here is my code, i am unable to extend activity. i know i am doing it wrong, but this was what i have tried so far.
public class MainActivity extends MOMLActivity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
MOMLWebKit.init(getMomlView());
this.loadApplication("moml/applicationInfo.xml");
}
@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
// if (keyCode == KeyEvent.KEYCODE_MENU) {
// getMomlView().getRoot().runCommand("function.root.onMenuKey", null);
// return true;
// }
return super.onKeyDown(keyCode, event);
}
protected void onDestroy() {
super.onDestroy();
System.exit(0);
}
}
This webview seems to load an .xml file instead of an activity layout xml and also instead of extending Activity
, it extends MOMLActivity