Wednesday, May 29, 2013

[android-developers] Re: How to catch android.intent.action.MEDIA_MOUNTED

It's not a question of "must" ... it's a question of choice and availability. Some events can be registered in the manifest can also be registered in code (but not all events that can be registered in code can be registered in the manifest) and have the added benefit of being sent to your app even if it wasn't started (as long as it was started at least once and wasn't force closed since the last restart)

Regarding the list, it doesn't exist... google suck in that aspect. I'm not even sure there's even a list of all existing events (both code and manifest based).

On Tuesday, May 28, 2013 10:59:59 PM UTC+3, gonzobrains wrote:
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 <kartee...@gmail.com> 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 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 unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate