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()
Set<Integer> getAllowedNavigationTabs()

Returns the set of allowed navigation tabs configured for the session.

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 isCameraButtonEnabled()

Returns whether the camera button is enabled in the embedded photo picker UI.

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

boolean isSearchStatusEventsEnabled()

Returns whether search status change events are enabled for the session.

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 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 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 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 U Extensions 15
public static final Creator<EmbeddedPhotoPickerFeatureInfo> CREATOR

Public methods

describeContents

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 U Extensions 15
public long getAccentColor ()

Returns
long

getAllowedNavigationTabs

Added in U Extensions 25
public Set<Integer> getAllowedNavigationTabs ()

Returns the set of allowed navigation tabs configured for the session.

An empty set indicates that no restrictions have been configured by the calling app on navigation tabs.

Returns
Set<Integer> This value cannot be null.

getEmbeddedUiCustomizationParams

Added 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 U Extensions 19
public String getHighlightAlbumId ()

Returns the highlight album set by the app

Returns
String This value cannot be null.

getHighlightSearchMediaTextQuery

Added 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 U Extensions 21
public int getHighlightType ()

Returns the highlight type set by the app

Returns
int

getLaunchTab

Added 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[hidden: 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 U Extensions 15
public int getMaxSelectionLimit ()

Returns
int

getMimeTypes

Added in U Extensions 15
public List<String> getMimeTypes ()

Returns
List<String> This value cannot be null.

getPreSelectedUris

Added in U Extensions 15
public List<Uri> getPreSelectedUris ()

Returns
List<Uri> This value cannot be null.

getSelectionParams

Added 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 U Extensions 15
public int getThemeNightMode ()

Returns
int

getUiCustomizationParams

Added 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.

isCameraButtonEnabled

Added in U Extensions 25
public boolean isCameraButtonEnabled ()

Returns whether the camera button is enabled in the embedded photo picker UI.

Returns
boolean true if the camera button is enabled by the calling app, false otherwise.

isCollapsedModeScrollingEnabled

Added 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 U Extensions 23
public boolean isLocationMetadataRequested ()

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

Returns
boolean

isOrderedSelection

Added in U Extensions 15
public boolean isOrderedSelection ()

Returns
boolean

isPickerLaunchedInExpandedState

Added in U Extensions 21
public boolean isPickerLaunchedInExpandedState ()

Returns whether or not the picker was launched in expanded state

Returns
boolean

isSearchStatusEventsEnabled

Added in U Extensions 25
public boolean isSearchStatusEventsEnabled ()

Returns whether search status change events are enabled for the session.

When enabled, the client receives notifications about search feature availability changes via EmbeddedPhotoPickerClient.onSearchStatusChanged(boolean).

Returns
boolean true if search status events are enabled, false otherwise.

toString

public String toString ()

Returns a string representation of the object.

Returns
String a string representation of the object.

writeToParcel

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: