New libProofMode-Android Sample Project available

15 December 2022

A new sample project for the Android libProofMode library has been posted.

This sample shows how to generate and share proof generated by the libProofMode Android library from There is a simple Kotlin-based Android project with a floating button used for selecting a photo, and then a second button for sharing the generated proof as a zip file.

Add Dependencies

Add the Guardian Project Maven repo hosted on Github

maven { url "" }

Add the dependency libraries

    //add the libProofMode library
	implementation 'org.witness:android-libproofmode:1.0.18'

    //add Google SafetyNet
  implementation ''
    implementation ''

    //add Timber logging
    implementation 'com.jakewharton.timber:timber:5.0.1'

    //add OpenTimestamps
    implementation('com.eternitywall:java-opentimestamps:1.20') {
        exclude group: 'org.bitcoinj'
        exclude group: ''
        exclude group: 'org.slf4j'
        exclude group: 'net.jcip'
        exclude group: 'commons-cli'
        exclude group: 'org.json'
        exclude group: 'com.sun.xml'
        exclude group: 'org.glassfish.jaxb'

    //add BouncyCastle crypto libs
    implementation 'org.bouncycastle:bcpkix-jdk15to18:1.72'
    implementation 'org.bouncycastle:bcprov-jdk15to18:1.72'
    implementation 'org.bouncycastle:bcpg-jdk15to18:1.71'

Sample Code

ProofMode requires one simple call for generating proof - just the Uri of the media. All proof is stored in internal app storage, in a folder using the generated sha256 hash value.

//generate proof for a URI
var proofHash = ProofMode.generateProof(this,uriMedia)

//get the folder that proof is stored
var proofDir = ProofMode.getProofDir(this, proofHash)


If you want to include all Proofmode values, you’ll need to add and request additional permissions to your app

    tools:remove="android:maxSdkVersion" />
    tools:remove="android:maxSdkVersion" />

    tools:remove="android:maxSdkVersion" />

    tools:remove="android:maxSdkVersion" />