I have two Activities ActivityA and ActivityB (this one has pip mode enabled) when ActivityB is in pip mode,ActivityA comes to the foreground now I want to finish/destroy/kill ActivityB from ActivityA is there any way to do this?
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
val supportsPIP = context!!.packageManager.hasSystemFeature(PackageManager.FEATURE_PICTURE_IN_PICTURE)
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.O) {
if (supportsPIP) {
enterPictureInPictureMode(mPictureInPictureParamsBuilder!!.build())
}
}
}