Stream to Byte[] issue on Android - Xam forms

I am writing a Xam Forms app that captures a users signature and then sends it back to a webservice as a byte array to display on a website. I have implemented it using Signature Pad; in the iOS version everything works fine and with the following code I am able to convert the Stream to a Byte array:

var sig = await padView.GetImageStreamAsync(SignaturePad.Forms.SignatureImageFormat.Png);
byte[] data = null;
BinaryReader br = new BinaryReader(sig);
data = br.ReadBytes((int)sig.Length);

Now I have come to creating an Android version of the app and the exact same piece of code I keep ending up with a zero Byte Array. I have tried different approaches with the same result. Is there something different that I should consider on the Android platform that is causing problems when converting a Stream to Byte Array?

Thanks

Best Answer

Answers

  • RichardLeonardRichardLeonard GBMember ✭✭

    Sorry was meant to post in the Xamarin.Forms group and can't figure out how to move it now

Sign In or Register to comment.