Why must some broadcasts be registered in code while others must be 
registered in a manifest file?  Is there somewhere that lists registration 
requirements for every broadcast?

On Thursday, October 28, 2010 8:53:37 AM UTC-7, Streets Of Boston wrote:
>
> You'd have to register your broadcaster in your code: 
>
> http://groups.google.com/group/android-developers/browse_frm/thread/c2a91e60bff34028/a6bf11c05641a909?lnk=gst&q=MEDIA_MOUNTED#
>  
>
>
> On Oct 28, 4:53 am, Karteek N <[email protected]> wrote: 
> > How to cath android.intent.action.MEDIA_MOUNTED event 
> > I implemented an broadcast receiver to invoke when sdcard is mounted. 
> > But it is not invoked 
> > My source code is as follows 
> > MyMediaMountListener.java 
> > 
> > public class MyMediaMountListener extends BroadcastReceiver { 
> > 
> >     @Override 
> >     public void onReceive(Context context, Intent intent) { 
> >      Log.d("", "Media mounted"); 
> >     } 
> > 
> > } 
> > 
> > AndroidManifest.xml 
> > 
> > <application android:icon="@drawable/icon" 
> android:label="@string/app_name"> 
> >         <activity android:name=".BackupActivity" 
> > 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="MyMediaMountListener"> 
> >             <intent-filter> 
> >                 <action 
> > android:name="android.intent.action.MEDIA_MOUNTED"></action> 
> >             </intent-filter> 
> > 
> >         </receiver> 
> >     </application> 
> > 
> > Any help please 
> > karteek

-- 
-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to