Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8660217
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T16:12:06+00:00 2026-06-12T16:12:06+00:00

I need to be able to open a file upload menu from AndroidAddMember.aspx page

  • 0

I need to be able to open a file upload menu from AndroidAddMember.aspx page in a web view. I found this fix but I dont think im implementing it correctly. Fix

The file upload button works fine in a browser on phone and pc but once in a web view the button does not work.

I embed the page with the button in my first case statement below.

Any help would be great. Thanks

@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
public boolean onOptionsItemSelected(MenuItem item) {    
    // Handle item selection    
    switch (item.getItemId()) {        
    case R.id.register:            

        wv = new WebView(this);  
        wv.setWebViewClient(new WebViewClient());   
        wv.getSettings().setJavaScriptEnabled(true); 

        wv.loadUrl("http://www.mysite.com/AndroidAddMember.aspx"); 

          wv.setWebViewClient(new WebViewClient());    
          wv.setWebChromeClient(new WebChromeClient()    
          {    
                 //The undocumented magic method override    
                 //Eclipse will swear at you if you try to put @Override here    

              public void openFileChooser(ValueCallback<Uri> uploadMsg) {    

                  mUploadMessage = uploadMsg;    
                  Intent i = new Intent(Intent.ACTION_GET_CONTENT);    
                  i.addCategory(Intent.CATEGORY_OPENABLE);    
                  i.setType("image/*");    
                  Myactivity.this.startActivityForResult(Intent.createChooser(i,"File Chooser"), FILECHOOSER_RESULTCODE);    

                 }    
        });    
            setContentView(wv);    


                 return true;
    default:            
        return super.onOptionsItemSelected(item);    
        }
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T16:12:08+00:00Added an answer on June 12, 2026 at 4:12 pm

    In reality the webview dont allow to upload a file this way. Either you have to create a upload button in menu of your app. And take the file input and then upload to your website through http .

    Or better you should use phonegap to make it possible . In phone gap you can use file uploading and downloading easily.

    http://docs.phonegap.com/en/2.1.0/cordova_file_file.md.html#File

    Only this way you can upload the file to your server or no way. Webview only provides basic functionality.

    you might better use this way.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to be able to send a file to another website from server-side
I want to be able to open a file chooser dialog, from which I
I have a need to be able to open a file on disk but
I need to be able to provide web access to interact with a file
I need to open a png image file and display it. I am able
I'm implementing some file upload feature through ajax request. I'd like to be able
I need to upload a very large file to my server, through my Flex
Here is what I am looking for: I need to open a zip file
I'm working on a program for which I need to be able to open
I have a .sdb database file which I need to open. It's the database

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.