<doc>
	<legacy_id></legacy_id>
	<name>mobileExportImageToAlbum</name>
	<type>command</type>

	<syntax>
		<example>mobileExportImageToAlbum <i>imageTextOrControl</i> [<i>fileName</i>]</example>
	</syntax>

	<synonyms>
		<synonym>iphoneExportImageToAlbum</synonym>
	</synonyms>

	<summary>Saves an image to the user&apos;s photo album.</summary>

	<examples>
<example>mobileExportImageToAlbum tImageText</example>
<example>mobileExportImageToAlbum the text of image 1</example>
<example><p>put the long ID of image &quot;myImage&quot; into tImageID</p><p>mobileExportImageToAlbum tImageID</p></example>
<example><p>// Android only</p><p>put the long ID of image &quot;myImage&quot; into tImageID</p><p>mobileExportImageToAlbum tImageID, &quot;my_file&quot;</p></example>
	</examples>

	<history>
		<introduced version="4.6.1">Introduced</introduced>
		<deprecated version=""></deprecated>
		<removed version=""></removed>
		<changed version="5.5.1">Added support for Android</changed>
	</history>

	<objects>
	</objects>

	<platforms>
		<ios/>
		<android/>
	</platforms>

	<classes>
		<mobile/>
	</classes>

	<security>
	</security>


	<classification>
	</classification>

	<references>
		<command tag="mobilePickPhoto">mobilePickPhoto Command</command>
	</references>

	<description>
	<overview>Use the <b>mobileExportImageToAlbum</b> to save an image to the user&apos;s photo album of gallery. If used on an iOS device that has a camera, the image is saved to the Camera Roll, otherwise it is saved to the Saved Photos album. On Android, images are saved to the default Pictures folder (the Write External Storage permission must be enabled to allow the application to write in the public folder).</overview>

		<parameters>
  <parameter>
    <name>imageTextOrControl</name>
    <description>One of the following:</description>
    <options title="">
      <option>
        <item>binary data</item>
        <description>The binary data of an image (the 'text') in PNG, GIF or JPEG format.</description>
      </option>
      <option>
        <item>image long id</item>
        <description>The long id of an image object containing an image in PNG, GIF or JPEG format.</description>
      </option>
    </options>
  </parameter>
  <parameter>
    <name>fileName</name>
    <description>Name under which the image file is to be saved on the Android file system. A random name is generated if a name is not specified.</description>
  </parameter>		</parameters>

	<value>The <b>mobileExportImageToAlbum</b> command returns empty in the result if exporting succeeded. Otherwise it returns one of:<p>   * &apos;could not find image&apos; - the image object could not be found</p><p>   * &apos;not an image&apos; - the object was not an image</p><p>   * &apos;not a supported format&apos; - the image object in not of PNG, GIF or JPEG format&apos;</p><p>   * &apos;export failed - an error occurred while trying to save the image to the album</p></value>
	<comments><note></note>When running in the iOS simulator, there needs to be at least one image in the photo album for exporting to succeed. You can add images to the photo album in a simulator by dragging an image on the simulator window, and saving the image to album from Safari (click and hold on the image to bring up an alert with the option).</comments>
	</description>
</doc>