How to get imagepath from thumbnail path of a image?
<p>I am trying to get imagepath based on thumbail path , i have already tried solution from 
<a href="http://stackoverflow.com/questions/9279553/android-getting-path-to-image-from-thumbnail">android-getting-path-to-image-from-thumbnail</a>, but it is based on gridview position, i am only retrieving specific images. Also i found one sample code from SO, the code is</p>

<pre><code>private String getImagePathFromThumbPath(String thumbPath)
    {
        String imgPath=null;

//      String[] projection = new String[] {MediaStore.Images.Thumbnails._ID, MediaStore.Images.Thumbnails.IMAGE_ID};
        String[] imagesDataPath={ MediaStore.Images.Media.DATA ,MediaStore.Images.Media._ID};
            //mResolver.query() requires android API 16
        Cursor thumbnails = mResolver.query(MediaStore.Images.Thumbnails.EXTERNAL_CONTENT_URI, imagesDataPath,MediaStore.Images.Thumbnails.DATA+"=?",new String[]{thumbPath}, null, null);

        String[] filePathColumn = {MediaStore.Images.Media.DATA};

        Cursor imageCursor = mResolver.query(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, filePathColumn, MediaStore.Images.Media._ID + "=?", new String[] {thumbId}, null);

        if (imageCursor != null &amp;&amp; imageCursor.moveToFirst()) {
            // Your file-path will be here
            imgPath= imageCursor.getString(imageCursor.getColumnIndex(filePathColumn[0]));
        }
        return imgPath;
    }
</code></pre>

<p>The above method is bit modified to suit my needs and it returns nothing on Toasting, please tell how to retrieve imagepath using thumbnail path?</p>
