EmbeddedPhotoPickerFeatureInfo


class EmbeddedPhotoPickerFeatureInfo : Parcelable
kotlin.Any
   ↳ android.widget.photopicker.EmbeddedPhotoPickerFeatureInfo

An immutable parcel to carry information regarding desired features of caller for a given session.

Below features are currently supported in embedded photopicker.

  • Mime type to filter media
  • Accent color to change color of primary picker element
  • Ordered selection of media items
  • Max selection media count restriction
  • Pre-selected uris
  • Theme night mode
  • Highlighting media results based on a given input query including highlighting media results from certain albums
  • Location metadata request
  • Selection options for media items
  • UI customization options for the embedded photo picker

Callers should use Builder to set the desired features.

Summary

Nested classes

Constants
static Int

Constant to indicate the Albums tab as the launch tab.

static Int

Constant to indicate the Photos tab as the launch tab.

static Int

Constant to indicate default tab when no tab has been set as the launch tab.

Inherited constants
Public methods
Int

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

Long

EmbeddedPhotoPickerUiCustomizationParams?

Returns the embedded-specific UI customization options set by the app.

String

Returns the highlight album set by the app

String

Returns the highlight media text query set by the app

Int

Returns the highlight type set by the app

Int

Returns the launch tab set by the app.

Int

MutableList<String!>

MutableList<Uri!>

PhotoPickerSelectionParams?

Returns the selection options, which specify filters for media item properties.

Int

PhotoPickerUiCustomizationParams?

Returns the ui customization options set by the app.

Boolean

Returns whether the app enabled scrolling in collapsed mode.

Boolean

Returns whether the app is requesting location metadata for selected media items.

Boolean

Boolean

Returns whether or not the picker was launched in expanded state

String

Returns a string representation of the object.

Unit
writeToParcel(dest: Parcel, flags: Int)

Flatten this object in to a Parcel.

Properties
static Parcelable.Creator<EmbeddedPhotoPickerFeatureInfo!>

Constants

TAB_ALBUMS

static val TAB_ALBUMS: Int

Constant to indicate the Albums tab as the launch tab.

Value: 0

TAB_IMAGES

static val TAB_IMAGES: Int

Constant to indicate the Photos tab as the launch tab.

Value: 1

TAB_UNSET

static val TAB_UNSET: Int

Constant to indicate default tab when no tab has been set as the launch tab.

Value: -1

Public methods

describeContents

Added in API level 36
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

getAccentColor

fun getAccentColor(): Long

getEmbeddedUiCustomizationParams

fun getEmbeddedUiCustomizationParams(): EmbeddedPhotoPickerUiCustomizationParams?

Returns the embedded-specific UI customization options set by the app.

Return
EmbeddedPhotoPickerUiCustomizationParams? The EmbeddedPhotoPickerUiCustomizationParams object, or null if no custom embedded options are set.

getHighlightAlbumId

fun getHighlightAlbumId(): String

Returns the highlight album set by the app

Return
String This value cannot be null.

getHighlightSearchMediaTextQuery

fun getHighlightSearchMediaTextQuery(): String

Returns the highlight media text query set by the app

Return
String This value cannot be null.

getHighlightType

fun getHighlightType(): Int

Returns the highlight type set by the app

getLaunchTab

fun getLaunchTab(): Int

Returns the launch tab set by the app.

Return
Int The launch tab for the embedded PhotoPicker, which is one of the android.widget.photopicker.EmbeddedPhotoPickerFeatureInfo.LaunchTab values (e.g., EmbeddedPhotoPickerFeatureInfo.TAB_IMAGES or EmbeddedPhotoPickerFeatureInfo.TAB_ALBUMS). If no launch tab is set then EmbeddedPhotoPickerFeatureInfo.TAB_UNSET is the default value.
Value is one of the following:

getMaxSelectionLimit

fun getMaxSelectionLimit(): Int

getMimeTypes

fun getMimeTypes(): MutableList<String!>
Return
MutableList<String!> This value cannot be null.

getPreSelectedUris

fun getPreSelectedUris(): MutableList<Uri!>
Return
MutableList<Uri!> This value cannot be null.

getSelectionParams

fun getSelectionParams(): PhotoPickerSelectionParams?

Returns the selection options, which specify filters for media item properties.

Return
PhotoPickerSelectionParams? The PhotoPickerSelectionParams object containing the selection filters, or null if no custom selection options are set.

getThemeNightMode

fun getThemeNightMode(): Int

getUiCustomizationParams

Added in API level 37
Also in U Extensions 22
Deprecated in API level 37.1
fun getUiCustomizationParams(): PhotoPickerUiCustomizationParams?

Deprecated: Use getEmbeddedUiCustomizationParams() instead.

Returns the ui customization options set by the app.

Return
PhotoPickerUiCustomizationParams? The PhotoPickerUiCustomizationParams object containing the ui customization options, or null if no custom options are set.

isCollapsedModeScrollingEnabled

fun isCollapsedModeScrollingEnabled(): Boolean

Returns whether the app enabled scrolling in collapsed mode.

Return
Boolean true if the app enabled scrolling in collapsed mode, false otherwise.

isLocationMetadataRequested

fun isLocationMetadataRequested(): Boolean

Returns whether the app is requesting location metadata for selected media items.

isOrderedSelection

fun isOrderedSelection(): Boolean

isPickerLaunchedInExpandedState

fun isPickerLaunchedInExpandedState(): Boolean

Returns whether or not the picker was launched in expanded state

toString

Added in API level 36
fun toString(): String

Returns a string representation of the object.

Return
String a string representation of the object.

writeToParcel

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

Flatten this object in to a Parcel.

Parameters
dest Parcel: 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

static val CREATOR: Parcelable.Creator<EmbeddedPhotoPickerFeatureInfo!>