I did not mean to put both actions in the intent-filter, only one at a time.
On Jun 14, 11:34 pm, jonathan <[email protected]> wrote: > I have created a BroadcastReceiver to detect SDCard mount and unmount > event, however, I am not able to receive any events at all: > here's the androidmanifest.xml: > <receiver android:enabled="true" > android:label="SDCardMountReceiver" > android:exported="true" > android:name="xxx.broadcasts.SDCardBroadcastReceiver"> > <intent-filter> > <action > android:name="android.content.Intent.ACTION_MEDIA_MOUNTED"></action> > <action > android:name="android.content.Intent.ACTION_MEDIA_UNMOUNTED" /> > > </intent-filter> > </receiver> > SDCardMountReceiver class: > public class SDCardBroadcastReceiver extends BroadcastReceiver { > public SDCardBroadcastReceiver(){ > super(); > System.err.println("constructor"); > } > > public void onReceive(Context context, Intent intent) { > Log.d("SDCardBroadCastReceiver", "receive > "+intent.getAction()); > System.err.println("jonathan receive "+intent.getAction()); > > } > > } > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

