Topics   All   Mac OS X (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server   Client   Old   Guides   Examples
New in version: 8.2   8.3   8.4   8.5   9.0   9.1   9.2   9.3   9.4   9.5    Statistic  


Check for source availability.

Component Version macOS Windows Server FileMaker Cloud FileMaker iOS SDK
ImagePicker 7.3 No No No No Yes
MBS( "ImagePicker.IsSourceTypeAvailable"; sourceType )   More


Parameter Description Example value
sourceType The source to use to pick an image.
Can be PhotoLibrary, Camera or SavedPhotosAlbum.


Returns OK or error.


Check for source availability.
Returns a Boolean value indicating whether the device supports picking media using the specified source type.
1 if the device supports the specified source type; 0 if the specified source type is not available.
Because a media source may not be present or may be unavailable, devices may not always support all source types. For example, if you attempt to pick an image from the user’s library and the library is empty, this method returns 0. Similarly, if the camera is already in use, this method returns 0.
Before attempting to use an ImagePickerController object to pick an image, you must call this method to ensure that the desired source type is available.


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

See also

Example Databases

Blog Entries

Created 17th June 2017, last changed 20th June 2017

ImagePicker.IsPresented   -   ImagePicker.MediaCropRect

Feedback: Report problem or ask question.

MBS FileMaker blog