Skip to content

Commit

Permalink
add "how to" text into proof zip file
Browse files Browse the repository at this point in the history
  • Loading branch information
n8fr8 committed Feb 5, 2022
1 parent 284a3c9 commit 5da19d3
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions app/src/main/java/org/witness/proofmode/ShareProofActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import android.content.pm.LabeledIntent;
import android.content.pm.PackageManager;
import android.content.pm.ResolveInfo;
import android.content.res.AssetManager;
import android.database.Cursor;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
Expand Down Expand Up @@ -901,6 +902,17 @@ public void zipProof(ArrayList<Uri> uris, File fileZip) {
out.putNextEntry(entry);
out.write(pubKey.getBytes());

String howToFile = "HowToVerifyProofData.txt";
entry = new ZipEntry(howToFile);
out.putNextEntry(entry);
InputStream is = getResources().getAssets().open(howToFile);
byte[] buffer = new byte[1024];
for (int length = is.read(buffer); length != -1; length = is.read(buffer)) {
out.write(buffer, 0, length);
}
is.close();


out.close();
} catch (Exception e) {
e.printStackTrace();
Expand Down

0 comments on commit 5da19d3

Please sign in to comment.