We are unable to attach an image file to the geodatabase on ArcGIS Runtime SDK for .NET v100(Xamarin). I am sending the code we have worked.
FeatureQueryResult qfr = await gft.QueryFeaturesAsync(queryParams);
Feature onerecord = qfr.FirstOrDefault();
ArcGISFeature a = onerecord as ArcGISFeature;
if (a.CanEditAttachments)
{
Debug.WriteLine("true");
}
Byte[] b1;
using (var memoryStream = new MemoryStream())
{
file.GetStream().CopyTo(memoryStream);
file.Dispose();
b1 = memoryStream.ToArray();
}
await a.AddAttachmentAsync(filename, @"image/", b1);
Please see the attached image for the details