title: Android Studio Intent getIntExtra not Working
body: <p>I have a foreground service in which the notification sends Intents to a Broadcast Receiver, but the extra content of the intent are not been passed to the broadcast receiver.</p>
  <p>In the service:</p>
  <pre><code>private void proceedToStartService(Intent intent) {
          String input = intent.getStringExtra(&quot;inputExtra&quot;);
  
          Intent notificationIntent = new Intent(this, MainActivity.class);
          notificationIntent.setAction(SHOW_APPLICATION_ACTION);
          notificationIntent.setFlags(Intent.FLAG_ACTIVITY_BROUGHT_TO_FRONT);
          notificationIntent.putExtra(NotificationReceiver.REQUEST,NotificationReceiver.ACTIVITY);
          PendingIntent pendingIntent = PendingIntent.getActivity(this,
                  0, notificationIntent, 0);
  
  
          Intent startStopIntent = new Intent(this,NotificationReceiver.class);
          startStopIntent.putExtra(NotificationReceiver.REQUEST,NotificationReceiver.START_STOP_FISHING);
       
          PendingIntent startStopPendingIntent = PendingIntent.getBroadcast(this,0,startStopIntent,0);
  
          RemoteViews collapsedView = new RemoteViews(getPackageName(),R.layout.notification_collapsed);
          RemoteViews expandedView = new RemoteViews(getPackageName(),R.layout.notification_expanded);
  
          expandedView.setOnClickPendingIntent(R.id.ivNotificationStartStop,startStopPendingIntent);
          DftOp.showMessageLong(&quot; intent &quot;+startStopIntent.getExtras().getInt(NotificationReceiver.REQUEST,666));
  
          Notification notification = new NotificationCompat.Builder(this, APP.CHANNEL_ID)
                  .setContentTitle(&quot;Fishing Tracker&quot;)
                  .setCustomContentView(expandedView)
                  .setCustomBigContentView(expandedView)
                  .setContentText(input)
                  .setSmallIcon(R.drawable.go_fishing_black)
                  .setContentIntent(pendingIntent)
                  .setPriority(NotificationCompat.PRIORITY_HIGH)
                  .build();
          startForeground(SERVICE_ID, notification);
          addListeners();
          
  </code></pre>
  <p>And in the broadcast receiver</p>
  <pre><code>public class NotificationReceiver extends BroadcastReceiver {
      public static final int NEXT_EQUIPMENT = 1;
      public static final int PREVIOUS_EQUIPMENT = 2;
      public static final int START_STOP_FISHING = 3;
      public static final int ACTUAL_EQUIPMENT = 5;
      public static final int ACTIVITY = 999;
      public static final int NONE = 10;
      public static final String REQUEST = &quot;requestAction&quot;;
  
      @Override
      public void onReceive(Context context, Intent intent) {
          int request = intent.getIntExtra(REQUEST,890);
          switch (request) {
              case NONE: DftOp.showMessageLong(&quot; NONE &quot;); break;
              case NEXT_EQUIPMENT: DftOp.showMessageLong(&quot; next &quot;); break;
              case PREVIOUS_EQUIPMENT: DftOp.showMessageLong(&quot; previous &quot;); break;
              case START_STOP_FISHING: DftOp.showMessageLong(&quot; start/stop &quot;); break;
              case ACTUAL_EQUIPMENT: DftOp.showMessageLong(&quot; actual &quot;); break;
              default: DftOp.showMessageLong(&quot;Requested= &quot; +request); break;
          }
          Intent closeIntent = new Intent(Intent.ACTION_CLOSE_SYSTEM_DIALOGS);
          context.sendBroadcast(closeIntent);
  
      }
  }
  </code></pre>
  <p>But always the value is the default 890... I also tried use intent.getExtras().getInt() but the result is the same.</p>