title: AlarmManager and BroadcastReceiver where intent has no extra at all
body: <p>I try to send notification in an exact time, therefore I added an AlarmManager. AlarmReceiver is triggered,
  the intent action is set, but has no extra at all.</p>
  <p>I made a simple separated AlarmService class for the AlarmManager
  AlarmService.kt:</p>
  <pre><code>private const val TAG = &quot;AlarmService&quot;
  
  class AlarmService @Inject constructor(
      @ApplicationContext private val context: Context
  ) {
  
      private val alarmManager: AlarmManager? =  context.getSystemService(Context.ALARM_SERVICE) as AlarmManager
      private fun getPendingIntent(intent: Intent): PendingIntent =
          PendingIntent.getBroadcast(
              context,
              0,//RandomUtil.getRandomInt(),
              intent,
              PendingIntent.FLAG_UPDATE_CURRENT
          )
  
  
      fun reminderAlarm(timeInMillis: Long, item: CustomParcelable){
          val intent = Intent(context, AlarmReceiver::class.java)
          intent.apply {
              action = Constants.ACTION_SET_EXACT_ALARM_REMINDER
              putExtra(Constants.EXTRA_EXACT_ALARM_TIME, timeInMillis)
              putExtra(Constants.EXTRA_EXACT_ALARM_ITEM, CustomParcelable)
          }
          setAlarm(timeInMillis, getPendingIntent(intent))
      }
  
  
      private fun setAlarm(timeInMillis: Long, pendingIntent: PendingIntent){
          alarmManager?.let {
              if (Build.VERSION.SDK_INT &gt;= Build.VERSION_CODES.M){
                  alarmManager.setExactAndAllowWhileIdle(
                      AlarmManager.RTC_WAKEUP,
                      timeInMillis,
                      pendingIntent
                  )
              } else {
                  alarmManager.setExact(
                      AlarmManager.RTC_WAKEUP,
                      timeInMillis,
                      pendingIntent
                  )
              }
          }
      }
  </code></pre>
  <p>Eveything works fine, but when the AlarmReceiver is triggered, there is only the intent ACTION, and has NO extra data, even the time data, which is a LONG
  AlarmReceiver.kt:</p>
  <pre><code>private const val TAG = &quot;AlarmReceiver&quot;
  
  class AlarmReceiver: BroadcastReceiver() {
      private lateinit var myNotification: MyNotification
  
      override fun onReceive(context: Context, intent: Intent) {
          Log.e(TAG, &quot;onReceive: INTENT ------&gt;&gt;&gt;&gt;&gt;&gt;&gt;----------&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;-------&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;----------&gt;&gt;&gt;&gt;&gt;&gt;: &quot;
                  + intent.hasExtra(Constants.EXTRA_EXACT_ALARM_TIME) )
          when(intent.action){
  
              Constants.ACTION_SET_EXACT_ALARM_REMINDER -&gt; {
                  val time: Long = intent.getLongExtra(Constants.EXTRA_EXACT_ALARM_TIME, 0L)
                  val item: CustomParcelable? = intent.getParcelableExtra(Constants.EXTRA_EXACT_ALARM_ITEM)
                  Log.e(TAG, &quot;onReceive: ------------@@@@@@@@@@@@*-------------@@@@@@@@@------------&quot;
                          + item?.title + &quot; reminder: &quot; + item?.reminder + &quot; t: &quot; + time)
  
                  if (item != null) {
                      myNotification = MyNotification(context)
                      myNotification.createReminderNotificationChannel(item)
                      myNotification.sendNotificationReminder(item)
                  }
              }
          }
      }
  
  }
  </code></pre>
  <p>The item I would like to pass in the intent is Parcelable:</p>
  <p>Item:</p>
  <pre><code>@Parcelize
  data class CustomParcelable(
      val title: String,
      val reminder: String
  ) : Parcelable {
  }
  </code></pre>
  <p>The manifest files I use the required permissions, and would like to make the alarm available after making a phone reboot.
  AndroidManifest:</p>
  <pre><code>&lt;uses-permission android:name=&quot;android.permission.ACCESS_NETWORK_STATE&quot; /&gt;
  &lt;uses-permission android:name=&quot;android.permission.INTERNET&quot; /&gt;
  &lt;uses-permission android:name=&quot;android.permission.ACCESS_WIFI_STATE&quot; /&gt;
  &lt;uses-permission android:name=&quot;android.permission.WAKE_LOCK&quot; /&gt;
  &lt;uses-permission android:name=&quot;android.permission.RECEIVE_BOOT_COMPLETED&quot; /&gt;
  &lt;receiver android:name=&quot;.receiver.AlarmReceiver&quot;
      android:exported=&quot;true&quot;
      android:enabled=&quot;true&quot;&gt;
      &lt;intent-filter&gt;
          &lt;action android:name=&quot;android.intent.action.BOOT_COMPLETED&quot; /&gt;
      &lt;/intent-filter&gt;
  &lt;/receiver&gt;
  </code></pre>