Integrating Core Module for Android SDK(Legacy)
If you still have questions or prefer to get help directly from an agent, please submit a request.
We’ll get back to you as soon as possible.
- Getting Started
- IVA Building Guides
- Conversation Design
- Developer Guides
- Agent Setup
- Analytics & Reporting
- Tips & Tricks
Sign Up Flow: At a glance
Below is the flow chart which shows what flow MUST be followed on app start and before showing inbox view
The following Activity needs to be added to your Manifest. Adding a parent will make sure that the UP button in ChatActivity will take the user to the correct activity. If you implement an Activity that will host the InboxView then that would be the ideal candidate to be the parent of ChatActivity.
<application> . . . <activity android:name="ai.haptik.android.sdk.messaging.ChatActivity" android:parentActivityName="ENTER THE ACTIVITY YOU WANT AS THE PARENT HERE"> <meta-data android:name="ai.haptik.android.sdk.messaging.backAsUp" android:value="true"/> </activity> . . . </application>
The meta-data tag which is part of the ChatActivity is used to define the behavior of the back button when the user is in the ChatActivity. There are two possible behaviors that can be assigned to the back button:
- The back button will behave the same way as the up button
- The back button will follow the default Android behavior of a back button.
For the first option, the value field needs to be set to true and for the second option, it needs to be set to false. In case you don’t add this meta-data tag the value is set to true.
All offline behavior will be handled by the Haptik SDK, such as Message Delivery, QoS(Quality of Service) and MQTT Reconnection etc.
The AnalyticsCallback class has various methods which get triggered on various scenarios.
One important method is
logEvent(String, Map<String, Object>). This method gets called on every analytics event which gets triggered from SDK.
// Using this method, you can send a message from the user side programmatically without even going into messaging UI.
sendMessage(String message, String businessViaName)