Added in API level 37

MediaProjectionAppContent


class MediaProjectionAppContent : Parcelable
kotlin.Any
   ↳ android.media.projection.MediaProjectionAppContent

Holds information about content an app can share via the MediaProjection APIs.

An application requesting a session can add its own content in the list of available content along with the whole screen or a single application.

Each instance of MediaProjectionAppContent contains an id that is used to identify the content chosen by the user back to the advertising application, thus the meaning of the id is only relevant to that application and must uniquely identify a content to be shared.

Summary

Nested classes

Builder for MediaProjectionAppContent.

Inherited constants
Public methods
Int

Describe the kinds of special objects contained in this Parcelable instance's marshaled representation.

Icon?

Returns the optional icon for the content to be displayed alongside the title.

Int

Returns the mandatory identifier for this content.

Bitmap?

Returns the optional thumbnail representing the content.

CharSequence

Returns the optional title for the content.

Unit
writeToParcel(dest: Parcel, flags: Int)

Flatten this object in to a Parcel.

Properties
static Parcelable.Creator<MediaProjectionAppContent!>

Public methods

describeContents

Added in API level 37
fun describeContents(): Int

Describe the kinds of special objects contained in this Parcelable instance's marshaled representation. For example, if the object will include a file descriptor in the output of writeToParcel(Parcel,int), the return value of this method must include the CONTENTS_FILE_DESCRIPTOR bit.

Return
Int a bitmask indicating the set of special object types marshaled by this Parcelable object instance.
Value is either 0 or

getIcon

Added in API level 37
fun getIcon(): Icon?

Returns the optional icon for the content to be displayed alongside the title.

The icon's goal is to represent the entity sharing the content such as the favicon of the website.

getId

Added in API level 37
fun getId(): Int

Returns the mandatory identifier for this content.

getThumbnail

Added in API level 37
fun getThumbnail(): Bitmap?

Returns the optional thumbnail representing the content. The thumbnail's goal is to give a preview of the shared content.

getTitle

Added in API level 37
fun getTitle(): CharSequence

Returns the optional title for the content.

writeToParcel

Added in API level 37
fun writeToParcel(
    dest: Parcel,
    flags: Int
): Unit

Flatten this object in to a Parcel.

Parameters
dest Parcel: The Parcel in which the object should be written.
This value cannot be null.
flags Int: Additional flags about how the object should be written. May be 0 or PARCELABLE_WRITE_RETURN_VALUE.
Value is either 0 or a combination of the following:

Properties

CREATOR

Added in API level 37
static val CREATOR: Parcelable.Creator<MediaProjectionAppContent!>