Android Image Handling : Strange behavior for me
<p>I am using Camera from Android in my application ...... my requirement is , I am capturing live picture and saving it on a location decided by me not in a Camera folder from Gallery.
And then fetching photos with the help of Uri and displaying it in my application. </p>

<p>But what I have implemented is running properly on some device and on some devices my code couldn't able to create folder and captured image .... so I get nothing when my application wants to display photos.</p>

<p>I have tried my app on Galaxy S and Galaxy SII .... On galaxy S its not working properly, and strange thing is on some SII devices its working properly but some fails to create image and folder on specified location. But on Galaxy Tab everything is working fine.</p>

<p>Also I have tested it on Nexus S .... here problem is something different, on Nexus S when I start camera and capture an image, after that I can see image preview and there I have 2 option to save,cancel or retake .... but when I ask to save nothing happens and when I cancel it frees Camera, and for retake its working as it designed.</p>

<p>I dont understand why there is different findings on different devices .... even devices are from same manufacturer (like Galaxy SII) </p>

<p>I am posting my code ... if someone has hint please share it with me... Thank you.</p>

<pre><code>    public static String EXTERNAL_STORAGE_PATH = Environment.getExternalStorageDirectory().getAbsolutePath().toString()+"/DCIM/";

    private String imagePath = ImageDecoder.EXTERNAL_STORAGE_PATH;

   imagePath = imagePath + projectdata.getProjectName().toString().trim() + "/"
                            + System.currentTimeMillis() + ".jpg";
                    File imageFile = new File(imagePath);
                    Uri imageFileUri = Uri.fromFile(imageFile);
                    Intent captureImage = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE);
                    captureImage.putExtra(MediaStore.EXTRA_OUTPUT, imageFileUri);
                    startActivityForResult(captureImage, CAMERA_PIC_REQUEST);



    @Override
        protected void onActivityResult(int requestCode, int resultCode, Intent data) {
            super.onActivityResult(requestCode, resultCode, data);
            String imgDescription = null;
            switch (requestCode) {

            case CAMERA_PIC_REQUEST:
                if (resultCode == RESULT_OK) {

                    cam = new Controller_Camera(context, sessiondata, projectdata);
                    imgDescription = getString(R.string.DEFAULT_IMAGE_TITLE) + DateTimeUtility.GetSystemDate();

                    String response = cam.savePhotoWithIssue(imagePath, app, imgDescription,
                            getString(R.string.DEFAULT_ISSUE_NAME), getString(R.string.DEFAULT_IMAGE_TITLE));
                    if (response == "Successfull") {
                        Intent issueeditor = new Intent(context, IssueEditor.class);
                        issueeditor.putExtra("TODO", "editissue");
                        issueeditor.putExtra("TAB", "Photos");
                        issueeditor.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
                        finish();
                        startActivity(issueeditor);
                    } else {
                        Toast.makeText(context, getResources().getString(R.string.FAILURE_SAVING), Toast.LENGTH_SHORT)
                                .show();
                    }
                }
                break;
</code></pre>
