Search Unity

Saving Files on Blackberry

Discussion in 'BlackBerry' started by Grespon, Mar 8, 2014.

  1. Grespon

    Grespon

    Joined:
    Apr 13, 2012
    Posts:
    388
    Hi, I'm trying to save a camera image on a Z10.

    I'm using:

    savePath = Application.persistentDataPath;

    and then

    System.IO.File.WriteAllBytes(savePath + "/photos/test" + ".png", screenshot.EncodeToPNG());


    But i get the exception:
    System.IO.IsolatedStorageException: could not find a part of te path "/accounts/1000/appdata/com_Company.ProductName.testDev_ProductName546/fc/data/camera/test.png


    Any thoughts ??
     
  2. Grespon

    Grespon

    Joined:
    Apr 13, 2012
    Posts:
    388
    Solved.
    Not sure if this is the best method but anyway, I found this information at blackberry site:
    $bb10_filesystem.png

    and noticed the path was including the data folder, which i don't want.

    so i changed savePath to:
    savePath = Directory.GetParent(savePath).ToString();

    and then accessed shared folder:

    System.IO.File.WriteAllBytes(savePath + "/shared/camera/test" + ".png", snap.EncodeToPNG());
     
    Last edited: Mar 8, 2014