Start a new topic

captureScreen function

captureScreen function


Hello friends

I want to specify a name in the picture taken with the screenCapture.

How can I do that ?

I saw the function : 

But what should I put in ; "/Path/In/Bundle/toImage.png" ?

I want to save the file in the Phtoto Library with a specific name.

Here's what I found in the documentation :

 

captureScreen

Use this function to generate a screenshot from the current Wikitude SDK view.

@param {bool} includeWebView: Indicates if the ARchitect web view should be included in the generated screenshot or not.
@param {string} imagePathInBundleorNullForPhotoLibrary: If a file path or file name is given, the generated screenshot will be saved in the application bundle. Passing null will save the photo in the device photo library.
@param {function} onSuccess: A function that is called when the screen could be successfully captured. The bundle path is passed to the function when the photo was saved into the application bundle.
@param {function} onError: A function that is called when an error occurred during screen capturing.


 

 

wikitude.captureScreen(includeWebView, "/Path/In/Bundle/toImage.png",

{ onSuccess: function(path)

{ alert('success: ' + path); },

onError: function(errorDescription)

{ alert('error: ' + errorDescription); } });

 

 

 

Thanks

Please use "null" instead of a full-path. Name of the image in gallery will be passed in callback function. Defining a custom name for the gallery is yet not possible.

Best regards
Login or Signup to post a comment