Hi,

I'm trying to receive Android's Broadcast message say
MEDIA_SCANNER_FINISHED, but not able to do so.
Here is my code snippet:

public class MyBroadcastRec extends BroadcastReceiver
{
        MyActivityClass receiver;
        private final static String TAG = "MyBroadcastRec";
    MyBroadcastRec(MyActivityClass cntxt)
    {
        receiver = cntxt;
    }
    @Override
    public void onReceive(Context context, Intent intent)
    {
              String inte = intent.getAction();
              if( inte.equals(Intent.ACTION_MEDIA_SCANNER_FINISHED))
              {
                   receiver.reportMediascannerEvent(); // calling
MyActivityClass' method
              }


}
}

I'm instantiating MyBroadcastRec class inside MyActivityClass.
here onReceive() method should be called as soon as MediaScanner
finishes but it's not getting called.
I've tried with both, by mentioning receiver class in manifest.xml
file and by using registerReceiver() function.
Could anybody tell what's wrong with that ?

Thanks!

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to