Skip to content
Titanium SDK
unreleased
Versionmainunreleased

PhotoGalleryOptionsType

pseudoAndroidiPhoneiPadmacOS

Simple object for specifying options to openPhotoGallery.

Properties 14

allowEditing

BooleaniPhoneiPadmacOS

Specifies if the media should be editable after capture/selection.

allowMultiple

BooleanAndroidiPhoneiPadsince Android 6.0.0, iPhone 9.2.0, iPad 9.2.0iOS 14.0+

Specifies if the user should be able to select multiple photos.

The allowMultiple property is only available on Android API 18 and above.

allowTranscoding

BooleaniPhoneiPadmacOSsince 8.1.0

Specifies if the video should be transcoded (using highest quality preset) . If set to false no video transcoding will be performed.

Default: true

animated

BooleaniPhoneiPadmacOS

Specifies if the dialog should be animated upon showing and hiding.

Default: true

autohide

BooleaniPhoneiPadmacOS

Specifies if the photo gallery should be hidden automatically after the media selection is completed.

Default: true

maxImages

BooleanAndroidsince 12.5.0

Specifies the number of images a user can select at maximum.

Only available on Android API 21 and above and with allowMultiple:true

mediaTypes

Array<String>since Android 7.3.0, iPhone 0.8, iPad 0.8

Array of media type constants to allow.

Live photos is only supported on the iOS platform, starting with iOS 9.1. If you want to allow live photos with Titanium.Media.MEDIA_TYPE_LIVEPHOTO, you also need to specify at least Titanium.Media.MEDIA_TYPE_PHOTO as a fallback. If you do not allow live photos, they still can be selected, but will be represented as a normal static photo.

Default: Only photo and video allowed.

pathOnly

BooleanAndroidsince 12.5.0

Do not include the blob in the result

selectionLimit

BooleaniPhoneiPadsince 9.2.0iOS 14.0+

Specifies number of media item that can be selected.

Setting this property to zero allows you to select maximum number of media supported by system. This will work only when PhotoGalleryOptionsType.allowMultiple is true.