Giter Site home page Giter Site logo

pranav2612000 / machaao-samples Goto Github PK

View Code? Open in Web Editor NEW

This project forked from machaao/machaao-samples

0.0 2.0 0.0 8.74 MB

Rapidly build and deploy deeply personalized chatbots

Home Page: https://messengerx.io

Java 33.46% JavaScript 43.16% Dockerfile 2.49% Makefile 3.80% Python 12.32% Batchfile 4.77%

machaao-samples's Introduction

Get Started

Gitter

Requirements

JDK 8 Latest Android SDK tools Latest Android platform tools Android SDK 21 or newer AndroidX Basic Server Side Programming (Python / NodeJS)

Overview

basic_sample_bot : This is an echo bot which shows the basic usage of the MACHAAO send message API, it contains the following code base to get you started

The above repository contains two assets - Server side code for a simple echo bot - Client Android App Source Code

Get a FREE API Token

Get your FREE API Token by signing up @ https://portal.messengerx.io

Integrate your bot on your website

Step_1: Below is a sample script you need to paste into your website to install webchat for your chatbot.

<script
        id="webchat"
        src="https://dev.messengerx.io/bot/js/widget.js"
        type="text/javascript"
        themecolor="#2196f3"
        chathost="https://dev.messengerx.io"
        botname="<!-- your bot name -->"
        machaaokey="<!-- your api token -->"
        avatarurl="<!-- your bot logo url -->"
    ></script>

Step_2: You will need to update variables above as shown below:

themecolor : Put the desired color in hex or rgb format which will be applied to the chat header background, buttons and message bubble background.

botname : The name of the bot that will appear on the chat header

avatarurl : The url of the image that is shown on bot launcher icon.

chathost : Url where the static assets for the webchat are hosted.

machaaokey : The API token for your bot proivded by Machaao

Integrate your bot in your android app

Add following to your app gradle file.

maven {
    url "https://machaao-android-builds.s3.amazonaws.com/sdk/android/snapshots"
}

Add Gradle Dependency

debugImplementation('com.machaao.android:machaao-sdk:0.965-SNAPSHOT') {
       transitive = true
}

Modify Manifest (Add Token)

 <meta-data android:name="com.machaao.android.sdk.token"
android:value="<!-- Replace with your bot / api token assigned by MACHAAO Inc ([email protected]) -->" />

Add SingleBotActivity Reference to Manifest (Bot Developers)

<activity android:name="com.machaao.android.sdk.activities.SingleBotActivity"
      android:logo="@mipmap/ic_launcher"
      android:windowSoftInputMode="stateHidden|adjustResize"
      android:screenOrientation="portrait"
      android:launchMode="singleTop"
      tools:node="merge"
      android:theme="@style/AppTheme.Orange">
      <intent-filter>
          <action android:name="android.intent.action.MAIN" />
          <category android:name="android.intent.category.LAUNCHER" />
          <action android:name="android.intent.action.VIEW" />
      </intent-filter>
  </activity>

Intialize MACHAAO Chatbot SDK

Machaao.initialize(this);

Launch Your Bot / Mini App via our SDK [For Bot Developers / Partners]

Intent intent = new Intent(this, SingleBotActivity.class);
intent.putExtra("botToken", botToken);
startActivity(intent);

Launch Your Bot / Mini App via our SDK [For Bot Developers / Partners]

Sample Android Chat App @ https://github.com/machaao/machaao-samples/tree/master/basic_sample_bot/client/android/sample_bot_client

Contact us for Advanced Usage / Implementation Support / Bugs

Please feel free to contact us for advanced support and instructions. Email us at [email protected] to get you started.

machaao-samples's People

Contributors

unixguru2k avatar abskrj avatar bars1986 avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.