I am trying the Activity transition API to detect the user activity, it is working fine when app is in foreground, but as soon the get closed from recent app list, the detection of Activity is stopped. The broadcast receiver is not receiving any change in activity after app close.