protected override void OnUserLeaveHint() { if (Build.VERSION.SdkInt >= BuildVersionCodes.O) { var param = new PictureInPictureParams.Builder().SetAspectRatio(new Rational(9, 16)).Build(); EnterPictureInPictureMode(param); } base.OnUserLeaveHint(); }
private void PictureInToPictureButton_Click(object sender, EventArgs e) { try { var actions = new List <RemoteAction>(); //.SetActions(new List<RemoteAction>().Add(new RemoteAction().Title = "") if (Build.VERSION.SdkInt >= BuildVersionCodes.O) { var param = new PictureInPictureParams.Builder().SetAspectRatio(new Rational(9, 16)).Build(); EnterPictureInPictureMode(param); } } catch (Exception exception) { Console.WriteLine(exception); } }