Android的我如何检索内置画廊Picasa照片?

问题描述:

我要检索从照片内置Android库调用 ACTION_PICK 意图。
我有Picasa的图像的问题。
我已经使用了code这个link,但它不工作(File对象不存在)。
任何想法,请。

I want to retrieve the photos from built-in Android gallery calling ACTION_PICK Intent. I have a problem with Picasa's images. I have used the code to this link, but it don't work (the File object don't exist). Any idea, please.

ACTIVITYRESULT_CHOOSEPICTURE是在调用startActivity时(意向,要求code)使用INT;

ACTIVITYRESULT_CHOOSEPICTURE is the int you use when calling startActivity(intent, requestCode);

public void onActivityResult(int requestCode, int resultCode, Intent data) {
  if(requestCode == ACTIVITYRESULT_CHOOSEPICTURE) {
    BitmapFactory.Options options = new BitmapFactory.Options();
    final InputStream is = context.getContentResolver().openInputStream(intent.getData());
    final Bitmap bitmap = BitmapFactory.decodeStream(is, null, options);
    is.close();
  }
}