I am trying to download new updated apk from my website if available and then install it using Unity to override my already installed game.
I can download apk in memory card of user using following code .
private IEnumerator TestDownload()
{
WWW www = new WWW("http://192.168.1.6/file_drop/app.apk");
//yield return www;
while (!www.isDone) {
progress = "downloaded " + (www.progress*100).ToString() + "%...";
yield return null;
}
string fullPath = Application.persistentDataPath + "/app.apk";
File.WriteAllBytes (fullPath, www.bytes);
...
}
Now is there anyway to run this downloaded file form unity script so it start installing
?