code: private void initializePendingIntent(Context context) {
  
          // toggle playback
          Intent togglePlaybackIntent = new Intent(context, PlaybackService.class);
          togglePlaybackIntent.setAction(PlaybackService.ACTION_TOGGLE_PLAYBACK);
          mTogglePlaybackPendingIntent = PendingIntent.getService(context, REQUEST_CODE_PLAYBACK,
                  togglePlaybackIntent, PendingIntent.FLAG_UPDATE_CURRENT);
  
          // next track
          Intent nextPrendingIntent = new Intent(context, PlaybackService.class);
          nextPrendingIntent.setAction(PlaybackService.ACTION_NEXT_TRACK);
          mNextPendingIntent = PendingIntent.getService(context, REQUEST_CODE_NEXT,
                  nextPrendingIntent, PendingIntent.FLAG_UPDATE_CURRENT);
  
          // previous track
          Intent previousPendingIntent = new Intent(context, PlaybackService.class);
          previousPendingIntent.setAction(PlaybackService.ACTION_PREVIOUS_TRACK);
          mPreviousPendingIntent = PendingIntent.getService(context, REQUEST_CODE_PREVIOUS,
                  previousPendingIntent, PendingIntent.FLAG_UPDATE_CURRENT);
  
          // clear notification
          Intent clearPendingIntent = new Intent(context, PlaybackService.class);
          clearPendingIntent.setAction(PlaybackService.ACTION_CLEAR_NOTIFICATION);
          mClearPendingIntent = PendingIntent.getService(context, REQUEST_CODE_CLEAR,
                  clearPendingIntent, PendingIntent.FLAG_UPDATE_CURRENT);
      }
docs: Initialize {@link android.app.PendingIntent} used for notification actions.
  
  @param context context used to instantiate intent.