MediaProjectionManager.CreateScreenCaptureIntent Method

Definition

Overloads

CreateScreenCaptureIntent()

Returns an Intent that <b>must</b> be passed to Activity#startActivityForResult(Intent, int) (or similar) in order to start screen capture.

CreateScreenCaptureIntent(MediaProjectionConfig)

Returns an Intent that <b>must</b> be passed to Activity#startActivityForResult(Intent, int) (or similar) in order to start screen capture.

CreateScreenCaptureIntent()

Returns an Intent that <b>must</b> be passed to Activity#startActivityForResult(Intent, int) (or similar) in order to start screen capture.

[Android.Runtime.Register("createScreenCaptureIntent", "()Landroid/content/Intent;", "")]
public Android.Content.Intent CreateScreenCaptureIntent ();
[<Android.Runtime.Register("createScreenCaptureIntent", "()Landroid/content/Intent;", "")>]
member this.CreateScreenCaptureIntent : unit -> Android.Content.Intent

Returns

Attributes

Remarks

Returns an Intent that <b>must</b> be passed to Activity#startActivityForResult(Intent, int) (or similar) in order to start screen capture. The activity will prompt the user whether to allow screen capture. The result of this activity (received by overriding Activity#onActivityResult(int, int, Intent) onActivityResult(int, int, Intent)) should be passed to #getMediaProjection(int, Intent).

Identical to calling #createScreenCaptureIntent(MediaProjectionConfig) with a MediaProjectionConfig#createConfigForUserChoice().

Should be used instead of #createScreenCaptureIntent(MediaProjectionConfig) when the calling app does not want to customize the activity shown to the user.

Java documentation for android.media.projection.MediaProjectionManager.createScreenCaptureIntent().

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.

Applies to

CreateScreenCaptureIntent(MediaProjectionConfig)

Returns an Intent that <b>must</b> be passed to Activity#startActivityForResult(Intent, int) (or similar) in order to start screen capture.

[Android.Runtime.Register("createScreenCaptureIntent", "(Landroid/media/projection/MediaProjectionConfig;)Landroid/content/Intent;", "", ApiSince=34)]
public Android.Content.Intent CreateScreenCaptureIntent (Android.Media.Projection.MediaProjectionConfig config);
[<Android.Runtime.Register("createScreenCaptureIntent", "(Landroid/media/projection/MediaProjectionConfig;)Landroid/content/Intent;", "", ApiSince=34)>]
member this.CreateScreenCaptureIntent : Android.Media.Projection.MediaProjectionConfig -> Android.Content.Intent

Parameters

config
MediaProjectionConfig

Customization for the MediaProjection that this Intent requests the user's consent for.

Returns

An Intent requesting the user's consent, specialized based upon the given configuration.

Attributes

Remarks

Returns an Intent that <b>must</b> be passed to Activity#startActivityForResult(Intent, int) (or similar) in order to start screen capture. Customizes the activity and resulting MediaProjection session based up the provided config. The activity will prompt the user whether to allow screen capture. The result of this activity (received by overriding Activity#onActivityResult(int, int, Intent) onActivityResult(int, int, Intent)) should be passed to #getMediaProjection(int, Intent).

If MediaProjectionConfig was created from: <ul> <li> MediaProjectionConfig#createConfigForDefaultDisplay(), then creates an Intent for capturing the default display. The activity limits the user's choice to just the display specified. </li> <li> MediaProjectionConfig#createConfigForUserChoice(), then creates an Intent for deferring which region to capture to the user. This gives the user the same behaviour as calling #createScreenCaptureIntent(). The activity gives the user the choice between android.view.Display#DEFAULT_DISPLAY, or a different region. </li> </ul>

Should be used instead of #createScreenCaptureIntent() when the calling app wants to customize the activity shown to the user.

Java documentation for android.media.projection.MediaProjectionManager.createScreenCaptureIntent(android.media.projection.MediaProjectionConfig).

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.

Applies to