当应用程序在该活动 onResume() 方法上画中画时,首先检查哪个活动将进入暂停状态,添加此代码。
@Override
protected void onResume() {
super.onResume();
SharedPreferences sharedpreferences = getSharedPreferences("MyPrefs", Context.MODE_PRIVATE);
//get boolean value from shared preferences which we are store when joining meeting button is clicked
boolean check = sharedpreferences.getBoolean(met,false);
if (check){
//if meeting is going on redirect to meeting
//Replace JitsiMeetAcitvity.class with your picture in picture activity class
startActivity(new Intent(this, JitsiMeetActivity.class)
.addFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT));
}
}
我已使用共享偏好来跟踪会议是否正在进行。
如果您想详细查看请关注此