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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T21:02:42+00:00 2026-05-25T21:02:42+00:00

I have an app that has a user take a picture and have it

  • 0

I have an app that has a user take a picture and have it uploaded to a website.

I have this code right now:

@Override
    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
        super.onActivityResult(requestCode, resultCode, data);

        if (requestCode == CAMERA_PIC_REQUESTED) {
            if(resultCode == RESULT_OK) {   
                // Maybe add the additional code here?          

                picture = convertImageUriToFile(imageUri, this);


                Thread thread = new Thread(null, uploader, "MagentoBackground");
                thread.start();
                m_ProgressDialog = ProgressDialog.show(pictures.this, "Please wait...", "Uploading data ...", true, true);

            }
        } else if (requestCode == EXPERIMENT_CODE) {
            if (resultCode == Activity.RESULT_OK) {
                experimentInput.setText("" + data.getExtras().getInt("edu.cs.h.exp_id"));
            }
        }
    }

However, before the image is downloaded, I want to add a layout that brings up a Spinner (drop down menu) with a list of items that a user can choose from to describe the picture.

What should I add to the code so that before the picture is uploaded, a new layout is displayed, a user makes a selection and hits the OK button on that layout, and then returns back to this piece of code to continue the upload process?

  • 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-25T21:02:42+00:00Added an answer on May 25, 2026 at 9:02 pm
    static final int _MY_DIALOG_ = 11;
    
    if(resultCode == RESULT_OK) {   
        showDialog(_MY_DIALOG_);
    }
    
    @Override
    protected Dialog onCreateDialog(int id) {
        if(id==_MY_DIALOG_){
            CharSequence[] shush = new CharSequence[10];
            //initialize shush
            Dialog dialog = new AlertDialog.Builder(this).setTitle("Select Animation")
                .setSingleChoiceItems(shush, 0,
                new DialogInterface.OnClickListener() {
                    @Override
                    public void onClick(DialogInterface dialog, int which) {
                        //the user has selected which!!!
                        dialog.dismiss();
                    }
                }).create();
            dialog.setOnDismissListener(new OnDismissListener() {
                @Override
                public void onDismiss(DialogInterface arg0) {
                    //do what you want now since the user selected!
                    picture = convertImageUriToFile(imageUri, this);
                    Thread thread = new Thread(null, uploader, "MagentoBackground");
                    thread.start();
                    m_ProgressDialog = ProgressDialog.show(pictures.this, "Please wait...", "Uploading data ...", true, true);
                }
            });
            return dialog;
        }
        return null;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this app that originally has you take a picture, shows you a
I have an app that has some configuration settings stored in SharedPreference. Now I
I have a web app that has a few processes that can take up
Hi I'm writing an app that has multiple activities. Right now it starts at
I have an app that allows the user to take and save a new
Have an app that has listings - think classified ads - and each listing
I have an app that has different names for different languages. How do I
I have an app that has a centre view with two views off to
I have an app that has a tabbar at the bottom. When I select
I have an app that has a TableView, NavigationView and TabBar running together. There

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.