Skip to content

Instantly share code, notes, and snippets.

@Ziiweb
Created October 19, 2015 15:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Ziiweb/ae8aa0bab38a0c5f2c09 to your computer and use it in GitHub Desktop.
Save Ziiweb/ae8aa0bab38a0c5f2c09 to your computer and use it in GitHub Desktop.
File aux = context.getFilesDir();
String filename = "/myfile";
String string = "Hello world!";
FileOutputStream outputStream;
try {
File ins = new File(context.getFilesDir(), "INSTALLATION");
FileOutputStream out = new FileOutputStream(ins);
out.write(string.toString().getBytes());
out.close();
} catch (Exception e) {
e.printStackTrace();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment