Android SDK development
Zoho Sign SDK is a kit that enables users to instantly send their documents to sign or allow the user to sign the document from their application.
Compatibility
Operation System - Android 21 (Lollipop) and above.
Scopes
The following scopes need to be added while initializing Android SSO Library.
"ZohoSign.documents.ALL",
"ZohoSign.account.ALL",
"ZohoSign.setup.ALL",
"ZohoSign.templates.ALL"
Configure SDK in your project
Add the below repository in your project level settings.gradle.
Add the below dependency in your app level build.gradle.
Implementation
The SDK has to be initialized before its methods are accessed by the client, so initialize the SDK in your Application class. When initializing the SDK, it is mandatory to pass the scopeName and SignSDKClientCallback listener as parameters.
Parameter description
scopeName: String (Optional) - Scope name is the unique identifier for your application and it empowers the SDK to identify and enable specific API's particular to the client.
callback:SignSDKClientCallback - This listener contains the basic callback methods to get the necessary data from the client application to make the SDK to serve it's purpose.
Callback methods:
requireAuthToken(accessTokenCallback: SignSDKAccessTokenCallback) - Implement the business logic to set the auth token using accessToken.onSuccess ("your_auth_token_here") method or handle failure case using accessToken.onFailure ("failure_message_here") .
setNonFatalException(throwable: Throwable, message: String) - Handle the hardware / device specific exceptions.
forceLogout(errorMessage: String, errorCode: Int) - Invoked when the app is forced to logout.
requireUserProfileImage(): Bitmap - Implement the business logic to return the profile image of the user.
Sign SDK configurations
serviceUrl: String - This property customizes the service url to communicate with the server.
guestServiceUrl: String - This property customizes the guest service url to communicate with the server. This is used in the signing process.
Themes
Override the following style in the below mentioned files.(Optional)
Style customization
Override the following attributes in the below mentioned files for style customization.
For customizing the toolbar color.
For customizing the toolbar title text color
For customizing the toolbar icons color
API Functions
Get Current User Details
Parameter description
callback - listener for network request status.
DomainUser - Data class for wrapping user properties.
Get User Profile Details
Parameter description
callback - listener for network request status.
DomainUserProfile - Data class for wrapping user profile properties.
Upload Document
Parameter description
multipartBodyFile: MultipartBody.Part - Pass the uploading document in multipart-body-part type.
password: String - Needed in case of password protected files.
callback: SignSDKResponseCallback<DomainUploadedDocument> - listener for network request status.
DomainUploadedDocument - Data class for wrapping uploaded document properties.
Create Self Sign Request
Parameter description
uploadedDocumentList: List<DomainUploadedDocument> - uploaded document List.
requestName: String - Self sign request name.
callback: SignSDKResponseCallback<DomainDocumentDetails> - listener for network request status.
DomainUploadedDocument - Data class for wrapping uploaded document properties.
DomainDocumentDetails - Data class for wrapping document properties.
Download Document as Pdf
Parameter description
requestId: String - unique identifier of the request.
documentId: String - unique identifier of the downloading document.
clientListener: SignSDKDocumentDownloaderListener - Interface containing callback method for updating download progress in percentage.
callback: SignSDKResponseCallback<ResponseBody> - listener for network request status.
Show full
Show less
Download Document as Zip
Parameter description
requestId: String - unique identifier of the request.
documentId: String - unique identifier of the downloading document.
clientListener: SignSDKDocumentDownloaderListener - Interface containing callback method for updating download progress in percentage.
callback: SignSDKResponseCallback<ResponseBody> - listener for network request status.
Show full
Show less
Create Sign Account
Parameter description
organizationName: String - organization name for your account.
callback: SignSDKResponseCallback - listener for network request status.