MediaProjectionAppContent


public final class MediaProjectionAppContent
extends Object implements Parcelable

java.lang.Object
   ↳ 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

class MediaProjectionAppContent.Builder

Builder for MediaProjectionAppContent

Inherited constants

Fields

public static final Creator<MediaProjectionAppContent> CREATOR

Public methods

int describeContents()

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

Icon getIcon()

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

int getId()

Returns the mandatory identifier for this content.

Bitmap getThumbnail()

Returns the optional thumbnail representing the content.

CharSequence getTitle()

Returns the optional title for the content.

void writeToParcel(Parcel dest, int flags)

Flatten this object in to a Parcel.

Inherited methods

Fields

CREATOR

Added in API level 37
public static final Creator<MediaProjectionAppContent> CREATOR

Public methods

describeContents

Added in API level 37
public int describeContents ()

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.

Returns
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
public Icon getIcon ()

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.

Returns
Icon

getId

Added in API level 37
public int getId ()

Returns the mandatory identifier for this content.

Returns
int

getThumbnail

Added in API level 37
public Bitmap getThumbnail ()

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

Returns
Bitmap

getTitle

Added in API level 37
public CharSequence getTitle ()

Returns the optional title for the content.

Returns
CharSequence

writeToParcel

Added in API level 37
public void writeToParcel (Parcel dest, 
                int flags)

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.PARCELABLE_WRITE_RETURN_VALUE.
Value is either 0 or a combination of the following: