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 5982619
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T22:06:47+00:00 2026-05-22T22:06:47+00:00

I have a application requirement in Android. In my application I want to add

  • 0

I have a application requirement in Android. In my application I want to add files as attachments. This is to have it for quick reference.

In my layout I want to have a attach button. If the user clicks on the attach button he should get a file browser to browse the SD CARD. He must be able to select a file to attach.

I am not sure where to start of this code. I have placed a button and have a on click listener. But Inside the on click listener I am not sure what has to be done. Can you help me with some sample code or some links that can help me do it. Any kind of help is appreciated. Thank you.

  • 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-05-22T22:06:47+00:00Added an answer on May 22, 2026 at 10:06 pm

    You need an Intent to open up a file chooser. This is assuming the user has a file chooser.

    int reqCode = 1;
    Intent action = new Intent(Intent.ACTION_GET_CONTENT);  
    action = action.setType("*/*").addCategory(Intent.CATEGORY_OPENABLE);  
    startActivityForResult(action, reqCode);
    

    Note reqCode is like a ‘key’ you use later. Next you’ll override onActivityResult() in your Activity. When it runs, check to see if the requestCode matches your reqCode. If it doe, you know it’s from your intent, and can get the data packed in the incoming intent.

    This is just a brief overview, you should probably read up more on intents in the official documentation.

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

Sidebar

Related Questions

In my ASP.Net application I have a requirement that when a user clicks on
In my application I have the requirement to store, for the period the user
I have a requirement of playing a Asx stream through an Android application I
everyone. I have to build an Android application and one requirement is to be
I have a requirement in my application that I think can be met by
I have a strange requirement to ship an application without bundling .Net framework (to
My requirement is I have server J2EE web application and client J2EE web application.
I have the requirement to support different Master pages on my application (ASP.NET MVC).
Normally I create web application projects and use code-behind, but I have a requirement
Hi I am trying to deploy an application using webstart. I have a requirement

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.