title: It is possible to display a video thumbnail from a URL on Android 4 and above?
body: <p>Both of the below works fine on the emulator (2.3.3), but on a real device (<a href="http://en.wikipedia.org/wiki/Nexus_S" rel="nofollow noreferrer">Nexus S</a> with 4.1.2) no image is shown for the thumbnail. I will also try to run it on an <code>Android 4 Emulator</code>. If I set a default <code>android:src</code> for the <code>ImageView</code>, it is not shown anymore then. This makes me think that it is replaced, but the <code>ImageView</code> is empty.</p>
  
  <pre><code>public class MainActivity extends Activity {
  
      ImageView img;
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
  
          img = (ImageView)findViewById(R.id.img_thumbnail);
          new MyAsync().execute("http://commonsware.com/misc/test.mp4");
      }
  
      //This version is still not working, but it's more readable (edited: Selvin).
      public class MyAsync extends AsyncTask&lt;String, Void, Bitmap&gt;{
  
          @Override
          protected Bitmap doInBackground(String... objectURL) {
              //return ThumbnailUtils.createVideoThumbnail(objectURL[0], Thumbnails.MINI_KIND);
              return ThumbnailUtils.extractThumbnail(ThumbnailUtils.createVideoThumbnail(objectURL[0], Thumbnails.MINI_KIND), 100, 100);
          }
  
          @Override
          protected void onPostExecute(Bitmap result){
               img.setImageBitmap(result);
          }
      }
  }
  </code></pre>
  
  <p>I know that a similar question has been asked before, <s><em><a href="https://stackoverflow.com/questions/10750502/displaying-video-thumbnails-in-android-device-from-remote-video-url">Displaying video thumbnails in an Android device from a remote video URL</a></em></s>, but I have already tried this and same result. </p>
  
  <p>Why doesn't this work on the device and how make it work?</p>