Android Webview app, uploading image not working, nothing happens when tap select photo
<p>I have create an Android Webview app and it works normally, but when i tap buttons which are used to upload photo, nothing happens. I m attaching my code so you guys can help me out </p>

<p>MainActivity.java</p>

<pre><code>public class MainActivity extends AppCompatActivity {
private WebView myWebView;


private ValueCallback&lt;Uri&gt; mUploadMessage;
private final static int FILECHOOSER_RESULTCODE = 1;

@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    myWebView = new WebView(this);
    WebSettings webSettings = myWebView.getSettings();
    webSettings.setJavaScriptEnabled(true);

    myWebView.setWebViewClient(new WebViewClient());
    myWebView.setWebChromeClient(new WebChromeClient() {
        //The undocumented magic method override
        //Eclipse will swear at you if you try to put @Override here
        public void openFileChooser(ValueCallback&lt;Uri&gt; uploadMsg) {
            MainActivity.this.showAttachmentDialog(uploadMsg);
        }

        // For Android &gt; 3.x
        public void openFileChooser(ValueCallback&lt;Uri&gt; uploadMsg, String acceptType) {
            MainActivity.this.showAttachmentDialog(uploadMsg);
        }

        // For Android &gt; 4.1
        public void openFileChooser(ValueCallback&lt;Uri&gt; uploadMsg, String acceptType, String capture) {
            MainActivity.this.showAttachmentDialog(uploadMsg);
        }
    });

    this.setContentView(myWebView);

    myWebView.loadUrl("http://www.droidocial.com");
}

private void showAttachmentDialog(ValueCallback&lt;Uri&gt; uploadMsg) {
    this.mUploadMessage = uploadMsg;

    Intent i = new Intent(Intent.ACTION_GET_CONTENT);
    i.addCategory(Intent.CATEGORY_OPENABLE);
    i.setType("*/*");

    this.startActivityForResult(Intent.createChooser(i, "Choose type of attachment"), FILECHOOSER_RESULTCODE);
}

@Override
protected void onActivityResult(int requestCode, int resultCode, Intent intent) {
    if (requestCode == FILECHOOSER_RESULTCODE) {
        if (null == this.mUploadMessage) {
            return;
        }
        Uri result = intent == null || resultCode != RESULT_OK ? null : intent.getData();
        this.mUploadMessage.onReceiveValue(result);
        this.mUploadMessage = null;
    }
}

@Override
public void onBackPressed() {
    if (myWebView.canGoBack()) {
        myWebView.goBack();
    } else {
        super.onBackPressed();
    }
}
</code></pre>

<p>AndroidManifest.xml</p>

<pre><code>  &lt;uses-permission android:name="android.permission.INTERNET"&gt;&lt;/uses-permission&gt;
&lt;uses-permission android:name="android.permission.CAMERA"&gt;&lt;/uses-permission&gt;
</code></pre>

<p>
    
    </p>

<pre><code>&lt;application
    android:allowBackup="true"
    android:icon="@mipmap/ic_launcher"
    android:label="@string/app_name"
    android:supportsRtl="true"
    android:theme="@style/AppTheme"&gt;

    &lt;activity android:name=".Splashscreen"&gt;
        &lt;intent-filter&gt;
            &lt;action android:name="android.intent.action.MAIN" /&gt;

            &lt;category android:name="android.intent.category.LAUNCHER" /&gt;
        &lt;/intent-filter&gt;
    &lt;/activity&gt;

    &lt;activity android:name=".MainActivity"&gt;
        &lt;intent-filter&gt;
            &lt;action android:name="com.official.droidocial.droidocial.MAINACTIVITY" /&gt;

            &lt;category android:name="android.intent.category.DEFAULT" /&gt;
        &lt;/intent-filter&gt;
    &lt;/activity&gt;
&lt;/application&gt;
</code></pre>

<p></p>

<p>I tried too much, but still stuck in this error, can someone tell me how can I resolve this error. </p>