title: android bufferedwriter - can't find the text file
body: <p>I'm new to programming (just learned Java several months ago) and usually found a lot of help online by searching through here, but this time I'm pretty stumped. </p>
  
  <p>I'm attempting to save sensor data on my Android phone to a text file in the storage, and pulling the text file out later using the usb cord. However, after I run the app on the phone, I can't seem to find it in the folders in Internal Storage. </p>
  
  <p>I did include this line in my manifest to rule out the issue of permissions. </p>
  
  <pre><code>    &lt;uses-permission 
      android:name="android.permission.WRITE_EXTERNAL_STORAGE" /&gt;
  </code></pre>
  
  <p>The boolean save_data is triggered when I press a button on the screen and I verified that the button is working by displaying on/off on my screen when the button is pressed. </p>
  
  <pre><code>public void onSensorChanged(SensorEvent event) {
  synchronized (this) {
      switch (event.sensor.getType()) {
      case Sensor.TYPE_ACCELEROMETER: 
          A_x_value.setText(Float.toString(event.values[0]));
          A_y_value.setText(Float.toString(event.values[1]));
          A_z_value.setText(Float.toString(event.values[2]));
  
          if (save_data == true) {
              SaveButton_Label.setText("On");
  
              String datastring = "A: " + Float.toString(event.values[0]) + " " + Float.toString(event.values[1]) + " " + Float.toString(event.values[2]);
              try
              {
                  File f = new File("sensordata.txt");
                  FileWriter fr = new FileWriter(f);
                  BufferedWriter out = new BufferedWriter(fr);
                  out.write(datastring);
                  out.close();
              }
  
              catch (IOException e)
              {
                  System.out.println("Exception");
              }
  
          } else {
              SaveButton_Label.setText("Off");
          }
          break;
      }
  }
  </code></pre>
  
  <p>}</p>
  
  <p>I appreciate any help you guys can provide. Thanks!</p>