Building Mobile Apps with Tropo API in Appery.io

Working with mapping has been improved to provide you with a more efficient and user-friendly way of binding your data. Now, with the upgraded Mapping feature binding your data is more intuitive; it also provides more features and flexibility. This tutorial uses old mapping, and will be updated shortly. The new mapping uses the same concepts. The following page shows how to migrate the old mapping to the new mapping.

Tropo provides a powerful cloud API that can be used to add real-time communication features to your app. Using  popular web technologies such as PHP, JavaScript, Ruby and many others, it makes it easier to create and control network features.

tropo_log

Tropo also provides a great REST API that lets you configure and control Tropo applications through the use of RESTful methods. This includes the ability to create new Tropo apps, add phone numbers to them, delete applications, and much more. And as Appery.io provides a very comfortable way to work with REST API’s, it’s unbelievably easy to add Tropo communication features to your Appery.io app.

But before you begin, the Tropo application should be created by using the Scripting or Web API. Lets start with creating a simple Tropo app!

Sign up on the Tropo website, and create a new app:

tropo_new_app

Type a Tropo application name, and choose Scripting API:

tropo_basic_info

Now you should create script. Click “New script” to create it:

tropo_new_script

The text editor will appear. Lets add some simple code:

say('Hello from Appery.io!');
call(numberToDial);
say("Hello, " + customerName + "! There is a message for you: " + msg + "!");

Code explanation:

Function say will pronounce “Hello from Appery.io!” text by using the Tropo’s Text-To-Speech engine. After that, the phone number that was passed as a REST parameter will be dialed. Once the call is accepted, a second phrase will be pronounced. Note that the second phrase contains REST parameters too.

Enter the script name, and click “Save.” Don’t forget to specify the script file extension as “.js”:

tropo_new_script

Click “CREATE APP,” and you’re done with the Tropo side. You can test your Tropo app directly from the browser by using Phono. Click “Call App from browser” and then click the phone icon in the bottom left corner:

tropo_call_from_app

Note that you can’t test the call function directly from the browser.

Now you can launch your Tropo app via REST services from Appery.io.

Copy the voice API key to your clipboard:

tropo_api_key

In your Appery.io app, create the following UI:

tropo_ui

If you not familiar with Appery.io yet, we recommend looking at this very simple beginners tutorial.

All the application magic will be kept in a single REST service that will start the Tropo session. Create the REST service and specify the following settings:

tropo_rest_settings

As you can see, there is the Appery.io Proxy provided for this REST service. Click “New channel,” enter a new proxy name for this REST, and then click “Create” to create a new proxy channel directly from the Appery.io builder.

Note: Read about the Appery.io proxy via the link.

In the Request tab, you can specify parameters and their values that can be passed to the Tropo app. In our case, the Request parameters are the following:

tropo_request_parameters

Go to the Test tab and click “Test.” If everything was done correctly, you’ll see a “Test successful” message, and a REST service response that contains both token and id:

tropo_test

Note that you should obtain phone number to make calls, otherwise the script will fail. You also need to link the UI and REST service parameters.

Switch to Data tab, and create a new datasource based on this REST service. Click “Edit Mapping”:

tropo_rest_datasource

Create the following mapping for REST service Request:

tropo_rest_mapping

This will map data from the UI components to the REST parameters. If it’s difficult to understand, read about REST services and mapping.

Unlike the Request parameters, we will print the REST service response without mapping to print all its data. Open the Events tab, and create the following event:

start_tropo_session > Success > Run JavaScript. Add the following JavaScript code:

Apperyio('session_response').val(JSON.stringify(data));

Note that session_response in this case is the name of your Text Area component.

The last thing to do is to launch our REST service by clicking the button. Switch back to Design view, select the “Start session” button and add the following event:

start_session > Click > Invoke service > start_tropo_session.

Now you can test your app by clicking the “Test” button in the top right corner of the screen.

Click “Start session” and you’ll see the result:

tropo_test_app

If something above was not clear enough for you, check out the Appery.io tutorials and documentation.

Go ahead and create apps using Tropo documentation and the power of Appery.io!

New Webinar: Using Appery.io Backend Services to Build a To-do App

What
Using Appery.io Backend Services to Build a To-do App

