android / codelab-activity_transitionapi

Codelab walks you through tracking activity transition changes (start/stop run, walk, idle, drive, etc.).
Other
25 stars 11 forks source link

android 12 specifying mutability flag #19

Open moetouban opened 2 years ago

moetouban commented 2 years ago

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);