I am using simple webview for my responsive website. App is working fine but the file upload control is not working, I can't upload images, docs, ppt or excel files from the app.
I have created webview in android studio.
I have added following code
Uri uri = Uri.parse("https://myurl.com/");
Intent intent = new Intent(Intent.ACTION_VIEW, uri);
startActivity(intent);
final Activity activity = this;
mWebView.setWebChromeClient(new WebChromeClient() {
public void onProgressChanged(WebView view, int progress) {
activity.setProgress(progress * 1000);
}
});
mWebView.setWebViewClient(new WebViewClient() {
public void onReceivedError(WebView view, int errorCode, String description, String failingUrl) {
Toast.makeText(activity, "Oh no! " + description, Toast.LENGTH_SHORT).show();
}
});
But it opens app in browser. Can anyone help me?