So, I'm stuck with smth on my code. I'm trying to create a Share button inside my App to share some images to other Apps.
A friend from work shared with me the same code he uses, he get the bytearray of a image and pass it to a DependencyService, but he already has his images in ByteArray, in my case, my images are all stored inside Resources/drawable folder.
What we tried to do but couldn't was to get an image from drawable folder and convert it to ByteArray.
private void ShareImage(object sender, EventArgs e)
{
//Convert img to ByteArray
//ShareWindow
DependencyService.Get<IShare>().Share("", "", buffer);
}
For example, how would I convert an image called "MyImage1.png" that's inside "Resources/drawable" (on both Android and iOS projects) to ByteArray? Looks like it's the only thing missing for this button to work.
Thank you!