Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.