Intent intent = new Intent("biz.binarysolutions.signature.CAPTURE");
String keyCode = "biz.binarysolutions.signature.ActivationCode";
String keyFileName = "biz.binarysolutions.signature.FileName";
String keyTitle = "biz.binarysolutions.signature.Title";
String keyStrokeWidth = "biz.binarysolutions.signature.StrokeWidth";
String keyStrokeColor = "biz.binarysolutions.signature.StrokeColor";
String keyCrop = "biz.binarysolutions.signature.Crop";
String keyWidth = "biz.binarysolutions.signature.Width";
String keyHeight = "biz.binarysolutions.signature.Height";
String keyBackgroundColor = "biz.binarysolutions.signature.BackgroundColor";
String keyBackgroundImage = "biz.binarysolutions.signature.BackgroundImage";
String keyKeepSignature = "biz.binarysolutions.signature.KeepSignature";
String code = ""; // your purchase transaction id
String fileName = ""; // set the file name (see important notes bellow!)
String title = ""; // optional, default is 'Signature Capture'
int strokeWidth = 10; // optional, default is 8
String strokeColor = "FF0000FF"; // optional, default is BLACK (FF000000)
boolean crop = false; // optional, default is true
String backgroundColor = "FF00FF00"; // optional, default is fully transparent
String backgroundImage = // optional, default is none
"http://binarysolutions.biz/logo.png";
// allowed units: px, dp, dip, sp, pt, mm, in
String width = "300dp"; // optional, default is max
String height = "100dp"; // same as above
/* The following parameter is available only when targeting API level 30 or above.
If set to true, the signature file is persisted in Signature Capture's directory.
*/
boolean keepSignature = true; // optional, default is false
intent.putExtra(keyCode, code);
intent.putExtra(keyFileName, fileName);
intent.putExtra(keyTitle, title);
intent.putExtra(keyStrokeWidth, strokeWidth);
intent.putExtra(keyStrokeColor, strokeColor);
intent.putExtra(keyCrop, crop);
intent.putExtra(keyWidth, width);
intent.putExtra(keyHeight, height);
intent.putExtra(keyBackgroundColor, backgroundColor);
intent.putExtra(keyBackgroundImage, backgroundImage);
intent.putExtra(keyKeepSignature, keepSignature);
intent.setComponent(
new ComponentName(
"biz.binarysolutions.signature",
"biz.binarysolutions.signature.Capture"
)
);
startActivityForResult(intent, CAPTURE_REQUEST_CODE);