Acquire APIs

Chat APIs:

Start chat module directly by calling startSupportChat();


This method is used to open chat. To use this method AcquireApp instance is needed. So use this method after successful initialization.

Alternate Method : startSupportChat(AQR_BaseActivity aqrBaseActivity, CallType callType):

AcquireApp.getInstance().startSupportChat(MainActivity.this, CallType.VIDEO);
  • @param aqrBaseActivity - Your Activity which is extended to AQR_BaseActivity

  • @param callType - TEXT, AUDIO, VIDEO

Use this method to start direct Audio/Video call request to agent. By this method , Audio/Video chat request will be visible to the agent and on answer to that chat will start Audio/Video call as soon as chat is connected.

setShowDefaultFAB :

Use this method to show default FAB icon when SDK is connected. By calling below method before initialization.


Verify your users:

Make sure your users are who they claim to be with identity verification. Enforce identity verification to prevent other from pretend to be (third party) for entertainment or fraud logged-in users.

Generate an HMAC with SHA256 whenever a user logs into your app. Most web frameworks will have a method or library to help you do this. You'll need your app’s secret key and the email of the currently logged-in user.

Secret Key


For example, in Ruby on Rails we can generate our HMAC using a method called OpenSSL::HMAC.hexdigest, where the first parameter is the name of a hash function (we use SHA256), the second is your secret key, and the third is your user’s email.

'sha256', # hash function
'<YOUR_SECRET_KEY>', # secret key (keep safe!) # user's email address

Keep your secret key safe! Never commit it directly to your repository, client-side code, or anywhere a third party can find it.

To set up identity verification, you'll need to generate an HMAC on your server for each logged-in user and set in acquireIO SDK.

setVisitorHash must be called before init() takes place and must pass same email in setVisitorDetail().


First, you need to add email id in setVisitorDetail() method in SDK for uniquely identify your users. Note that if you set only visitor hash and email is not set then acquire can't identify visitor. So you need both method to verify visitor hash.


If you required to start direct thread call below method with your thread ID and message. To use this method AcquireApp instance is needed. So use this method after successful initialization.

AcquireApp.getInstance().startThread([STRING_THREADID], [STRING_MESSAGE]);

Get Visitor ID using method:


Logout visitor

If you have set visitor hash (HMAC digest) and visitor just logged out from account and need to manage user integrity with agent, call method logOut(MutableLiveData loggedOut) to remove all acquire data from your app related to visitorHash use method :

AcquireApp.logOut(MutableLiveData loggedOut);

Pass null instead of MutableLiveData if you do not required a callback.

This method will reset visitor’s all data and stops all connections to the agent including ongoing call.

Caution: Please take a note that all methods of the sdk will stop working after logout so resulting in crash on some method calls. You need to re-initialize the sdk to start again.

User APIs:

Set visitor hash

setVisitorHash( String visitorHash )

Pass visitorHash as per account configuration. Keep it secure. Please use this method before any initialization process of the sdk. Otherwise it will not affect.

Set user details

Set your user details as per your need

You can customize visitor’s identification by calling our sdk’s method setVisitorDetail.

Method Description : setVisitorDetail(String name, String email, String phone, JSONObject fields):

  • @param name - the name you want to display for the visitor

  • @param email - the email you want to display for the visitor

  • @param phone - the phone you want to display for the visitor

  • @param fields - pass the extra fields within a JSONObject e.g.

JSONObject jsonObject = new JSONObject();
try {
jsonObject.put([name] : "sample", [value] :"sucess");
} catch (JSONException e) {
Use the field_key to pass in the JSONObject.

Note: Use this method before initialization of sdk otherwise wont work.

endCoBrowseSession :

This method is used to disconnect co-browse session if running. Call this method using current AcquireApp instance :


Show Floating Video (PIP mode):

Show Floating Video (PIP mode) everywhere in your app when audio/video call is active.

setMainVideoFrameSize(width, height):

Use this method to change the default size of the main video window size.

setSecondaryVideoFrameSize(width, height)

Use this method to change the default size of the secondary video window size.

Get unread messages count :

Get unread messages count anywhere in your app (Optional)

You can get unread messages count by implementing this interface UnreadMessageCount (Full Identifier : com.acquireio.callbacks.UnreadMessageCount).

Method Description : setUnreadCountListner(target-activity):


@param target-activity - Pass the activity/fragment where you want to have unread messages count. Update Text or Badge count as per needed.

Note: Remember to use runOnUiThread() while updating UI.

Upload files directly to the acquire server

AcquireApp.getInstance().uploadFileToAcquire(Activity context, String filePath, UploadFileListener uploadFileListener);

In this method pass the activity context , file path and listener for success and failure callbacks.

This method will upload file to our server directly.