implementing upload and camera function at the same class Android

view story

http://stackoverflow.com – am trying to use both the upload function and camera function in my application. However, when I have the uploading and camera function code on the same class one of them doesn't work. this is my code for taking a camera image and uploading an image private void addingImage() { AlertDialog.Builder imageAlertDialog = new AlertDialog.Builder(AddProduct.this); imageAlertDialog.setMessage("Choose one of the following to upload image"); imageAlertDialog.setPositiveButton("Use Camera", new DialogInterface.OnClickListener() { //THE CAMERA FUNCTION @Override public voi (HowTos)