Components | All | New | MacOS | Windows | Linux | iOS | ||||
Examples | Mac & Win | Server | Client | Guides | Statistic | FMM | Blog | Deprecated | Old |
Check for source availability.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
ImagePicker | 7.3 | ❌ No | ❌ No | ❌ No | ❌ No | ✅ Yes |
Parameter | Description | Example |
---|---|---|
sourceType | The source to use to pick an image. Can be PhotoLibrary, Camera or SavedPhotosAlbum. |
"Camera" |
Returns OK or error.
Check for source type being available:
Set Variable [ $SourceType ; Value: Get(ScriptParameter) ]
Set Variable [ $r ; Value: MBS( "ImagePicker.IsSourceTypeAvailable"; $sourceType ) ]
If [ $r ≠ 1 ]
Show Custom Dialog [ "Can't pick picture." ; "The source " & $sourceType & " is not available." ]
Exit Script [ Text Result: "failed" ]
End If
Check availability:
Set Variable [ $CameraAvailable ; Value: MBS("ImagePicker.IsSourceTypeAvailable"; "Camera") ]
Set Variable [ $PhotoLibraryAvailable ; Value: MBS("ImagePicker.IsSourceTypeAvailable"; "PhotoLibrary") ]
Set Variable [ $SavedPhotosAlbumAvailable ; Value: MBS("ImagePicker.IsSourceTypeAvailable"; "SavedPhotosAlbum") ]
This function is free to use.
Created 17th June 2017, last changed 2nd May 2023