Notification deleteIntent does not work

I’ve read several questions concerning similair issues, but they do not provide me with the solution.

In my Android app I fire off a notification (in the Application class to be specific, which is actually started from a C2DM push event).

  • UNEXPECTED TOP-LEVEL EXCEPTION: Multiple dex files define
  • How to filter Android logcat by application?
  • EditText and MultiAutoCompleteTextView suggestions
  • what is the best size to use for an Android application icon
  • Video Streaming and Android
  • Error: Default Activity Not Found
  • I then want to receive an Intent when the “clear all” button is pressed on the notifications:

    notification.deleteIntent = PendingIntent.getService(this, 0, new Intent(this, NotificationDeleteReceiver.class), 0);

    In my NotificationDeleteReceiver.class I got the onReceive method:

    public class NotificationDeleteReceiver extends BroadcastReceiver {
        public void onReceive(Context context, Intent intent) {

    In my manifest file I got:

    <receiver android:name="NotificationDeleteReceiver">

    But still onReceive does not get called. What could I be doing wrong? Is there any smart way to debug and see if an Intent really is fired?

    Do I need some kind of intent filter or should it be fine?

    Any tips welcome.

    Related posts:

    How to pass data between fragments
    What does this mean &ldquo;xmlns:xliff&rdquo;? XML
    Objects lifespan in Java vs .Net
    Suppress AndroidManifest.xml minSdkVersion related warning
    Where to store global constants in an Android application?
    How to set the WebChromeClient to open the new page in the same view?
    Android Babe is a Google Android Fan, All about Android Phones, Android Wear, Android Dev and Android Games Apps and so on.