title: Unity3D, Android Apk not seeing file in Application.persistantDatapath
body: <p>How do you save your class data in unity?</p>
  
  <p>I have an application that uses some save and load file and they are serialized. I gave the path as <code>Application.persistandDataPath</code> in unity c# script to save and load some data back. This Works in unity editör but not in android devices.</p>
  
  <p>I also changed "<strong>ProjectSettings -> Other Settings -> Write Permission</strong>" from <strong>internal</strong> to <strong>external SD card</strong>. But nothing changed.</p>
  
  <p>My app not saving or loading data in android. Even, android asks me for permission to write data on device, but nothing changes..</p>
  
  <p>Anyone has the same problem? I need a help I am stuck with my Project. Or Is there a better way to save a file or a class that is crypted and works on android devices? (I dont know it may be like using json file but it is crypted etc.)</p>
  
  <p>P.S.: When I open the folder in Windows for <code>Application.persistandDataPath</code> I see the file is created successfully and I see <strong>somedata.dat</strong> file there exists.</p>
  
  <p>Code Sample of the Project:</p>
  
  <blockquote>
    <p>SAVE METHOD:</p>
  </blockquote>
  
  <pre><code>public void Save()
  {
      FileStream file = null;
      string path = Application.persistentDataPath + "/" + "GameFile.dat";
  
      try
      {
          BinaryFormatter bf = new BinaryFormatter();
          file = File.Create(path);
  
          if (fileData != null)
          {
              fileData.SetHighscore(highScore);            
              fileData.SetIsGameStartedFirstTime(isGameStartedFirstTime);        
              fileData.IsMusicOn(isMusicOn);           
  
              bf.Serialize(file, fileData);
          }
      }
      catch (Exception e)
      {
      }
      finally
      {
          if (file != null)
          {
              file.Close();
          }
      }
  }
  </code></pre>
  
  <blockquote>
    <p>LOAD METHOD:</p>
  </blockquote>
  
  <pre><code>public void Load()
  {
      FileStream file = null;
      string path = Application.persistentDataPath + "/" + "GameFile.dat";
  
      try
      {
          BinaryFormatter bf = new BinaryFormatter();
  
          file = File.Open(path, FileMode.Open);
          fileData= (GameFile)bf.Deserialize(file);
      }
      catch (Exception e)
      {
      }
      finally
      {
          if (file != null)
          {
              file.Close();
          }
      }
  }
  </code></pre>
  
  <blockquote>
    <p>GameFile Data Class Sample</p>
  </blockquote>
  
  <pre><code>class GameFile
  {
      private bool isGameStartedFirstTime;   
      private int highScore;
      private bool isMusicOn;
  
      // Also setters and getters here..
  }
  </code></pre>
  
  <p><strong>Edit:</strong> there have been a suggestion to use "<strong>Path.Combine(Application.persistentDataPath , "GameFile.dat");</strong>" instead of my code. 
  I applied it. Now, if I play the game and close it temporarily by pressing to middle button on android devices and open back the game it works. But Works temporarily as I said before. Because if I close the game completely by removing it from RAM (by pressing the left button and crearing apps in android devices), it is not working again and not remembering my saved data. I guess we are on a progress but still could not reach to the solution. Also I both tried this solution for the "<strong>ProjectSettings -> Other Settings -> Write Permission</strong>", I tried it for  <strong>internal</strong> or <strong>external SD card</strong> nothing changed.</p>