📘

Don't have an Instabot account yet?

Start your free trial today!

Overview

Instabot can be integrated into your native Android app using a full-screen webview.

Instabot launching in a native Android webviewInstabot launching in a native Android webview

Instabot launching in a native Android webview

Contents

  1. Get your bot microsite URL
  2. Create a full-screen webview

1. Get your bot microsite URL

  1. In the conversations page, find the bot that you want to launch, open the menu, then click 'Share'
Get your bot's microsite URLGet your bot's microsite URL

Get your bot's microsite URL

  1. Copy the microsite URL from the page that's launched. You'll need this for the next step!

2. Create a full-screen webview

  1. In your app, create a full-screen webview that will launch your bot's microsite URL
package mobi.roko.webinstabot;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.webkit.WebView;

public class WebActivity extends AppCompatActivity {

    String instabot = "https://YOUR-BOTS-MICROSITE-URL";

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_web);

        WebView webView = findViewById(R.id.webview);
        webView.getSettings().setJavaScriptEnabled(true);
        webView.loadUrl(instabot);
    }
}
  1. That's it!