title: File View from Google Drive Android Intent
body: <p>If anyone can help I would be really awesome. I am building an app where by I am trying to access my files and display them in an imageview. </p>
  
  <p>I have a button and to that I attach an onClickListener</p>
  
  <pre><code>iButton.setOnClickListener(new View.OnClickListener() {   
  @Override
  public void onClick(View view) {
     Intent photoPickerIntent = new Intent(Intent.ACTION_GET_CONTENT);
     photoPickerIntent.setType("image/*");
     startActivityForResult(Intent.createChooser(photoPickerIntent, "Select Picture"), 1);
     }
   });
  </code></pre>
  
  <p>The intent gives me 3 options Gallery, Dropbox and Google Drive</p>
  
  <p>For the Gallery I am able to access the file lis this and display it in the imageview</p>
  
  <pre><code>Uri selectedImage = data.getData();
  String[] filePathColumn = { MediaStore.Images.Media.DATA };
  Cursor cursor = getContentResolver().query(selectedImage,filePathColumn, null, null,   null);
  cursor.moveToFirst();
  int columnIndex = cursor.getColumnIndex(filePathColumn[0]);
  String picturePath = cursor.getString(columnIndex);
  cursor.close();
  imageHolder.setImageBitmap(BitmapFactory.decodeFile(picturePath));
  </code></pre>
  
  <p>For Dropbox I do it like this</p>
  
  <pre><code>imageHolder.setImageBitmap(BitmapFactory.decodeFile(selectedImage.getPath()));
  </code></pre>
  
  <p>However I am unsure of how to do it for google drive i tried to do it like the gallery but I get the following error</p>
  
  <p>E/BitmapFactory: Unable to decode stream: java.io.FileNotFoundException: /: open failed: EISDIR (Is a directory)</p>
  
  <p>Any help would be very appreciated.</p>