Developing an Amazon Alexa Skill and iOS App From Start To Finish

  • February 22, 2017
  • News

About a month ago we finished developing and releasing the first version of our iOS app and Alexa Skill PingRing.com Alexa Phone Finder. This was not the first iOS application that was built at boberdoo.com, but this was our first time building an Alexa Skill and our first time building an Alexa Skill that also works with a mobile application.

pingring amazon alexa skill ios diagram
 

This post will cover what our development team went through to create PingRing.com. I will describe the Alexa Skill development process, the current state of developing Alexa Skills, and what you should think about before developing an Alexa Skill. I will also explain how we used AWS (Amazon Web Services) to bring our app to life and why AWS is worth considering for building other products. Also I will go through some of the issues we ran into when developing an Alexa Skill alongside an iOS application that were built to work together and be released at the same time.

The Amazon Echo and Amazon Alexa Skill Development

As the Amazon Echo has gained popularity and more households are using Smart Devices it is worth considering whether new software and products should incorporate voice functionality. Up until the last year or so, voice functionality was by and large a Star Trek fantasy or only used in very specific industries. Even before the holiday season was over, there were over five million Amazon Echo devices sold and over three thousand Alexa Skills developed for it. This number undoubtedly is even higher now and Amazon was unable to keep up with demand for the devices over the last few months.

Amazon has improved their Alexa Skill development process and has also drastically improved the ability of users to find Skills in the Alexa App. So, for a lot of businesses now is a good time to start looking into making a voice service that could tie into your application or business.

Our Experience With Amazon Alexa and iOS

For us, we decided to build a Skill that works with an iOS application in order to allow people to use Alexa to find their phone, find friends or family members or send messages to people in their group. We had an advantage that some businesses might not have. We were starting completely from scratch, so we could use all of the tools and the platform that was most closely tied to the Amazon Alexa platform. We based the entire backend of our application in AWS, and tried to leverage AWS to make our development as easy as possible.

We started our development planning by thinking about what information we wanted to be able to get from Amazon Alexa, and what actions we wanted Alexa to take on our behalf. We decided to build these core features for Alexa:

  • Ring your phone remotely
  • Find the location of your phone by name or address
  • Message group members

In order to do this we had to figure out how we would connect our phones to the Amazon Echo.

Using the Alexa Skills Kit

Amazon has created a pretty good system for developers to use for creating Alexa Skills. The Alexa Skills Kit that Amazon made for developers does all of the difficult language processing. All developers have to handle is text and some user information in their application, then send text back to the Alexa Skills Kit for it to turn into sound and a response to the Amazon Echo user.

There are two main ways to process the information to and from the Alexa Skills Kit.

1. Send the data to a URL somewhere on the internet (a URL that does something in your application, running on your server)

With this option, you will have to deal with a number of things that you otherwise wouldn’t have to worry about if you use AWS Lambda to process everything. When you send the data to a URL for an application and server that you run, you will have to pay for all of the costs to maintain that server, and also make sure that you can scale that server and application with the possible demand coming from all the possible Alexa requests.

2. Process the Alexa Skills Kit information using one or more AWS Lambda functions

With this option, you only pay for the processing that you use, and it can pretty much scale infinitely because of how it runs in AWS. AWS Lambda also has an extremely generous free tier, and drastically reduces your up-front investment into a new application. For our application, we decided to go the route of using AWS Lambda, and for most use cases I would also recommend using AWS Lambda.

Pretty much the only reason I could see people wanting to use a URL that points to one of their servers is if they have a complex application already built that would not translate well to using within AWS.

Which AWS Services Did We Use?

We used a few AWS services that greatly decreased the time and work required to bring this application to life. The main services within AWS that we used were:

pingring amazon alexa ios architecture
 

AWS Mobile Hub

We used AWS Mobile hub to help get us started with the backend required for building a mobile application that takes advantage of all networking and communication through the AWS cloud. Mobile is a great starting point for creating an AWS backed mobile application although we did run into quite a few documentation issues. In fact, the most difficult part of pretty much the entire project was sifting through the AWS documentation, and just how outdated or clearly incorrect some very crucial parts of the documentation were. Amazon changes newer parts of AWS very frequently and sometimes the documentation can lag behind for a year or more.

After we figured out how to work with AWS Mobile Hub and how to integrate an iOS application into AWS we were able to focus on building the parts that were specific to only our application. Mobile Hub and the demo apps for Android and iOS that they provide, go a long way in helping to build your specific application. Mobile Hub also helped to provide the backbone for all the other AWS services we used and made it very easy to track and send push notifications to mobile devices.

