title: How to write to a textfile in one Activity & read that file in another Activity?
body: <p>I am able to write and then read a text file in the SAME activity, but I am unable to read a text file after writing to it from another Activity. </p>
  
  <p><strong><em>Ex:</em></strong> <strong>Activity A</strong> creates and writes to a text file. <strong>Activity B</strong> reads that text file.</p>
  
  <p>I use this code to write to the text file in <strong>Activity A</strong>:</p>
  
  <pre><code>FileOutputStream fos = null;
          OutputStreamWriter osw = null;
          try 
          {
              fos = openFileOutput("user_info.txt", Context.MODE_WORLD_WRITEABLE);
              osw = new OutputStreamWriter(fos);
              osw.write("text here");
              osw.close();
              fos.close();
          } 
          catch (FileNotFoundException e) 
          {
              // TODO Auto-generated catch block
              e.printStackTrace();
          } catch (IOException e) {
              // TODO Auto-generated catch block
              e.printStackTrace();
          }
  </code></pre>
  
  <p>And then I use this code to try and read the same text file created by <strong>Activity A</strong>, but I get a <code>FileNotFoundException</code>:</p>
  
  <pre><code>            try 
              {
                  FileInputStream fis = openFileInput("user_info.txt");
                  InputStreamReader isr = new InputStreamReader(fis);
                  BufferedReader buff = new BufferedReader(isr);
                  String line;
                  while((line = buff.readLine()) != null)
                  {
  
                      Toast.makeText(this, line, Toast.LENGTH_LONG).show();
                  }
              } 
              catch (FileNotFoundException e) 
              {
                  // TODO Auto-generated catch block
                  e.printStackTrace();
              } 
              catch (IOException e) 
              {
                  // TODO Auto-generated catch block
                  e.printStackTrace();
              }
  </code></pre>
  
  <p>Does anyone know why I am getting the <code>FileNotFoundException</code>? </p>
  
  <p>Is it a path issue?</p>