Android Question jSignature webview

José J. Aguilar

Licensed User

I have a small webpage where I capture a signature and save it in my db into a small text format (base30).

I've made a small html page with a jSignature pad and I load it into a WebView. I would like to get the base30 string from the WebView.

Do I need to use WebViewExtras? Or could I get it just with the Webview?

See attached a small example.



    62 KB · Views: 161

José J. Aguilar

Licensed User
Thanks ronell, I watched the threads related with signature capture before start trying this solution. If I can't get it work, I probably will use the DonMamfred wrap "Signature Capture Dialog", I think it produces smoother images.

Well, I'm trying to get the base30 (or base64) value of the signature with WebViewExtras v2.

I have this javascript in my html, it returns the encoded string of my signature, and (just testing) it change document.title to the encoded string too.

function Base30() {
    document.title = $('#signature').jSignature('getData', 'base30');
    return $('#signature').jSignature('getData', 'base30');

Now, in my app:
Sub Button1_Click
    Dim Javascript As String
    Javascript="B4A.CallSub('GetBase30', true, Base30())"
End Sub

Sub GetBase30(data As String)
    Msgbox(data, "Enconded Data")
    Label1.Text = data
End Sub

The value I get is "undefined", while if I execute my html in a browser, I get the right values.

Thanks in advance,
Upvote 0