---
title: "Building Apps for the Business Traveler"
canonical_url: https://developer.repebble.com/blog/2014/09/03/Pebble-Concur-Mojio/
last_updated: 2025-08-08
sdk_version: 4.33.1
---
# Building Apps for the Business Traveler

Source: https://developer.repebble.com/blog/2014/09/03/Pebble-Concur-Mojio/

This is the Pebble Developer Blog. For general Pebble news and announcements, visit the main blog at [repebble.com/blog](https://repebble.com/blog).

- 03 September 2014
- [Katherine McAuliffe](https://developer.repebble.com/blog/authors/katherine/)
- [At the Pub](https://developer.repebble.com/blog/tags/at-the-pub/)
- [Comments](https://developer.repebble.com/blog/2014/09/03/Pebble-Concur-Mojio.md#comments)

_This is a guest post by Chris Ismael, Senior Developer Evangelist at [Concur](http://bit.ly/DisruptSF). Developers use Concur's APIs to reinvent their travel apps into time and money-saving tools for the business traveler. Concur and Pebble are sponsoring the **[TechCrunch Disrupt Hackathon 2014](http://disruptsfhackathon.challengepost.com/)** in San Francisco. You can also get a shot at $100K prize for the best travel app at [**The Perfect Trip Fund Awards**](https://developer.concur.com/devcon/PerfectTripFundAwards). (Special thanks to **[Ethan Fan](https://twitter.com/ethanyfan) and [Gabi Zuniga](http://about.me/gabiz)** for the source code)._

The Pebble SDK makes it easy to build **Pebble apps that call cloud APIs**. It also facilitates **communication between your Pebble smartwatch app and your smartphone**. Add to this the fact that your **development environment is run from the browser** (no installation horror!) - you know you've got a winner.

In this post, we'll touch on the those three aspects of the Pebble SDK by examining the code written by Ethan and Gabi from a previous hackathon. Take a minute to watch their demo below so you can get a context on what the app is about - a Pebble smartwatch that computes and submits car mileage expense.

Their app is a re-imagination of the car mileage expense submission by using a combination of the Pebble SDK, Mojio API, and the Concur API. We'll use the diagram below to explain the code in sequence:

![](https://developer.repebble.com/assets/images/blog/PebbleBalsamiq.png)

The source code are accessible as gists at:

| **Pebble C SDK (C)** | [ExpensePro.c](https://gist.github.com/ismaelc/4c2bcccbe1b8f9fa279b) |
| --- | --- |
| **PebbleKit JS (Javascript)** | [pebble-js-app.js](https://gist.github.com/ismaelc/44d084346018a367a3bd) |

## Let's get started!

1. **To establish the connection** betweeen your Pebble smartwatch and the Pebble app in your smartphone, we need to set up the **AppMessage API**. This is explained in detail in the **Preparing AppMessage** section of the [Adding Content from the Web](https://developer.repebble.com/getting-started/watchface-tutorial/part3/) of the Pebble Getting Started tutorial.

2. **On the "phone" side** , we also have event handlers set up in [line 170 of pebble-js-app.js](https://gist.github.com/ismaelc/44d084346018a367a3bd#file-pebble-js-app-js-L170), to fire when the smartwatch app is 'ready', and when an `appmessage` is being sent from the watch to the phone.

3. When the business traveler arrives at their destination, they can choose to **submit the trip captured by Pebble and the Mojio API - as a car mileage expense to Concur**.

4. The button press in Step 3 eventually calls [`postToConcur`](https://gist.github.com/ismaelc/44d084346018a367a3bd#file-pebble-js-app-js-L116) to submit the information to the Concur Expense API

And that's all there is to it! Now that you have an overview of how the code works, you can now **put this together as Project in the CloudPebble IDE** like this:

![](https://developer.repebble.com/assets/images/blog/cloudpebbleIDE.png)

I strongly suggest that you check out [Pebble's Getting Started tutorial](https://developer.repebble.com/getting-started/watchface-tutorial/part1/) where all we've discussed so far, including CloudPebble, are covered in detail.

To sum up, the Pebble SDK:

- Makes it easy to call cloud APIs
- Facilitates communication between your Pebble smartwatch and your smartphone app
- Provides a browser-based IDE called CloudPebble that makes coding easier/faster

If you have questions, please feel free to email me at [chris.ismael@concur.com](mailto:chris.ismael@concur.com)

* * *
