I am trying to convert bytes to pdf in xamarin android application using c#.
In which bytes are coming from webservice. I am using simple webservice(asmx) for bringing data.
appLoginService = new EgrasAndroid.AppLoginService();
byte[] grnbytedata= appLoginService.GetGRNPdf(UserId.ToString(), GRN.ToString());
string directory = Path.Combine(Android.OS.Environment.ExternalStorageDirectory.AbsolutePath, Android.OS.Environment.DirectoryDownloads);
string file = Path.Combine(directory, "temp.pdf");
System.IO.File.WriteAllBytes(file, grnbytedata);
I have searched for many solution but they mostly work for web application or java application.
Its not showing any error. I am running this on emulator but there is file shown in downloads folder. while it is taking the path "/storage/sdcard/Download" to download the file.
There is 200mb blank space, i have taken for sdcard in emulator.
WriteAllBytes? Any errors? Did you try to debug it? Doesgrnbytedatacontains any value? It is a little bit unclear what you're asking. Please add more details