Enabling Android SDK and Setting Up Related Credentials
- Getting Started
- Bot Building
- Smart Agent Chat
- Conversation Design
-
Developer Guides
Code Step Integration Static Step Integration Shopify Integration SETU Integration Exotel Integration CIBIL integration Freshdesk KMS Integration PayU Integration Zendesk Guide Integration Twilio Integration Razorpay Integration LeadSquared Integration USU(Unymira) Integration Helo(VivaConnect) Integration Salesforce KMS Integration Stripe Integration PayPal Integration CleverTap Integration Fynd Integration HubSpot Integration Magento Integration WooCommerce Integration Microsoft Dynamics 365 Integration
- Deployment
- External Agent Tool Setup
- Analytics & Reporting
- Notifications
- Commerce Plus
- Troubleshooting Guides
- Release Notes
Table of Contents
Enabling Android SDK Platform
- Go to Business Manager > Channels > Platform Deployments and choose Android SDK from Platform drop-down.
- One can also set up webhooks by providing the Webhook URL and enabling the Webhook and putting Email IDs below it.
- Now, turn on the Active toggle button to enable this platform deployment.
Passing Bot Credentials to Android SDK
You can pass bot credentials through your app's strings.xml file or programmatically while initializing the SDK. These credentials will be provided by Haptik.
Using strings.xml
<resources> . . <string name="haptik_base_url">BOT_BASE_URL</string> <string name="haptik_client_id">BOT_CLIENT_ID</string> <string name="haptik_business_id">BOT_BUSINESS_ID</string> </resources>
Programmatically
Kotllin:
val initData = InitData().apply { clientId:"BOT CLIENT ID" businessId: "BOT BUSINESS ID" base_url: "BOT BASE URL" } HaptikSDK.init(context, initData)
Java:
InitData initData = new InitData(); initData.setBase_url("BOT BASE URL"); initData.setBusinessId("BOT BUSINESS ID"); initData.setClientId("BOT CLIENT ID"); HaptikSDK.INSTANCE.init(context, initData);
Read more on SDK initialization here.