MediaProjectionConfig.Builder.SetOwnAppContentProvided(Boolean) 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.
Indicates to the system that the requesting application is offering its own content to be shared as MediaProjectionConfig.PROJECTION_SOURCE_APP_CONTENT.
[Android.Runtime.Register("setOwnAppContentProvided", "(Z)Landroid/media/projection/MediaProjectionConfig$Builder;", "", ApiSince=37)]
public Android.Media.Projection.MediaProjectionConfig.Builder SetOwnAppContentProvided(bool isEnabled);
[<Android.Runtime.Register("setOwnAppContentProvided", "(Z)Landroid/media/projection/MediaProjectionConfig$Builder;", "", ApiSince=37)>]
member this.SetOwnAppContentProvided : bool -> Android.Media.Projection.MediaProjectionConfig.Builder
Parameters
- isEnabled
- Boolean
Returns
- Attributes
Remarks
Indicates to the system that the requesting application is offering its own content to be shared as MediaProjectionConfig.PROJECTION_SOURCE_APP_CONTENT.
When setOwnAppContentProvided(boolean) is set to true, the requesting app's content will override any content from other apps that might have been displayed by the system.
</application>
...
<service
android:exported="true"
android:name="com.example.AppContentSharingService"
android:permission="android.permission.MANAGE_MEDIA_PROJECTION">
<intent-filter>
<action android:name="android.media.projection.AppContentProjectionService"/>
</intent-filter>
</service>
</application>
If supported by the device, the content will be displayed to the user in the media projection picker and AppContentProjectionService.onContentRequest(AppContentRequest) will be called, offering the a chance to this application to provide or update the content to be shared.
If the user selects an item from this list, AppContentProjectionService.onLoopbackProjectionStarted(AppContentProjectionSession,int) will be called and the projection session will be considered as started.
If the shared content becomes unavailable, this application will be responsible for calling AppContentProjectionSession.notifySessionStop(). If the session is stopped outside of this application AppContentProjectionService.onSessionStopped(AppContentProjectionSession) will be called.
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.