I am newbie for android and trying to include a file uploader in android application. But I can’t find in any relevant control for that. I want to place a control like this Image
What should I do for achieving this task?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
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.
There is no inbuilt control for uploading a file in Android. In java we are having a file-chooser to browse the file. in android you have to do this to select a file either from camera or gallery.
final String[] items = new String[] { “Take picture”,
“Choose from Gallery” };
ArrayAdapter adapter = new ArrayAdapter(this,
android.R.layout.select_dialog_item, items);
AlertDialog.Builder builder = new AlertDialog.Builder(this);
Now on
onActivityResultyou need to handle this according to your need.Thanks