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 Answer