Hi everyone:
After several test, now I can use the jSignature javascript plugin I was using in my web, in my B4A app, in order to update my database from b4a the same way I'm doing in my web. I know there are some solutions to do this in B4A, but I need to do it this way because I was using it before. Maybe useful for someone.
See attached an small sample of using the jSignature plugin inside a WebView.
You can read about jSignature here:
https://willowsystems.github.io/jSignature/#/about/
Basically I have a small webpage in the assets dir with a div to capture the sign, and I get the data from it with WebViewExtras (thanks to @warwound)
Just a javascript function in my web page
And I call it from my app:
After several test, now I can use the jSignature javascript plugin I was using in my web, in my B4A app, in order to update my database from b4a the same way I'm doing in my web. I know there are some solutions to do this in B4A, but I need to do it this way because I was using it before. Maybe useful for someone.
See attached an small sample of using the jSignature plugin inside a WebView.
You can read about jSignature here:
https://willowsystems.github.io/jSignature/#/about/
Basically I have a small webpage in the assets dir with a div to capture the sign, and I get the data from it with WebViewExtras (thanks to @warwound)
Just a javascript function in my web page
B4X:
function SendBase30() {
$("#sign").val($('#signature').jSignature('getData', 'base30'));
return document.getElementById('sign').value;
}
And I call it from my app:
B4X:
Sub Button1_Click
Dim Javascript As String
Javascript="B4A.CallSub('GetBase30', true, SendBase30())"
WebViewExtras1.ExecuteJavascript(Javascript)
End Sub
Sub GetBase30(data As String)
Label1.Text = data
End Sub