Alarm’s PendingIntents Cannot Include Custom Parcelable Class Instances on Android N
While I saw this issue「Parceble Extras are removed in PendingIntents intent to AlarmManager」, it’s really surprising that custom Parcelable class instances cannot used in PendingIntents of AlarmManager.
As google engineer commented inside this issue discussion,
This actually does not work on Android 6.0 either; and I’m surprised that it *ever* worked since alarms have extras added to their intents routinely for delivery, and that requires unpacking the extras Bundle. This cannot be done in the general case when the extras contain app-private Parcelable subclasses.
So, after Android N, custom Parcelables cannot used in AlarmManager PendingIntents, and more, refer to this blog「Be Careful Where You Use Custom Parcelables」, Maps V2 has the same limitation.
We should be careful when distributing any PendingIntent including custom Parcelables.