教程/参考,使用图片启动ACTION_EDIT并返回图片

use*_*124 5 android android-intent

我正在编写一个使用相机的应用程序。我想让用户用行和文本注释生成的图像,并且想为用户提供他们可以使用的适当图像编辑应用程序的列表,但我遇到了以下问题:1。当我执行以下代码时,并非所有图像编辑应用程序都出现在列表中:

editIntent = new Intent();
editIntent.setAction(Intent.ACTION_EDIT);
Uri imageToEditUri = selectedPhotoLocation;  // Uri of existing photo
String imageToEditMimeType = "image/*";
editIntent.setDataAndType(imageToEditUri, imageToEditMimeType);
startActivityForResult(Intent.createChooser(editIntent,"Edit Image"), IMPLICIT_EDIT_IMAGE);

Is there a way to get a list of apps that will respond to Intent.ACTION_EDIT?
Run Code Online (Sandbox Code Playgroud)

2. PS Express是我发现的唯一一个在data.getDate()Uri返回OnActivityResult()的情况下返回已编辑图像的Uri的应用程序,其他应用程序被迫用户保存,记住位置并重新选择编辑的图像。

Is there a way to know what apps return the Uri of the image to OnActivityResult()
Run Code Online (Sandbox Code Playgroud)

mic*_*zuk 3

第一个问题答案:
尝试queryIntentActivities

Intent editIntent = new Intent(android.content.Intent.ACTION_EDIT);
List<ResolveInfo> resInfo = getPackageManager().queryIntentActivities(editIntent, 0);
Run Code Online (Sandbox Code Playgroud)