Skip to content

Latest commit

 

History

History
26 lines (23 loc) · 880 Bytes

README.md

File metadata and controls

26 lines (23 loc) · 880 Bytes

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