Does Web SDK support native platforms?(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
The SDK supports integrations with Native platforms such as iOS and Android. This is done with the help of a Web View.
To ensure that the SDK loads up inside an Android WebView. Make sure the following permissions are present in the Manifest
The following settings on the WebView are also necessary to ensure the SDK has the necessary permissions.
The lifecycle of a WebPage in WebView is coupled to the Android app lifecycle. Therefore for proper user experience, we need to notify Haptik SDK when the app goes in the background. Below is the code snippet to do so.
iOS doesn't need any extra permissions in order to operate. Just open the HTML file where you've configured the SDK inside the app.
Just like Android, in iOS as well the lifecycle of a WebPage is coupled to the iOS app lifecycle. We need to notify Haptik SDK when the app goes in the background. To do this, please add an inactive state observer in your view controller which consists of the WkWebView, and add the following code: