BUG - Signature.todataurl no longer working on Android apk's


This issue caused me a few problems today. The issue was resolved by rolling back to version 6.2.6 of NSB Appstudio.
Can you take a look and let me know if/ when resolved?
There is no issue in the ‘Web page’ version, just compiled android.


Can this be reproduced using the Signature sample?


Hi George,
I’ll run a test through this morning and let you know.
Best Regards,


I can reproduce the bug, but only after I slightly tweaked the sample code…


I added in a text box between the 2 buttons.

To replicate the issue…
If you sign the top signature box, then tap into the text box, it clears the signature box.
In real life, we have customers signing, then typing in names before saving, hence the issue.
I think what’s happening is that the new version of Appstudio is auto clearing the signature when it passes focus to a text box.
Can you confirm you can replicate this?


Yes, I was able to replicate this. It seems to have something to do with the popup keyboard appearing.

We added a couple of enhancement to the control recently. We’ll have to see what happens if we remove them.


I’ve used the signature control for some time without issue. However, recently I tried using it in a responsive design, not compiled as an apk. When the form the control resides is adjusted at run time the writing is offset by the displacement of the control. It is as if the signature control is set at design time and when moved at run time it is all wrong. This may be part of the issue you are seeing when the keyboard pops up. This is because the keyboard sometimes will cause movement of the form and the controls.

Just a thought. My workaround is to not change the position of the control at run time. This is an issue only on Android devices, When running on a PC this does not occur.

Thanks, John


I think JohnC has nailed it. The change we made to the Signature control in 6.2.7 was to make it responsive: if the screen size changes, the control changes size with it. Change the size of the control has the side effect of clearing it.

In Neil_HNF’s case, Android displaying the on screen keyboard triggers a resize event, clearing the area.

We could revert the change, but the control would lose its ability to resize automatically. It would have to be handled by the app.


Hi George,
Not sure there is any workaround on the app…?
Will have a play with it and see.


So I was away on holiday and then had to catch up after holiday, so it’s taken me a while to fully analyse.
Tried to work various workarounds and the only one would be to setup a custom keyboard.
I tried using fixed positions / sizing on the signature control and various other options like using an NSB.Inputbox to enter text onto a label, but any time the standard popup keyboard appears, the signature content is wiped.
Is this likely to a bug that can be fixed in the next version?
Until then, realistically, i’ll have to continue with version 6.2.6 .
Best Regards,


For what it’s worth, i can get ‘dynamic signature size’ with the following code at the moment:-

Sub Main
  dr= SysInfo(5)
  neww = 0.9 * SysInfo(0) / dr
  newh = 0.2 * SysInfo(1) /dr
  Signature1.Width = neww
  Signature1.Height = newh
  Signature1.style.borderColor = "black"
  Signature1.style.borderWidth = 2
  Signature1.style.borderStyle = "solid"
End Sub

Best Regards,



I edited your post by adding ``` before and after. It formats the text as code, making it easier to read.