Skip to content

Sample for embedding Twyla Widget in an Android app

License

Notifications You must be signed in to change notification settings

twyla-ai/widget-sample-android

Repository files navigation

Widget Android Embed Sample

A sample Android project showcasing how to embed Twyla Widget in an activity:

Getting Started

  1. Grab the widget configuration from Twyla Canvas Widget configurator (Project settings -> Twyla Web Widget -> Generate Snippet).
  2. Add the embed attribute data-embed-mode="true" to the script. It should look something like:
<script
  id="twyla-widget-script"
  src="https://widget.chat.twyla.ai/twyla-widget.js"
  data-hook-url="<hook-url>"
  data-api-key="<api-key>"
  data-primary-color="#2f80ed"
  data-greeting="false"
  data-embed-mode="true"
>
</script>
  1. Import the Project in Android Studio.
  2. In assets/index.html, replace the script with the one from step #2.
  3. Run the project

About

Sample for embedding Twyla Widget in an Android app

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published