Hi,
I was just dabbling with the Signature Pad, to have it implemented in a PCL project. That uses Xamarin forms,
Here is what I did so far:
- I installed a nuget package Acr.XamForms.Signature Pad in mt shared project.
- I installed Signature pad nuget in my Droid project.
I installed Signature Pad nuget in my iOs project.
In my shared project. I did the following:
XAML View:
In the code behind this is what is present:-
public partial class Page_SignaturePad : ContentPage
{
public Page_SignaturePad()
{
InitializeComponent();
}
//Capture the user's signature.
async void OnSaveSignature(object sender, EventArgs e)
{
try
{
var signature = padView.GetImage(Acr.XamForms.SignaturePad.ImageFormatType.Png);
using (BinaryReader br = new BinaryReader(signature))
{
var result = br.ReadBytes((int)signature.Length);
}
}
catch(Exception ex)
{
Helper_ErrorHandling.SendErrorToServer(ex);
}
}
}
It works well on iOS. However on Android when i try to build the project i get the following error: (attached screenshot)
Has anyone encountered and solved a similar issue.
I am on Xam forms 1.5.6417 . I believe that is what Signature pad needs