• Introduction
  • Dev Environment Setup
  • Developing Apps
  • Data Handling
  • Device Capabilities
  • Testing & Debugging
  • Extending
Warning Older Docs! - You are viewing documentation for a previous released version of RhoMobile Suite.

Signature Capture

The Signature Capture API allows your device to take a signature and save it as an image.

Click here for information about the SignatureCapture.take method. This method opens a window for hand writing, where the user draws his signature. Signature is saved to an image file.

Example: :::ruby Rho::SignatureCapture.take(url_for( :action => :signature_callback), { :imageFormat => “jpg”, :penColor => 0xff0000, :penWidth=>3, :bgColor => 0x00ff00 })

To take signature on Blackberry devices, press the Menu button, then select ‘Capture’.

Inline Signature Capture

As of Rhodes version 3.3.3, the Inline Signature API is removed from Rhodes. This feature is only supported in Zebra RhoMobile Suite. If you wish to use this feature, you will need to upgrade to RhoMobile Suite. Your application’s build.yml will also need to be modified to indicate the application type is ‘Rhoelements’. Additionally, a RhoElements license is required.

Windows Mobile and Windows CE devices support signature capture started in window, which you can show over the current page (scrolling is not supported in this case).

Refer to the Inline Signature API for the inline signature capture methods.

  • visible - Display a window for hand writing, where the user draws his signature.
  • capture - Save the signature to an image file and call a callback.
  • clear - Clear the signature in the window.

Example of visible method:

Rho::SignatureCapture.visible(true, { :imageFormat => "jpg", :penColor => 0xff0000, :penWidth=>3, :bgColor => 0x00ff00 })

To save Signature to an image file and call callback: :::ruby Rho::SignatureCapture.capture(callback_url)

Example of capture method:

Rho::SignatureCapture.capture(url_for( :action => :signature_callback))

Example of clear method:

Rho::SignatureCapture.clear()

Sample

See controller and view in the /app/SignatureUtil folder of the System API Samples application for more information.

Back to Top