I have a native android application to display a web site. I'm a newbie. I used a webview object to display the site, everything works perfect except the file upload. I tried anything i saw on the internet but i couldn't find a way out of this problem. When i tap the file upload, nothing happens.No error, no other actions... I'm just getting a warning like "openFileChooser is never used locally". I read articles about this warning but i'm really stuck. I'm testing it on a Galaxy S3 Icecream sandwich. Any help will be appreciated.
WebView webView;
private ValueCallback<Uri> mUploadMessage;  
private final static int FILECHOOSER_RESULTCODE=1; 
@Override  
 protected void onActivityResult(int requestCode, int resultCode,  
                                    Intent intent) {  
  if(requestCode==FILECHOOSER_RESULTCODE)  
  {  
   if (null == mUploadMessage) return;  
            Uri result = intent == null || resultCode != RESULT_OK ? null  
                    : intent.getData();  
            mUploadMessage.onReceiveValue(result);  
            mUploadMessage = null;  
  }  
 }  
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_form_content_view);
    // Show the Up button in the action bar.
    setupActionBar();
    Intent intent = getIntent();
    final String message = intent.getStringExtra(ListOfForms.EXTRA_MESSAGE);
    WebViewClient wvc=new WebViewClient() {
        public void onReceivedError(WebView view, int errorCode, String description, String failingUrl) {
             if (errorCode == 401) {             
                 webView.setHttpAuthUsernamePassword("http://project.mysite.com","mydomain","myuser","mypass");
             }
           }
        public void onReceivedHttpAuthRequest(WebView view,
        HttpAuthHandler handler, String host, String realm)        {
      handler.proceed("myuser", "mypass"); 
        }
    };
    WebChromeClient wcc = new WebChromeClient() {
         public void onGeolocationPermissionsShowPrompt(String origin, GeolocationPermissions.Callback callback) {
            callback.invoke(origin, true, false);
         }
         public void openFileChooser(ValueCallback<Uri> uploadMsg) {  
          mUploadMessage = uploadMsg;  
          Intent i = new Intent(Intent.ACTION_GET_CONTENT);  
          i.addCategory(Intent.CATEGORY_OPENABLE);  
          i.setType("image/*");  
          FormContentView.this.startActivityForResult(Intent.createChooser(i,"File Chooser"), FILECHOOSER_RESULTCODE);  
         } 
    };
    webView = (WebView) findViewById(R.id.wvFormContent);
    webView.setWebChromeClient(wcc);
    webView.setWebViewClient(wvc);
    webView.getSettings().setJavaScriptEnabled(true);
    webView.getSettings().setGeolocationEnabled(true);
    webView.getSettings().setJavaScriptCanOpenWindowsAutomatically(true);
    webView.getSettings().setAllowFileAccess(true);
    webView.getSettings().setAllowContentAccess(true);
    webView.getSettings().setAppCacheEnabled(true);
    webView.getSettings().setDatabaseEnabled(true);
    webView.getSettings().setDomStorageEnabled(true);
    webView.loadUrl("http://project.mysite.com");
    String myVariable = "dummy";
    webView.loadUrl("javascript:document.getElementById('txtMyVariable').text = '"+myVariable+"';");
}
private void setupActionBar() {
    getActionBar().setDisplayHomeAsUpEnabled(true);
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
    // Inflate the menu; this adds items to the action bar if it is present.
    getMenuInflater().inflate(R.menu.form_content_view, menu);
    return true;
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
    switch (item.getItemId()) {
    case android.R.id.home:
        NavUtils.navigateUpFromSameTask(this);
        return true;
    }
    return super.onOptionsItemSelected(item);
}
 
     
    