Topics   All   Mac OS X (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server (Not)   Client   Old   Guides   Examples
New in version: 6.2   6.3   6.4   6.5   7.0   7.1   7.2   7.3   7.4   7.5    Statistic  

ImagePicker.WriteImageToSavedPhotosAlbum

Adds a photo to the saved photos album.

Component Version macOS Windows Server FileMaker Cloud FileMaker iOS SDK
ImagePicker 7.3 No No No No Yes

MBS( "ImagePicker.WriteImageToSavedPhotosAlbum"; Image { ; FileName; ScriptName; Parameter } )

Parameters

Parameter Description Example value
Image The image container to add to photo roll.
FileName Optional
The file name for the script.
Get(FileName)
ScriptName Optional
The script name for the trigger.
Parameter Optional
The script parameter to use.

Result

Returns OK or error.

Description

Adds a photo to the saved photos album.
The work is done in background and we can optionally trigger a script when done.

This function requires a native path. Use Path.FileMakerPathToNativePath to convert a FileMaker path to a native path if required. If you like to have the user choose the path, you can use FileDialog functions.

Examples

Add image to saved photos:

If [ IsEmpty ( ImagePicker::Picture ) ]
    Show Custom Dialog [ "No image?" ]
Else
    Set Variable [ $path ; Value: MBS( "ImagePicker.WriteImageToSavedPhotosAlbum"; ImagePicker::Picture; Get(FileName); "AddedToCameraRoll" ) ]
End If

See also

Example Databases


ImagePicker.VideoIsCompatibleWithSavedPhotosAlbum   -   ImagePicker.WriteVideoToSavedPhotosAlbum

Feedback: Report problem or ask question.




Links
MBS FileMaker blog