Building hybrid conversational mobile apps using AWS Lex

WalkingTree Technologies
3 min readMay 24, 2018

Since the inception of digital machines (Computers and it’s sister devices), we were accustomed to communicate with them (to and from) in certain way i.e. like using keyboard and mouse. In last decade, Mobiles brought in revolutionary changes in terms of usability which lead to wider acceptance across the globe. Now more people are linked to digital machines. However, Mobile did not change the mode of communication but made the communication simple within its own context.

From last few years, our scientific community and engineers started exploring alternative ways to communicate with Digital machines. One of the prominent way is through Voice i.e. devices can take instructions from us, then act and respond to instruction. This can become a conversation as if human beings are talking to each other, which can lead to desired output. AWS Lex is one of the prominent cloud based service which enables developers to build conversational apps for digital and mobile devices.

AWS Lex provides native plugins to allow users to build conversational mobile apps. However, AWS did not provide hybrid (Cordova) plugins. As you know Hybrid mobile apps are taking center stage these days, Having cordova plugin will definitely help developer’s community. Hence we built a cordova plugin for Android and IOS which allow us to build hybrid conversational mobile apps.

In this blog we covered the steps on how to build conversational mobile apps using the hybrid plugin.

Theme:

In this blog, we are going to configure AWS Lex voice bot with existing schedule appointment blueprint.

Tools:

  • Cordova
  • Ionic
  • Angular2
  • Plugman

Steps to configure AWS Lex service and generation of Cordova plugin:

  • Configure the AWS Lex service from amazon console by using the following link here. Now you will have the bot ready to be integrated into any app.
  • Install ionic cli and cordova by using the following command for generating hybrid mobile app.

npm install -g ionic cordova

  • Create ionic project by using the following command. This command allows you to generate tab structure for default hybrid app

ionic start < project name> tabs

  • Add the platforms to the app by using the following commands.

ionic cordova platform add android

ionic cordova platform add ios

  • Add the WTT cordova plugin by using the following command

ionic cordova plugin add <path to plugin folder>

  • In mobile app business flow, add an event which will trigger conversation and call the implemented plugin method to bootstrap AWS Lex voice interaction on button click. Now we can verify the flow configured in AWS Lex service.

Here you can find demo video of sample ionic app with AWS Lex cordova plugin.

Source: https://walkingtree.tech/building-hybrid-conversational-mobile-apps-using-aws-lex/

--

--

WalkingTree Technologies

WalkingTree is an IT software and service provider recognized for its passion for technology.