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


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("");
		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);

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!