thumbnail returns null on android above version 4.0 -


i getting samethis issue

public class mainactivity extends activity  {       imageview imgvie;      bitmap bmp,extbmp;      @override     protected void oncreate(bundle savedinstancestate)      {          super.oncreate(savedinstancestate);         setcontentview(r.layout.activity_main);           imgvie = (imageview)findviewbyid(r.id.imageview1);                   string path =   "http://202.65.154.108:8080/vodstream/lokesh.stream.mp4";         bmp = thumbnailutils.createvideothumbnail(path, thumbnails.full_screen_kind);          if(bmp!=null)         {              extbmp =    thumbnailutils.extractthumbnail(bmp, 300, 300);             imgvie.setimagebitmap(extbmp);         }          if(bmp==null)         {             toast.maketext(getapplicationcontext(), "sorry bitmap returns null", toast.length_long).show();         }     }    } 

when run application in nexus4s entering if condition.in other phones moving else. have suggestions.

1)- sometime if video quality poor , video corrupt or format not supported returns null bitmap.

2)- createvideothumbnail(string filepath, int kind) supports mini_kind or micro_kind kind in 4.0+.

see http://developer.android.com/reference/android/media/thumbnailutils.html. try 1 of those...

3)- devices can't play , can't create thumbnails videos, placed on internal memory. check it, , move video sd card before thumbnails creating.

4)check path of file.


Comments

Popular posts from this blog

matlab - "Contour not rendered for non-finite ZData" -

delphi - Indy UDP Read Contents of Adata -

javascript - Any ideas when Firefox is likely to implement lengthAdjust and textLength? -