2012-01-17 10 views
1

ギャラリーからアプリケーションに画像を取得しています。私のデバイス(タブレット、電話)にある写真には問題ありません。写真が「雲」から来たときには機能しません。つまり、Googleフォト/ Picasaです。ここで ギャラリーからImageViewに画像を読み込みます(画像はGoogleフォトからです)

は私がやっているものです:

 public void onActivityResult(int requestCode, int resultCode, Intent data) { 

      if (resultCode == RESULT_OK) { 

        if (requestCode == 1) { 

          // currImageURI is the global variable I'm using to hold the content:// URI of the image 
          currImageURI = data.getData(); 
          fotoPaciente.setImageURI(currImageURI); 
          String pathFoto = currImageURI.getPath(); 

         if (pathFoto.startsWith("/external")) { 
          pathFoto = getFilePathFromUri(currImageURI); 
         } 



        } 
      } 
    } 

私が言ったように、それは私のデバイスに位置絵のため正常に動作します:

fotoPaciente.setOnClickListener(new OnClickListener() { 
     @Override 
      public void onClick(View v) { 
      // To open up a gallery browser 
       Intent photoPickerIntent = new Intent(); 
       photoPickerIntent.setType("image/*"); 
       photoPickerIntent.putExtra("crop", "true"); 
       //photoPickerIntent.putExtra(MediaStore.EXTRA_OUTPUT, getTempUri()); 
       photoPickerIntent.putExtra("outputFormat", 
       Bitmap.CompressFormat.JPEG.toString()); 

       photoPickerIntent.setAction(Intent.ACTION_GET_CONTENT); 
       startActivityForResult(Intent.createChooser(photoPickerIntent, "Selecione uma imagem"),1); 

      } 


    }); 

は、ここに私の活動の結果です。

答えて

1

Picasa APIをご確認くださいHere

関連する問題