Downloading files from wepage and saving on android ,Download from webpage, and open it on android

Hello,

I would like to have option like that:

Someone who click button “download image”: then program will download image, and will open image not in Unity, by in your local program to images.

I have code like that:

	private IEnumerator TestDownload()
	{
		WWW www = new WWW("https://www.szerokikadr.pl/public/repozytorium/poradnik/201211/3/160_732388c2.jpg");
		yield return www;

		while (!www.isDone) {

			Debug.Log( www.progress ) ;
			yield return null;
		}

	
		string savePath = Application.persistentDataPath + "/picture.jpg";

		byte[] bytes = www.bytes;

		File.WriteAllBytes(savePath, bytes);
		Application.OpenURL(savePath);
}

But it shows me that this file doesn’t exist.

I would be really grateful if someone could help me : )
Thank you in advice, and have a nice day.

Ok I solve this by:

File → Build Settings ->Player Settings

Inspector → Other Settings → Configuration → Write Access ->External( sdcard)

now it’s seems to work : )

if run android then www.progress don’t working!