Blog
Home/

Docusign Android SDK: FAQ

Author Naveen Tulseela
Naveen TulseelaLead Software Engineer
Summary5 min read

Get answers to frequently asked questions about the Docusign Android SDK.

    • Additional resources

    Table of contents

    Here are some of the most frequently asked questions about the Docusign Android SDK. For more information, see the Android SDK README or Developer Support.

    1. Why am I getting an “Invalid access token” error?

      When you generate an access token with your JSON Web Token (JWT), the access token has a lifetime of one hour. If you invoke any of the SDK methods used for signing after the token expires, the SDK returns the “Invalid access token” exception.

      When using the login() method, make sure that you pass the token value for the expiresIn attribute. After the new access token is generated via the JSON Web Token (JWT Grant) flow, the token expiry value should be passed in the SDK’s login() method.

      To be safe, use the SDK's authenticationDelegate.isSessionActive() method to test if the access token is expired or valid. If the token expires, fetch a new access token from your back end and invoke the SDK's login() method with new accessToken and expiresIn values.

    2. How can I hide or bypass the host signing screen at the beginning of the signing session?

      If your app does not need to display the recipients and signing order before hosting, then invoke the following SDK method to hide the host signing screen. This method is only effective if envelope defaults are provided in the signing methods.

      val customSettings = DSCustomSettings.Builder()
                          .setDisplayTemplateRecipientsScreen(false)
                          .build()
      Docusign.getInstance().getCustomSettingsDelegate().customSettings = customSettings
      
    3. We don’t want our users sharing the organization’s Docusign credentials to use the integration. What are our authentication options? 

      To avoid implicit login or authentication, use an access token for login instead:

      // accessToken - Access token that authenticates the user
      // refreshToken - If the access token can be refreshed, the refresh token. Optional
      // expiresIn - The number of seconds from the time the access token was provisioned to when it will expire
      DSAuthenticationDelegate docusignAuthDelegate = Docusign.getInstance().getAuthenticationDelegate();
      docusignAuthDelegate.login(accessToken,
              refreshToken,
              expiresIn,
              context,
              new DSAuthenticationListener() {
                  @Override
                  public void onSuccess(@NonNull DSUser user) { }
      
                  @Override
                  public void onError(@NonNull DSAuthenticationException exception) { }
              });
      

      Obtain the access token using one the following:

      The JWT Grant authentication flow requires server support. Once the server authenticates and successfully fetches the access token, pass that access token and the expiration time to your app, which in turn will invoke the login() method referenced above.

    4. Why am I getting a “File not found at specified URI” error while building an envelope using DSEnvelope.Builder?

      While creating the envelope using the Android SDK’s DSEnvelope.Builder class, make sure to convert the file to a URI as mentioned below.

      File file = new File(Environment.getExternalStorageDirectory(), <filepath>);
      URI fileURI = file.toURI();</filepath>
      

      When using the DSEnvelope.Builder class, you can set the URI of the document as follows:

      .uri(fileURI.toString());
      
    5. How much free space does my device need to cache a template using the Android SDK?

      The device needs to have at least roughly 1GB free space to cache a template, depending on document size and the number of fields.

    6. Can I programmatically configure read-only tabs to a template with the Android SDK?

      You can only set the Read Only property for the tab in a template from the Docusign web portal. From the web, when you place the tab on the document, you will find the tab’s properties on the right side of the UI. There you can select the Read Only property for that tab.

      If you prefill tab labels and values when converting the template to an envelope, these fields become read-only during signing. In the DSEnvelopeDefaults class’s tabValueDefaults parameter, you can provide the tab label and the value.

    7. Why did my envelope fail to sync to my sandbox after signing offline?

      Check which environment your app is pointing to.

    8. Why did my security questions fail to show up before the signing session?

      Security questions are only compatible with online signing (embedded web signing) with Docusign Android SDK before launching the signing session.

      Also, you’ll want to double-check your envelope settings. When sending an envelope from the Docusign web portal, review the envelope setting In Person ID Check Question.

    9. Why is the UseTemplateOnline method returning the “No template found” error?

      This error indicates that the referenced template is not available. You need to cache the template before invoking the UseTemplateOnline method. You can cache the template using the cacheTemplate method.

    10. Is there any complete code example that shows how to implement document signing using an embedded signing ceremony and DSEnvelopeDefaults?

    1. 11. Is there a SDK version that does not depend on AndroidX?

    1. Why am I getting the error “Only role name allowed for in-person recipients” when using the SDK's useTemplateOnline() method?

    1. When minifyEnabled is set to “true” in Proguard, why can’t I launch the signing session (useTemplateOnline() SDK method)?

    android {
      buildTypes {
        release {
          ...
          proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'),
          'proguard-rules.pro'
        }
      }
    }
    
    1. When using a template, I prefilled the text field values using DSEnvelopeDefaults. Why are the values not showing up in the app during the signing session?

    1. How do I remove the Mobile friendly toggle button displayed in the online signing session?

    1. Can I disable the Mobile friendly toggle button displayed in the online signing session for a specific template?

    1. Does the Android SDK support password-protected PDFs when creating envelopes for signing?

    1. Why am I getting the error “Unable to authenticate using provided access token” when using the SDK’s login() method with an access token?

    Docusign.getInstance().setEnvironment(DSEnvironment.DEMO_ENVIRONMENT);
    
    1. Why am I getting the error “Template Caching is not supported for ” when caching a template using the SDK’s cacheTemplate() method?

    1. Why am I getting the “Mobile signing disabled” error when caching a template using the SDK’s cacheTemplate() method?

    1. Why am I getting the “User Account does not allow offline usage” error when caching a template using SDK cacheTemplate() method?

    1. Why am I getting the “Recipient Offline Signing is disabled” error when caching a template using the SDK’s cacheTemplate() method?

    Additional resources

    Author Naveen Tulseela
    Naveen TulseelaLead Software Engineer

    Naveen is a highly experienced mobile application engineer and software architect who's worked on Android, iOS, and other mobile platforms.

    More posts from this author

    Related posts

    • Streamline End-to-End Agreement Management with Docusign: A Developer Overview
      Developers

      Streamline End-to-End Agreement Management with Docusign: A Developer Overview

      Author Larry Jin
      Larry Jin
    • Fast-Track Your Extension Apps with Reference Implementations

      Fast-Track Your Extension Apps with Reference Implementations

      Author Karissa Jacobsen
      Karissa Jacobsen
    Streamline End-to-End Agreement Management with Docusign: A Developer Overview

    Streamline End-to-End Agreement Management with Docusign: A Developer Overview

    Author Larry Jin
    Larry Jin
    Fast-Track Your Extension Apps with Reference Implementations

    Fast-Track Your Extension Apps with Reference Implementations

    Author Karissa Jacobsen
    Karissa Jacobsen

    Discover what's new with Docusign IAM or start with eSignature for free

    Explore Docusign IAMTry eSignature for Free
    Person smiling while presenting