I am creating thumbnails from videos stored in my sd card ,displaying thumbnails and its names in grid view. On item selected event of the grid view pop ups a dialog and asking x, y, right, bottom positions then pasting it to the main activity . I got the video files, and tried to create thumbnail using media store also am retrieving thumbnail as bitmap, but the bitmap is null. In the grid view video names are shown and i am able to select the corresponding thumbnail and can give positions also am able set the thumbnail to the main activity. The problem is the bitmap is null and bitmap image not showing(text vie video name shown). What's the problem ? I can't figure it out? Plz help me? My code is given below. thanks in advance.

```
      if (f.isFile()) {
      if (fName.endsWith(".mpg")
    || fName.endsWith(".mov")
    || fName.endsWith(".wmv")
    || fName.endsWith(".rm")
    || fName.endsWith(".mp4")) {
    tv.setText(fName);
    path = f.getAbsolutePath();
    System.out.println("Video file path=>"+path);

 thumb = ThumbnailUtils.createVideoThumbnail(f.getAbsolutePath(),MediaStore.Video.Thumbnails.MICRO_KIND);

    if(thumb==null)
      {
         /**Every time it printing null**/
         System.out.println("Thumb is null");

      }
      iv.setImageBitmap(thumb);

```