Hi

I'm trying to write a BroadcastReceiver which is to be notified
whenever the user plays an audio file. Have looked around for an
appropriate Intent to use and android.intent.action.VIEW seems to be
the closest one. I don't get any notifications though and wonder what
I'm doing wrong.

/j


Here is the full code:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android";
package="org.jabben">
  <application android:label="MyProject">
    <receiver android:name=".MyReceiver" android:label="My Receiver">
      <intent-filter>
        <action android:name="android.intent.action.VIEW" />
      </intent-filter>
    </receiver>
  </application>
</manifest>


package org.jabben;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.util.Log;

public class MyReceiver extends BroadcastReceiver {

    public void onReceive(Context context, Intent intent) {
        Log.w("MyReceiver", "Yes!");
    }

}

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Beginners" 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-beginners?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to