snapshot(...)

snapshot(opts? : SocialOptions, callback?: (didSave: boolean, didShare: boolean) => void) : void;
snapshot(msg? : string, callback?: (didSave: boolean, didShare: boolean) => void)) : void;

Triggers the device to take a snapshot. While this function returns instantly, the snapshot will not be taken until the next frame is rendered to the screen.

Parameters

Parameter Type Description
opts optional, string or SocialOptions If a string it will be used as the message to pre-fill in any share dialog presented to the user, overriding any value set with the snapshotMessage(val) function. If a SocialOptions, message will override any value set with the snapshotMessage(val) function. Note that some share methods, such as Facebook, choose to ignore this message and present an empty dialog to the user.
callback optional, function The passed function will be called when the user returns from the Save/Share dialog. The arguments indicate if the user tapped on the Save or Share buttons in that dialog, but do not guarantee that the user actually completed those actions.
zapcode branded_zapcode i