Guest User

Untitled

a guest
Nov 18th, 2017
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. private void saveFile(String fileName) {
  2. try {
  3. OutputStream outputStream = openFileOutput(Environment.getExternalStorageDirectory().getPath()+"/"+FILENAME, 0);
  4. OutputStreamWriter osw = new OutputStreamWriter(outputStream);
  5. osw.write(mEditText.getText().toString());
  6. osw.close();
  7. } catch (Throwable t) {
  8. Toast.makeText(getApplicationContext(),
  9. "Exception: " + t.toString(), Toast.LENGTH_LONG).show();
  10. }
  11. }
Add Comment
Please, Sign In to add comment