FOr some more information: I did try to add the intent to an
"receiver" in the manifest XML on a tip i got, but this not only
didn't work to start my receiver class, it also removed the "share"
option from the image i was trying to do something with... So not so
big a succes.
I'm sure it's a small thing i've missed (i hope ;) ), so if anyone can
point me towards how what where?
<activity android:name=".TestingApp"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<receiver android:name=".ImageReceiver">
<intent-filter>
<action android:name="android.intent.action.SEND" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="image/*" />
</intent-filter>
</receiver>
</application>
On Aug 31, 9:21 pm, EnnaN <[email protected]> wrote:
> There are a number of posts about getting your intent to actually
> register, but unfortunately i was not able to distill a sollution from
> them. The simple concept of getting an image and doing something with
> it seems to be too much at the moment :(
>
> I have the following in my manifest.xml:
>
> <application android:icon="@drawable/icon" android:label="@string/
> app_name" android:theme="@android:style/Theme.NoTitleBar">
> <activity android:name=".TestingApp"
> android:label="@string/app_name">
> <intent-filter>
> <action android:name="android.intent.action.MAIN" />
> <category
> android:name="android.intent.category.LAUNCHER" />
> </intent-filter>
> <intent-filter>
> <action android:name="android.intent.action.SEND" />
> <category
> android:name="android.intent.category.DEFAULT" />
> <data android:mimeType="image/*" />
> </intent-filter>
> </activity>
> </application>
>
> And this does what i thought it should do: when i press "share" on a
> picture, i get my application as an option.
> Now, to act on this selecting, i thought to do this:
>
> registerReceiver(new BroadcastReceiver(){
> @Override
> public void onReceive(Context context, Intent intent) {
> //do some stuff
> }
> }, new IntentFilter("android.intent.action.SEND","image/*"));
>
> Now i've tried this with a seperate class, without the second argument
> on the intentfilter, and with several variations of the intent
> action.SEND, but it doesn't seem to fire when i share my picture.
> Could anyone point me somewheres? Do i need an extra permission for
> this intent maybe?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---