I am developing an app that will be deployed on both ios and android and I require to capture a users signature. Is this possible and can anyone help.
Thanks
Capturing user signature
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Re: Capturing user signature
Hi..
Yes it is possible.. I have attached a stack that will show you the basics... just write your name or signature on the card, or screen if on your device...once you have the 'signature' export the snapshot of the graphic to a file and then you could do with it what you will..
hope it helps
Dixie
Yes it is possible.. I have attached a stack that will show you the basics... just write your name or signature on the card, or screen if on your device...once you have the 'signature' export the snapshot of the graphic to a file and then you could do with it what you will..

hope it helps
Dixie
- Attachments
-
- Draw.livecode.zip
- (1.77 KiB) Downloaded 294 times
Re: Capturing user signature
Hi,
I can't open Dixie's stack, because I'm LC 5.0.2 and he might be using a newer version of LC. Therefore, I'll post my solution anyway.
My first attempt used mouseDown and a repeat loop until the mouse is up, but that doesn't work on tablets (with LC 5.0.2). Therefore I am using the mouseStillDown message.
You need a graphic object of type polygon and one transparent button "Canvas" on top of it. Set the script of the button (or card) to the script posted here. The scripts is very slow, but it kind of works. I look forward to seeing better solutions.
Kind regards,
Mark
I can't open Dixie's stack, because I'm LC 5.0.2 and he might be using a newer version of LC. Therefore, I'll post my solution anyway.
My first attempt used mouseDown and a repeat loop until the mouse is up, but that doesn't work on tablets (with LC 5.0.2). Therefore I am using the mouseStillDown message.
Code: Select all
local lPoints
on mouseStillDown
put the mouseLoc into myLoc
if myLoc is within the rect of btn "Canvas" then
put myLoc & cr after lPoints
set the points of grc 1 to lPoints
end if
end mouseStillDown
on mouseUp
put cr after lPoints
end mouseUp
Kind regards,
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
Re: Capturing user signature
'Draw' stack saved in legacy format...
This is the very basics of the 'skribble' app
Dixie
This is the very basics of the 'skribble' app
Dixie
- Attachments
-
- Draw legacy.livecode.zip
- (1.8 KiB) Downloaded 257 times
Re: Capturing user signature
Thanks, Dixie. The mouseMove handler is indeed much faster than mouseStilldown.
I have created a simple stack, which can be built into other stacks. Download it here. It also contains a number of resizing routines for different devices. Use the following syntax from the message box:
Devices currently supported are: iPhone, iPad, Android7 (7"), iPod, iPhone Retina, iPad Retina.
Kind regards,
Mark
I have created a simple stack, which can be built into other stacks. Download it here. It also contains a number of resizing routines for different devices. Use the following syntax from the message box:
Code: Select all
set the screenSize of this stack to "iPhone"
set the screenSize of this stack to "Android7"
set the screenSize of this stack to "iPad Retina"
Kind regards,
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode