Activity.OnPictureInPictureRequested Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
This method is called by the system in various cases where picture in picture mode should be entered if supported.
[Android.Runtime.Register("onPictureInPictureRequested", "()Z", "GetOnPictureInPictureRequestedHandler", ApiSince=30)]
public virtual bool OnPictureInPictureRequested ();
[<Android.Runtime.Register("onPictureInPictureRequested", "()Z", "GetOnPictureInPictureRequestedHandler", ApiSince=30)>]
abstract member OnPictureInPictureRequested : unit -> bool
override this.OnPictureInPictureRequested : unit -> bool
Returns
true
if the activity received this callback regardless of if it acts on it
or not. If false
, the framework will assume the app hasn't been updated to leverage
this callback and will in turn send a legacy callback of #onUserLeaveHint()
for the
app to enter picture-in-picture mode.
- Attributes
Remarks
This method is called by the system in various cases where picture in picture mode should be entered if supported.
It is up to the app developer to choose whether to call #enterPictureInPictureMode(PictureInPictureParams)
at this time. For example, the system will call this method when the activity is being put into the background, so the app developer might want to switch an activity into PIP mode instead.
Java documentation for android.app.Activity.onPictureInPictureRequested()
.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.