Re: [android-developers] How to specify an IntentFilter that only activates when the Intent comes from within my own app?
That seems sort of silly, if I'm understanding you correctly: you
usually don't launch a chooser based intent just to talk to your own
app again, unless it's to possibly choose another app. You might look
at a signature based idea (meaning other people can't respond to it,
for security), but otherwise I'm not sure I see the use case. Maybe
I'm just not reading it correctly.
kris
On Sat, Jan 12, 2013 at 11:38 PM, William Ferguson
<william.ferguson@xandar.com.au> wrote:
> I have an Activity that responds to the ACTION_SEND Intent. Is there any way
> for me to be able to specify the IntentFilter such that the Activity is only
> displayed by the IntentChooser when it has been called from within my app?
>
> Ie I want the SendIntentResponderActivity displayed as a viable recipient of
> ACTION_SEND, but only if I am the one that issued the Intent. NB displaying
> my Activity shouldn't stop other standard responders (such as Gmail etc)
> from also being displayed.
>
>> <activity android:name=".SendIntentResponderActivity">
>> <intent-filter>
>> <action android:name="android.intent.action.SEND"/>
>> <category android:name="android.intent.category.DEFAULT"/>
>> <data android:mimeType="text/plain"/>
>> </intent-filter>
>> </activity>
>
>
>
>>
>> final Intent shareIntent = new Intent(Intent.ACTION_SEND);
>> shareIntent.putExtra(Intent.EXTRA_SUBJECT, subject);
>> shareIntent.putExtra(Intent.EXTRA_TEXT, content);
>> final Intent chooserIntent = Intent.createChooser(shareIntent, "Share
>> via"));
>> context.startActivity(chooserIntent);
>
>
> William
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscribe@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home