How do I use a class that was created in the project Droid
in PCL
?
I've created a new class that will save the image to a folder in the project,
but I need to call this class in PCL
.
My class:
namespace PCI.APP.Droid
{
public class SalvarFoto
{
public bool SalvarFotoPasta(string Imagem, string ImgNome)
{
try
{
String caminho = ConfigurationManager.AppSettings["ImageUsers"];
if (!System.IO.Directory.Exists(caminho))
{
System.IO.Directory.CreateDirectory(caminho);
}
string imagemNome = ImgNome + ".png";
string imgPasta = Path.Combine(caminho, imagemNome);
byte[] imageBytes = Convert.FromBase64String(Imagem);
File.WriteAllBytes(imgPasta, imageBytes);
return true;
}
catch (Exception ex)
{
throw ex;
}
}
}
}