title: Playing of the previous/next song by the buttons in notification
body: <p>I have a player, where when user choose a song, player makes a notification with 3 buttons: previous, play, next. This buttons are needed to choose the songs in background mode. But when I click on this buttons nothing is happened. Here's the code of notification:</p>
  
  <pre><code>Intent intentPrev = new Intent(this, NotificationReceiver.class);
          intentPrev.setAction(ACTION_PREV);
          LocalBroadcastManager.getInstance(this).sendBroadcast(intentPrev);
          PendingIntent pendingIntentPrev = PendingIntent.getActivity(this, 0, intentPrev, PendingIntent.FLAG_UPDATE_CURRENT);
  
          Intent intentPlay = new Intent(this, NotificationReceiver.class);
          intentPlay.setAction(ACTION_PLAY);
          LocalBroadcastManager.getInstance(this).sendBroadcast(intentPlay);
          PendingIntent pendingIntentPlay = PendingIntent.getActivity(this, 0, intentPlay, PendingIntent.FLAG_UPDATE_CURRENT);
  
          Intent intentNext = new Intent(this, NotificationReceiver.class);
          intentNext.setAction(ACTION_NEXT);
          LocalBroadcastManager.getInstance(this).sendBroadcast(intentNext);
          PendingIntent pendingIntentNext = PendingIntent.getActivity(this, 0, intentNext, PendingIntent.FLAG_UPDATE_CURRENT);
  
          NotificationCompat.Builder builder = new NotificationCompat.Builder(this).setSmallIcon(R.drawable.notification).
                  setContentTitle(songs.get(songPos).getTitle()).setContentText(songs.get(songPos).getArtist()).
                  addAction(R.drawable.previous, "Previous", pendingIntentPrev).addAction(R.drawable.pause, "Pause", pendingIntentPlay).
                  addAction(R.drawable.next, "Next", pendingIntentNext);
          Notification notification = builder.build();
          NotificationManager notificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
          notificationManager.notify(1, notification);
  </code></pre>
  
  <p>And here's the code of Receiver:</p>
  
  <pre><code>package asus.example.com.player;
  
  import android.content.BroadcastReceiver;
  import android.content.Context;
  import android.content.Intent;
  
  import java.util.Objects;
  
  public class NotificationReceiver extends BroadcastReceiver {
  
      private final String    ACTION_PREV = "PREVIOUS";
      private final String    ACTION_PLAY = "PLAY";
      private final String    ACTION_NEXT = "NEXT";
      private final MyService service     = new MyService();
  
      @Override
      public void onReceive(Context context, Intent intent) {
          if (Objects.equals(intent.getAction(), ACTION_PREV)){
              service.playPrev();
          }
          else if (Objects.equals(intent.getAction(), ACTION_NEXT)){
              service.playNext();
          }
      }
  }
  </code></pre>
  
  <p>Also I added receiver to Manifest:</p>
  
  <pre><code>&lt;receiver
              android:name=".NotificationReceiver"
              android:enabled="true"
              android:exported="true"&gt;
              &lt;intent-filter&gt;
                  &lt;action android:name="PREVIOUS"/&gt;
                  &lt;action android:name="PLAY"/&gt;
                  &lt;action android:name="NEXT"/&gt;
              &lt;/intent-filter&gt;
          &lt;/receiver&gt;
  </code></pre>
  
  <p>When I watched in debugger I saw that Receiver class isn't used, but I don't understand why</p>