DynamoDB

We used DynamoDB to store almost all of the data for our application, and I would highly recommend this to other developers creating a new application that isn’t heavily dependent on a relational data structure. DynamoDB is very easy to scale as long as you follow the guidelines provided by AWS, and also has a very generous free tier. Pricing for DynamoDB is based on your read/write capacity and you only pay storage volume over 25GB.

Amazon Cognito

We used Amazon Cognito to manage all of our user authentication, and also manage permission to access other AWS services. This is also a fairly new product offered by AWS, but something I would highly recommend if you are starting a new application in AWS from scratch.

API Gateway

We used API Gateway for part of our application to manage network requests that were later processed in AWS Lambda. We didn’t use this as fully as we could have, but I would recommend that others look into this further if they are developing an application based in AWS that requires a lot of API usage.

AWS Lambda

Finally, we used AWS Lambda in many places as the “glue” that communicates between other AWS services, and also does our application logic that needs processing in the cloud. Before this project I had not used AWS Lambda much at all, but once I became used to using it, I started seeing a lot more potential applications. I think this is one of the most important products that AWS has created, but might take a while for developers to fully understand and figure out how to integrate it into their application architecture.

The Amazon Alexa Skill and iOS Release Process

Aside from building our actual application, it is also worth mentioning how we released our application to end users and the process of doing so. There is a big difference in how apps are released in the iOS app store vs how “Skills” are released through Amazon’s Alexa service. Both have pretty strict requirements and do their best to not allow bad or unusable apps into their service. That is generally a good thing.

The biggest difference in terms of difficulty between the two platforms is how transparent they are about what needs to be done in order to release an app or Skill. Apple has tons of documentation about guidelines for app submission, but once you officially submit the app to Apple, you are pretty much at their mercy. Their app reviewers can be anywhere from extremely helpful to downright infuriating. In our case, unfortunately they were downright infuriating. I won’t go into too much detail, but for other apps I have released to the iOS app store I have encountered similar situations and I have heard a number of similar stories from other developers. Apple should remedy this by putting a lot more effort into communicating with developers.

Amazon on the other hand, was extremely helpful, and extremely responsive through the release process. Our skill required multiple submissions to get right, but Amazon gave very clear descriptions, not only of what was wrong, but also what needed to be done to pass their requirements. I was very impressed with Amazon’s testing and help with getting an Alexa Skill approved.

Simultaneous Release Timing

From what I have seen so far in Alexa’s Skill market and the iOS app store there aren’t very many mobile applications that also currently integrate functionality with the Amazon Echo. I am sure there will be more in the future and I can only imagine that more people will run into issues trying to release their application to both simultaneously. The part that we found most difficult in that respect was the timing of release for both markets or platforms. Apple does allow developers to schedule a release for their application after the app has passed Apple’s approval. This can be very helpful for developers. In our situation, we had to release the Alexa Skill first so that Apple could test our application using an Amazon Echo. This would have been okay if Apple was quick to release our application, but in our case Apple delayed the release of our iOS application by more than a month for reasons they never explained to us, and caused multiple negative reviews by Amazon Echo users. Amazon Echo users that initially tried our Skill were unable to use the iOS application and it might have impacted initial opinions of potential users. This could be greatly improved if Amazon had a better beta program or limited release program for their Alexa Skills. Hopefully Amazon will release something like this in the future.

Amazon Alexa Skill development has not been around for a very long time, and has a lot of room to grow. I think Amazon might have been caught off guard with the demand from consumers for the Amazon Echo devices and I can only imagine that Amazon will continue to improve their platform. Apple’s iOS app store has been around for a while, and while I am sure some improvements will be made, I don’t think Apple’s platform will change very significantly in the next few years.

Hopefully this post has helped illuminate the process of creating Alexa Skills that work with mobile applications and might inspire other developers that are considering creating an Alexa Skill for their business or application. We definitely learned a lot from the process of creating this application, and will have a much better idea of what to expect if we go down a similar path in the future.

Alexa Skill Development
boberdoo.com is an software provider for the lead generation industry. While boberdoo has specialized in building lead distribution software and call routing technology since 2001, they have recently expanded into additional industries with a focus on building iOS applications and Amazon Alexa skills. If you’re interested in learning more about boberdoo.com, please give us a call at 800-776-5646 or fill out the form below.

Take Your Business To The Next Level


More from our blog

See all posts