I'm trying to receive and install the new version of apk file using TCP Client. Apk file is received and saved to external storage successfully. But, as I try to install it, it gives me the error 'There was a problem parsing the package'. Normally, if I send apk file through bluetooth, it successfully saves and installs the package without any problem. Am I making a mistake while using FileStream? Or do I have to do some more things after saving the apk file? Code for saving file is as follows;
using (FileStream fStream = new FileStream(this.FILENAME, FileMode.Create))
{
fStream.Write(this.FILEBUFFER, 0, this.FILEBUFFER.Length);
fStream.Flush();
fStream.Close();
}
Your experiences are highly appreciated...