EmbeddedPhotoPickerFeatureInfo


public final class EmbeddedPhotoPickerFeatureInfo
extends Object implements Parcelable

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

class EmbeddedPhotoPickerFeatureInfo.Builder

 

Constants

int TAB_ALBUMS

Constant to indicate the Albums tab as the launch tab.

int TAB_IMAGES

Constant to indicate the Photos tab as the launch tab.

int TAB_UNSET

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

Inherited constants

Fields

public static final Creator<EmbeddedPhotoPickerFeatureInfo> CREATOR

Public methods

int describeContents()

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

long getAccentColor()
EmbeddedPhotoPickerUiCustomizationParams getEmbeddedUiCustomizationParams()

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

String getHighlightAlbumId()

Returns the highlight album set by the app

String getHighlightSearchMediaTextQuery()

Returns the highlight media text query set by the app

int getHighlightType()

Returns the highlight type set by the app

int getLaunchTab()

Returns the launch tab set by the app.

int getMaxSelectionLimit()
List<String> getMimeTypes()
List<Uri> getPreSelectedUris()
PhotoPickerSelectionParams getSelectionParams()

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

int getThemeNightMode()
PhotoPickerUiCustomizationParams getUiCustomizationParams()

This method was deprecated in API level 37.1. Use getEmbeddedUiCustomizationParams() instead.

boolean isCollapsedModeScrollingEnabled()

Returns whether the app enabled scrolling in collapsed mode.

boolean isLocationMetadataRequested()

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

boolean isOrderedSelection()
boolean isPickerLaunchedInExpandedState()

Returns whether or not the picker was launched in expanded state

String toString()

Returns a string representation of the object.

void writeToParcel(Parcel dest, int flags)

Flatten this object in to a Parcel.

Inherited methods

Constants

TAB_ALBUMS

Added in version 37.1
Also in U Extensions 23
public static final int TAB_ALBUMS

Constant to indicate the Albums tab as the launch tab.

Constant Value: 0 (0x00000000)

TAB_IMAGES

Added in version 37.1
Also in U Extensions 23
public static final int TAB_IMAGES

Constant to indicate the Photos tab as the launch tab.

Constant Value: 1 (0x00000001)

TAB_UNSET

Added in version 37.1
Also in U Extensions 23
public static final int TAB_UNSET

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

Constant Value: -1 (0xffffffff)

Fields

CREATOR

Added in API level 36
Also in U Extensions 15
public static final Creator<EmbeddedPhotoPickerFeatureInfo> CREATOR

Public methods

describeContents

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

getAccentColor

Added in API level 36
Also in U Extensions 15
public long getAccentColor ()

Returns
long

getEmbeddedUiCustomizationParams

Added in version 37.1
Also in U Extensions 23
public EmbeddedPhotoPickerUiCustomizationParams getEmbeddedUiCustomizationParams ()

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

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

getHighlightAlbumId

Added in version 36.1
Also in U Extensions 19
public String getHighlightAlbumId ()

Returns the highlight album set by the app

Returns
String This value cannot be null.

getHighlightSearchMediaTextQuery

Added in version 36.1
Also in U Extensions 19
public String getHighlightSearchMediaTextQuery ()

Returns the highlight media text query set by the app

Returns
String This value cannot be null.

getHighlightType

Added in API level 37
Also in U Extensions 21
public int getHighlightType ()

Returns the highlight type set by the app

Returns
int

getLaunchTab

Added in version 37.1
Also in U Extensions 23
public int getLaunchTab ()

Returns the launch tab set by the app.

Returns
int The launch tab for the embedded PhotoPicker, which is one of the ERROR(LaunchTab/android.widget.photopicker.EmbeddedPhotoPickerFeatureInfo.LaunchTab 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

Added in API level 36
Also in U Extensions 15
public int getMaxSelectionLimit ()

Returns
int

getMimeTypes

Added in API level 36
Also in U Extensions 15
public List<String> getMimeTypes ()

Returns
List<String> This value cannot be null.

getPreSelectedUris

Added in API level 36
Also in U Extensions 15
public List<Uri> getPreSelectedUris ()

Returns
List<Uri> This value cannot be null.

getSelectionParams

Added in API level 37
Also in U Extensions 22
public PhotoPickerSelectionParams getSelectionParams ()

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

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

getThemeNightMode

Added in API level 36
Also in U Extensions 15
public int getThemeNightMode ()

Returns
int

getUiCustomizationParams

Added in API level 37
Also in U Extensions 22
Deprecated in API level 37.1
public PhotoPickerUiCustomizationParams getUiCustomizationParams ()

This method was deprecated in API level 37.1.
Use getEmbeddedUiCustomizationParams() instead.

Returns the ui customization options set by the app.

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

isCollapsedModeScrollingEnabled

Added in version 37.1
Also in U Extensions 23
public boolean isCollapsedModeScrollingEnabled ()

Returns whether the app enabled scrolling in collapsed mode.

Returns
boolean true if the app enabled scrolling in collapsed mode, false otherwise.

isLocationMetadataRequested

Added in version 37.1
Also in U Extensions 23
public boolean isLocationMetadataRequested ()

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

Returns
boolean

isOrderedSelection

Added in API level 36
Also in U Extensions 15
public boolean isOrderedSelection ()

Returns
boolean

isPickerLaunchedInExpandedState

Added in API level 37
Also in U Extensions 21
public boolean isPickerLaunchedInExpandedState ()

Returns whether or not the picker was launched in expanded state

Returns
boolean

toString

Added in API level 36
public String toString ()

Returns a string representation of the object.

Returns
String a string representation of the object.

writeToParcel

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

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