5

I'm using ActionBarSherlock in an app along with a ShareActionProvider. I'm using a share intent to share images in a manner very similar to the ActionBarSherlock example:

Intent shareIntent = new Intent();
shareIntent.setAction(Intent.ACTION_SEND);
shareIntent.putExtra(Intent.EXTRA_STREAM, uri);
shareIntent.setType("image/*");

Everything is working properly, the only problem is that my app also accepts shared image content ("image/*"), so it shows up in the list of apps. Is there anyway around this?

EDIT:

Here are my intent filters:

<intent-filter>
    <action android:name="android.intent.action.SEND"/>
    <category android:name="android.intent.category.DEFAULT"/>
    <data android:mimeType="image/*"/>
</intent-filter>
selsine
  • 2,813
  • 2
  • 21
  • 22

1 Answers1

0

If I am understanding what you want to do, basically, you want to enable/disable your intent-filters dynamically.

Up to where I know you can't achieve what you want directly, but you can get the same effect disabling your activity, via PackageManager and setComponentEnabledSetting(). Obviously, if disabling the "receiver" Activity is a possibility in your app.

Alejandro Colorado
  • 6,034
  • 2
  • 28
  • 39