I’m trying to send an intent to Photoshop Express which now accepts raw images. In this example I’m sending a Canon CR2 file. Regardless of how I specify the action, data, or type I can’t seem to get PSE to pop up as an option.
PSE manifest:
<activity android:configChanges="orientation|screenSize" android:launchMode="singleTask" android:name="com.adobe.psmobile.PSXEditActivity">
<meta-data android:name="android.support.PARENT_ACTIVITY" android:value="com.adobe.psmobile.MainActivity"/>
<intent-filter>
<action android:name="android.intent.action.EDIT"/>
<category android:name="android.intent.category.DEFAULT"/>
<data android:mimeType="image/jpeg"/>
<data android:mimeType="image/png"/>
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.EDIT"/>
<category android:name="android.intent.category.DEFAULT"/>
<data android:scheme="file"/>
<data android:mimeType="*/*"/>
<data android:host="*"/>
<data android:pathPattern=".*\.cr2"/>
<data android:pathPattern=".*\.CR2"/>
...
One of hundreds of attempted combinations:
// Intent action = new Intent();
Intent action = new Intent(Intent.ACTION_EDIT);
// action.setType("*/*");
action.setData(media.getUri());
action.setFlags(Intent.FLAG_GRANT_WRITE_URI_PERMISSION);
action.setFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
Intent chooser = Intent.createChooser(action, getResources().getString(R.string.edit));
startActivityForResult(chooser, REQUEST_CODE_EDIT);
Ex uri:
file:///storage/sdcard1/_test/canon_1d_miv_03.CR2
ES File explorer will send a CR2 file to PSE, but I can’t under any circumstances get it to appear as an option for anything but jpeg. Does anyone know how to format the intent that PSE would consume?
2
Answers
Believe it or not this was the answer:
Note the empty string as type. The only other thing that produced options was "*/*", but that showed dozens of apps.
I still don't understand why the empty string worked, so if anyone has an explanation please let me know.
You say that you are opening files in ES file explorer, well maybe it has set defaults for some file extensions?
Try re-setting them by:
You may need to do this multiple times for separate extensions.