Tried this to get image from both gallery and Camera using Dialog button. Not able to get the dialog. 
<p>This is my code to get image from Camera and gallery:</p>

<pre><code>             upload.setOnClickListener(new View.OnClickListener() {

        public void onClick(View v) {





            AlertDialog.Builder builder = new AlertDialog.Builder(CreatePod.this);
            builder.setMessage("Select") .setCancelable(false).setPositiveButton("Gallery", new DialogInterface.OnClickListener() {
                   public void onClick(DialogInterface dialog, int id) {
                       Intent gallIntent=new Intent(Intent.ACTION_GET_CONTENT);
                        gallIntent.setType("image/*"); 
                        startActivityForResult(gallIntent, 10);
                   }
            })

            .setNegativeButton("Camera", new DialogInterface.OnClickListener() {
                   public void onClick(DialogInterface dialog, int id) {
                       Intent cameraIntent = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE);
                       startActivityForResult(cameraIntent, 0);
                   }
               });
        AlertDialog alert = builder.create();




            if (bitmap == null) {
                Toast.makeText(getApplicationContext(),
                        "Please select image", Toast.LENGTH_SHORT).show();
            } else {
                dialog = ProgressDialog.show(CreatePod.this, "Uploading",
                        "Please wait...", true);
                //new ImageUploadTask().execute();
            }
        }
    });
</code></pre>

<p>But, it doesn't work. I don't see a dialog box either.</p>
