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

  • Home
  • SEARCH
  • 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 8585055
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T21:58:00+00:00 2026-06-11T21:58:00+00:00

I have a register page that has a file upload button on it. This

  • 0

I have a register page that has a file upload button on it. This is a aspx page in C#.

When i run it in a browser it works fine.
When i run it in a web view in an android app it does not launch the file menu in you android phone.
When i run the page in a browser on my android phone it lanuches the file menu on my phone just fine.

How do i get it to work in a web view.

My asp tag.

<asp:FileUpload ID="FileUpload1" runat="server" Height="30px" Width="217px" />

my android web view

case R.id.register:            
mWebView2 = (WebView) findViewById(R.id.webview);    
mWebView2.getSettings().setJavaScriptEnabled(true);    
mWebView2.loadUrl("www.mysite.com/AndroidAddMember.aspx");
mWebView2.setWebViewClient(new HelloWebViewClient());           
return true;  

I tried to implement your code that you suplied. Im getting an error on FILECHOOSER_RESULTCODE now.
The error is FILECHOOSER_RESULTCODE cannot be resolved to a variable.

case R.id.register:            
        //mWebView2 = (WebView) findViewById(R.id.webview);    
        //mWebView2.getSettings().setJavaScriptEnabled(true);    
        //mWebView2.loadUrl("http://www.bangmeornot.com/AndroidAddMember.aspx");
        //mWebView2.setWebViewClient(new HelloWebViewClient());   
        mWebView2.setWebChromeClient(new WebChromeClient()   
        {   
            //The undocumented magic method override   
            //Eclipse will swear at you if you try to put @Override here   
            public void openFileChooser(ValueCallback<URL> uploadMsg) {   

            ValueCallback<URL> mUploadMessage = uploadMsg;   
            Intent i = new Intent(Intent.ACTION_GET_CONTENT);   
            i.addCategory(Intent.CATEGORY_OPENABLE);   
            i.setType("image/*");   
            BangMeorNot.this.startActivityForResult(Intent.createChooser(i,"File Chooser"), FILECHOOSER_RESULTCODE);        
            }   
        });   

        return true;    
  • 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-11T21:58:02+00:00Added an answer on June 11, 2026 at 9:58 pm

    Apparently the stock browser uses an undocumented method to accomplish file uploads. Here’s what you have to do to enable this functionality in your app:

    mWebView2.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/*");  
        MyAwesomeActivity.this.startActivityForResult(Intent.createChooser(i,"File Chooser"), FILECHOOSER_RESULTCODE);       
        }  
    });  
    

    Note: The exact parameters for this function have changed throughout the various versions of Android. For a solution which works across all Android versions, check out this question, or try using the parameters listed in this answer.

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

Sidebar

Related Questions

I have a web application where I am doing a Response.Redirect(Register.aspx) page in a
I have a register page that has 3 drop down boxes for day month
I do have a page that has a TextBox a Button and a Datagrid.
I have a register page that saves the data to a database the only
I have this register system that doesn't work. Can you please help me!! Also
Okay, so I have this page, which has one Ajax:AsyncFileUploader also some other ajax
I have a Drupal website that has a page at the URL alias of
I have an FCKEditor with a toolbar on an ASPX page that I use
I have a page that is used to register people for training. The current
I have a page that contains a HiddenField control, I register some javascript on

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.