MediaProjectionAppContent.Builder


public static final class MediaProjectionAppContent.Builder
extends Object

java.lang.Object
   ↳ android.media.projection.MediaProjectionAppContent.Builder


Builder for MediaProjectionAppContent.

Summary

Public constructors

Builder(int id)

Creates a new Builder.

Public methods

MediaProjectionAppContent build()

Builds the MediaProjectionAppContent instance.

MediaProjectionAppContent.Builder setIcon(Icon icon)

Sets the icon to be displayed alongside the title

MediaProjectionAppContent.Builder setThumbnail(Bitmap thumbnail)

Sets the optional thumbnail for the content.

MediaProjectionAppContent.Builder setTitle(CharSequence title)

Sets the optional title for the content.

Inherited methods

Public constructors

Builder

Added in API level 37
public Builder (int id)

Creates a new Builder.

Parameters
id int: The mandatory identifier for the content. This must uniquely identify the content within the context of the calling application.

Public methods

setIcon

Added in API level 37
public MediaProjectionAppContent.Builder setIcon (Icon icon)

Sets the icon to be displayed alongside the title

Parameters
icon Icon

Returns
MediaProjectionAppContent.Builder This Builder instance for chaining

setThumbnail

Added in API level 37
public MediaProjectionAppContent.Builder setThumbnail (Bitmap thumbnail)

Sets the optional thumbnail for the content.

Parameters
thumbnail Bitmap: A Bitmap to visually represent the content.

Returns
MediaProjectionAppContent.Builder This Builder instance for chaining.

setTitle

Added in API level 37
public MediaProjectionAppContent.Builder setTitle (CharSequence title)

Sets the optional title for the content.

Parameters
title CharSequence: A CharSequence to display as the title.

Returns
MediaProjectionAppContent.Builder This Builder instance for chaining.