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 |
|
| Inherited constants | |
|---|---|
| Public methods | |
|---|---|
| Int |
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? |
Returns the optional thumbnail representing the content. |
| CharSequence |
getTitle()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
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
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.
getThumbnail
fun getThumbnail(): Bitmap?
Returns the optional thumbnail representing the content. The thumbnail's goal is to give a preview of the shared content.
getTitle
fun getTitle(): CharSequence
Returns the optional title for the content.
writeToParcel
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:
|