2012-04-23 2 views
1

私はそれは大丈夫だPhotoshopのアプリで、この意図とギャラリーエディタ同じコンテンツを保存する意図のギャラリー?

//fileURI is a content:// 

Intent intent = new Intent(Intent.ACTION_EDIT); 
intent.setDataAndType(fileUri, "image/jpeg"); 
intent.putExtra("return-data", true); 
intent.putExtra(MediaStore.EXTRA_OUTPUT, fileUri); 
intent.putExtra("outputFormat", Bitmap.CompressFormat.JPEG.toString()); 

に問題がある、私は、保存や編集が、Androidのギャラリーwhith、それは別のディレクトリに

おかげでその私の知る限り

+1

ok only intent.getData(); Gallery3Dソース:( http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android-apps/4.0.3_r1/com/android/gallery3d/photoeditor/PhotoEditor。 java?av = f – pagetronic

答えて

0

私が発見したOK:

ギャラリーSourceはnoExtraについての情報を与えるには、元のファイルの唯一のウリを取らので、唯一の解決策は、そのようなメディアプロバイダの最後のファイルを取ることですされています

String[] projection = new String[]{ 
     MediaStore.Images.ImageColumns._ID 
    }; 
    Cursor cursor = managedQuery(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, 
      projection, MediaStore.Images.ImageColumns.DATE_TAKEN + "="+datePhoto, null, "_ID DESC"); 

    if (cursor.moveToFirst()) { 
     long ID = cursor.getLong(cursor.getColumnIndex(MediaStore.Images.ImageColumns._ID)); 
     fileUri = Uri.withAppendedPath(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, "" + ID); 
    } 
0

を保存することはできません意図に応じて、ギャラリーがその余分な部分をチェックしない可能性があります。

+1

Extra Galleryの入手方法に関する文書はありませんか? – pagetronic