When
Thursday, May 29, 11am Pacific Time

What you will learn
Learn how to build a complete HTML5/PhoneGap mobile To-do app using the Appery.io platform

Register
Register for this webinar

What Happened with the Upgrade This Weekend

As many of you know, we attempted to upgrade our platform this past weekend and had to roll the update back because of technical issues we encountered.  We made the tough decision to roll back the upgrade because, although painful, it would be least disruptive to our customers.   What happened is not acceptable to us.  We are growing fast and many of you rely on our platform for your business.  We are conducting a review of our process to ensure we deliver with quality each time.

Is my account impacted and if so what should I do?

Fortunately, for most of you, there was no impact.  However, if you opened and modified one of your projects between the times of Sunday at 4 AM Pacific and Monday 5 PM Pacific, some of your updates may have been lost as we rolled back to the earlier release.   If you believe you may have lost some of your changes, there is a good chance we can help you recover them.   Please contact our support channels so we can help you.

I will say this again, what happened over the weekend is unacceptable. We are already looking at ways to improve new features roll out.  In addition to improving our internal process, we are also considering deploying a beta system to both get early feedback on new features and also improve the quality of our new releases.  Another idea we’re considering is enabling users to manually upgrade their apps to new versions of our App Builder, rather than automatically updating them.  This would give you more control over your projects.  I’d love to hear from you about these and other ideas you may have.  Please feel free to write to me directly at max@appery.io

Max and the Appery.io team.

Important Platform Update Today – Monday, May 26 (Updated)

Update: new times published

As you probably know we had an update over the weekend. A number of updates didn’t work the way we expected, and we are going to roll back some of the updates. We are very sorry about this.  This will ensure you can continue using Appery.io, and your apps will continue to run while we resolve out any remaining issues. Once everything is 100% resolved, will have another update in a couple of weeks.

We are going to start the update around 5pm Pacific Time, and it will last until about 10pm Pacific Time, Monday, May 26.

As always, please follow us on Twitter (@apperyio) for latest updates. Our support is always available on the forum and via email.  If you have any other question this update, please don’t hesitate to contact me directly at max@appery.io.

New Mapping

Update (May 27): links were unlinked as this content not currently available.

Appery.io developers: we just upgraded the mapping feature in Appery.io! It’s now a lot more powerful and flexible.  This post is a quick overview of what has changed. The two links (Mapping, Model and Storage) provide more details on the new features. Read this post and then visit the links to learn more.

  • Mapping
  • Model and Storage

Old mapping

This is how the old mapping looked. This shows a data source (service) has been added to the page:

Screen Shot 2014-05-24 at 10.50.02 PM

Clicking on Edit Mapping, would open the service request mapping:

Screen Shot 2014-05-24 at 10.54.00 PM

and this is service response mapping:

Screen Shot 2014-05-24 at 10.54.17 PM

New service events and mapping

The new mapping is a lot more flexible and greatly simplifies building mobile apps in Appery.io. When you switch to Data view, a data source will now be shown like this. Make sure to click the expand arrow on the left to see the data source events:

Screen Shot 2014-05-24 at 10.57.04 PM

The mapping in Before send event and in Success event – that’s the exact the same old mapping Appery.io had before and the one you are used to. When a service was invoked, the request mapping would happen on Before send event and response mapping would happen on Success event.

As you can see what we have now is a lot more flexible. In addition to doing mapping, you can now also run any other action (click +Add button to see the actions), plus Run JavaScript which allows you to run any custom script. Plus, you can invoke any action on Error and Complete events. You can even run the new Mapping action on those events!

New Mapping action

The new Mapping action allows you to invoke mapping on any event, not just on service invocation (last in the list):

Screen Shot 2014-05-24 at 11.08.13 PM

The new Mapping action can also be invoked from the UI:

Screen Shot 2014-05-24 at 11.22.07 PM

For example, on button click, you can move data from page to storage, or from storage to page:

Screen Shot 2014-05-24 at 11.24.24 PM

Mapping: page, service, storage

The mapping is no longer limited to service-page mapping. You can now map data between page, service and storage. This is where the new Mapping actions comes into play. Before you could only map between page and service. Now you can map between page and storage (local storage, session storage). In other words, you can map data from page into storage, or move map data from storage to page. Here is how the new mapping looks:

