Closed lindow2009 closed 7 years ago
@lindow2009
public class AdvancedWebViewActivity extends Activity {
AdvancedWebView advancedWebView;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
advancedWebView = new AdvancedWebView(this);
advancedWebView.getSettings().setJavaScriptEnabled(true);
advancedWebView.loadUrl("http://baidu.com");
setContentView(advancedWebView);
}
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
advancedWebView.onActivityResult(requestCode, resultCode, data);
}
}
@pengwei1024 Thanks for helping out!
@lindow2009 Did you try what @pengwei1024 suggested? This is documented in the README as well, but the suggested snippet is what's essential here.
At least, it works for me! Thanks.
yes,i just use sample code. and my web code is `
</div>
var uploadImage = document.getElementById('uploadImage');
var camera = uploadImage.getElementsByTagName('input')[0];
camera.addEventListener('change',function(){
},!1); ` it doesn't work
@lindow2009 If you're really on Android 6.0 and if you used the code posted by @pengwei1024 then this should work fine, just as it seems to be working for @chamnap (Thanks!).
Your HTML code for the upload form has a restriction on the accept
attribute, it uses the capture
attribute and has some custom JavaScript code. Please try removing all that for testing purposes. You should really try a minimum working example in order to see where the bug is.
android 6.0 Sumsang galaxy note4 upload file failed click input button open file choose window,but choose file not work and the button cann't click twice! how to fix this issue?