in https://developer.android.com/codelabs/activity-recognition-transition#5
you should not pass 0 for the flags rather the pending intent needs tp specify the mutability flag.
mActivityTransitionsPendingIntent =
PendingIntent.getBroadcast(MainActivity.this, 0, intent, 0);