Screen Shot 2014-05-24 at 11.18.17 PM

Notice that on the left side there are: Page and Storage. On the right side there are: Page, Storage, and Service Request. With the new mapping, we have simplified mapping between Page, Storage and Service.

Documentation

Please read the following pages that explain in more detail the new features:

  • Mapping
  • Model and Storage

 

 

What Is an Appery.io App?

screen-shot-2014-04-29-at-8-32-24-pm

Appery.io is a cloud-based platform with visual development tools and integrated backend services. Appery.io provides powerful visual tools to build the app UI, but what’s the technology under the hood when you create the app? It’s pretty simple, the resulting app has:

  • HTML
  • JavaScript
  • CSS
  • jQuery Mobile
  • Any custom HTML, JavaScript, CSS added by the developer
  • Apache Cordova — for native APIs and hybrid app creation
  • Any custom Apache Cordova plugins

As you can see, it’s a pretty standard technology stack when you build an app in Appery.io.

 

Webinar: Learn How to Build Mobile Apps with Facebook API

Join the Appery.io webinar this Wednesday, at 11am (Pacific Time) learn how to build mobile apps with Facebook API.

App Owners Can Now Manage App Data and Send Push Notifications from User-Friendly Customer Console [Video]

This video shows how to build a mobile app and enable the Customer Console. The Customer Console allows an app owner who, (for example) owns a restaurant, or some other business, to:

  • Modify app data
  • Send push notifications to all app users
  • No need to ask or involve the app developer
  • Deploy the console to appery.io URL or a custom domain such as http://mybusinessname.com

Read more about the Customer Console.

Using Facebook API in Appery.io App

When building a mobile app in Appery.io, it’s very easy to use and connect to any APIs. Facebook provides one of the most popular and widely used APIs that you can as easily use in the app you build in Appery.io.

facebook-logo

Appery.io provides a really simple out-of-box approach to pass the OAuth protocol and connect with Facebook. Before building the Appery.io app you need to register as developer with Facebook and create an app. Once it’s done, go to Appery.io builder and import the Facebook API plug-in:

fb_import_plug_in

Once the plug-in is imported you need to specify Appery.io app ID and Facebook app ID in the Facebook_Setting file that listed under the Services folder:

fb_settings

One more thing to do is change the Start Page in App settings to Facebook_Login. After that you can test the app. You’ll see the Login to Facebook button, clicking on which will dial the OAuth log-in dialog, where you should enter your Facebook login and password. After successful authentication, information about you will be displayed at the Facebook_Me page:

fb_me_page

All of the Graph API features can be used the same way, but note, that some actions requires certain scope. You can change default scope parameter in the Facebook_Helper JavaScript file:
fb_tutorial_helper

That’s it, you can now invoke any available Facebook API.  Go ahead and see how to post a wall message in our detailed Facebook tutorial.

TADHack: Compete for $30K+ in Prizes From the Comfort of Your Home

We have Partnered with TADHack – a global event to discover the latest ways to add communications to apps, services and business processes to create powerful customer experiences.    Use Appery.io to build your hack of course… You’ll have a chance at $30K in prize money and other prizes, including full year subscriptions to Appery.io.   You can join this global event from the comfort of your own home, or in person in Madrid, Spain; Colombo, Sri Lanka; Pune, India; and Kuala Lumpur, Malaysia.

Check out some of the developers getting involved on the even’s blogRegister for the hackathon and get your developer spotlight.

If you want to learn and network rather than hack you can do that too. There will be investors, enterprise CIOs, Telcos, press, customer experience designers and many more coming to TADHack to learn how communications creates world class customer experiences and exciting new services.

TADHack will run over Friday and Saturday the 6th and 7th June 2014 . Here is the agenda. Keynotes include Mark Shuttleworth, the founder of Ubuntu, technology visionary and second space tourist.  Here are some of the developer resources for your hacks.  Hacks can use Telecom APIs, WebRTC, messaging, location, payments and much more.  You’ll even be able to hack your calls.  Its going to be a unique and exciting event – and with Appery.io, you’ll have a competitive advantage!

Sign up for the hackathon and good luck in the competition.