Skip to navigation

How to cache an existing unsigned envelope to use offline

View as Markdown

This topic demonstrates how to cache (download) an unsigned envelope to use offline. An envelope can only be downloaded on your mobile device if it has a status of sent or delivered, and the account used for authentication has been either:

Note: Any previously cached version of an envelope with the same envelope ID will be removed, and any progress for completed signers will be lost.

Required data

Running the code in this how-to requires this data:

Data elementDescription
{ENVELOPE_ID}A GUID value that identifies a Docusign envelope. This value is automatically generated by Docusign when the envelope is created.

Step 1. Log in to Docusign

To make the API call shown in this how-to, you must be logged in to Docusign.

See How to log in to Docusign from your app for details.

Step 2. Cache an envelope

Use the method shown to cache an envelope. Make sure to substitute {ENVELOPE_ID} with the envelope ID of an unsigned envelope that has tabs associated with your account.

DSEnvelopeDelegate envelopeDelegate = DocuSign.getInstance().getEnvelopeDelegate();
envelopeDelegate.cacheEnvelope("{ENVELOPE_ID}",
new DSCacheEnvelopeListener() {
@Override
public void onStart() {
Log.d("cacheEnvelope", "cacheEnvelope start");
}
@Override
public void onComplete(DSEnvelope envelope) {
Log.d("cacheEnvelope", "envelope ID: " + envelope.getEnvelopeId() + "successfully cached");
}
@Override
public void onError(DSEnvelopeException exception) {
Log.e("cacheEnvelope", exception.getLocalizedMessage());
}
}
);

Expected response

The onComplete method in the listener defined in Step 2 should be triggered.

Next steps