Last updated: 2021-03-04
Freddy Self-service for mobile apps
You can use WebView to embed your bot in your mobile apps. A WebView is an embeddable browser inside a native mobile application. The native mobile application, also known as an app, is written with a language and a UI framework specifically designed for a particular platform (Android, iOS). The WebView is a browser engine that runs like an iframe on the app. The app uses WebView to serve websites to the end-user.
WebViews need to be created specifically for each mobile platform. You can create a WebView using the following instructions for the specific platform:
As you're loading the bots with WebView, you can apply any customization for a web browser widget on the WebView as well. Here are a few customizations that you can make to offer a seamless customer experience while using the bot widget on your mobile app.
Expand the widget when webview is triggered
```javascript
```
JavaScript
Other customizable parameters for webview include the data-init-type parameter which can be set to one of these three different values. These are
When set to normal, this will initialize and execute the code without any performance optimization.
When you set the value of the parameter to opt, it will initialize and execute the code with all the available performance optimization techniques.
When you set the value of the parameter to delayed, it will initialize and execute the code without initializing the chat and will hide the widget.
``` Note: To use data-init-type as delayed, parameter data-self-init has to be set to false. ```
The delayed parameter is ideal when you want the chat widget to appear after your customer carries out a certain action so that the code can be executed on the initial pages or the WebView.
Call the below functions to Initialise Chat and Show Widget
Removing the header from your bot widget
```css
```
CSS
Prefill data for better context
You can also choose to create a better experience for your customers by prefilling the bot by using Custom Parameters and custom JS functions. For example, you can prefill details such as the email address or the phone number before the bot loads so that the customers enjoy a personalized experience.
``` Note: The Freddy Self-service bot does not natively offer SDK support. However, if you are looking to deploy bots using SDK, you can consider the Freddy integration with Freshchat and, in turn, use the Freshchat SDK. ```
Please write to freshbots-support@freshworks.com if you have any more questions. We'll be happy to help you.