Konverse AI Developer Hub
  • Konverse AI Developer Hub
  • Getting Started
    • Authentication
    • Errors
    • Rate Limit
  • Webhooks
    • Webhook Endpoints
  • Platform
    • Embedded Functions
      • Send Text Message
      • Send Quick Reply
      • Set Variables
      • Send Choice
      • Send Cards
      • Stop Propagation
      • Query a Dataset
      • Jump To Story
      • Query a Google Sheet
    • Datasets
    • Bot Webhooks
  • Messaging Channels
    • Introduction to Channels
    • Web Chat
    • Facebook Messenger
    • WhatsApp
      • Send WhatsApp Notifications
      • Send Session Message
    • Line
  • App Integration
    • Android App Integration
Powered by GitBook
On this page
  • Step 1: Create App Interface And WebView Element
  • Step 2: Declare A WebView Variable, Add A Link To Your Site
  • Step 3: Set WebView Client
  • Step 4: Remove Additional Padding

Was this helpful?

  1. App Integration

Android App Integration

PreviousLine

Last updated 4 years ago

Was this helpful?

Step 1: Create App Interface And WebView Element

Open res -> layout -> activity_main.xml, create the application interface and add WebView element to it.

Step 2: Declare A WebView Variable, Add A Link To Your Site

Go to src -> package -> MainActivity.java. You will need to declare a WebView variable, enable JavaScript and load the link of your website. You can check the below code screenshot. Do not forget to add link of your website in mywebView.loadUrl().

Step 3: Set WebView Client

Next step is to add one line of code in your MainActivity.java class given below. If you do not add this code in your app then clickable links will open in a standard web browser such as Google Chrome. To ensure that the user stays within the app and links open inside your app, you will need to add the below code.

mywebView.setWebViewClient(new WebViewClient());

Step 4: Remove Additional Padding

If you want to remove the additional spacing, open activity_main.xml and remove the padding from layouts.