Skip to content

Instantly share code, notes, and snippets.

@freken-droid
Created October 15, 2019 13:27
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 freken-droid/6967944969bbeee3dceca34a965a4b25 to your computer and use it in GitHub Desktop.
Save freken-droid/6967944969bbeee3dceca34a965a4b25 to your computer and use it in GitHub Desktop.
private void saveFileToDownloads(byte[] data) {
File signfile = new File(Environment.getExternalStorageDirectory(), "signature.sig");
if (signfile.exists()) {
signfile.delete();
}
try {
FileOutputStream fos = new FileOutputStream(signfile.getPath());
fos.write(data);
fos.close();
} catch (java.io.IOException e) {
e.getMessage();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment