Home > Uncategorized > PebbleMondo

PebbleMondo

PebbleMondo beta

PebbleMondo beta

I recently switched from Sports Tracker to Runkeeper, because the latter one offers integration with the Pebble smart watch. However both of those refused to work with my Polar heart rate sensor so I ended up with Endomondo. I wanted to keep the Pebble integration, but apparently even though that there are few threads in the interwebs requesting this feature, it does not seem to be in the list for now.

Endomondo does not offer any API to query information, but I noticed that when it’s not the active application it posts a notification with some very useful information. Since I heard that it’s possible for Android application to catch the notification messages posted by other programs, I decided to write my own adapter for Pebble.

Example notification

Example notification

It proved to be quite difficult to extract the sent information since it’s wrapped into RemoteView object, which does not provide any useful way to tinker with its contents. Finally I found an example from the Stack Overflow which gives an example how do this. Unfortunately the only way seems to be using introspection which is never recommended but seems to work.

The application gets the following information:

  • Duration of exercise
  • Calories burned
  • Heart rate
  • Distance

The information is sent to Pebble’s built-in sports application, so no extra application slot is used from the watch. Unfortunately the watch app is not customizable. It has a display for pace and speed and neither of those is available from Endomondo, so I’m reusing those fields for calories and pulse. User can toggle between these numbers by pressing the middle button on the watch.

The watch application will start automatically when Endomondo starts pushing notifications. The included Android app only displays some instructions and is required by the Play store. The actual program runs as a service on the phone and it needs to be given access to application notifications from the settings menu.

Application source code is available here: https://gitorious.org/pebblemondo

Installable application is available from the Play store against small support fee: https://play.google.com/store/apps/details?id=com.jannem.pebblemondo

Disclaimer: This application is not associated with Endomondo® or Pebble®

Advertisements
Categories: Uncategorized
  1. 08/07/2014 at 19:38

    The app works very well, although you might want to also add support for the Pro version of the Endomondo app (com.endomondo.android.pro). Looking at your source code, you should be able to change your if statements to the following & it should support either app:
    if (sbn.getPackageName().equals(“com.endomondo.android”) || sbn.getPackageName().equals(“com.endomondo.android.pro”)) { … your code … }

    • 08/07/2014 at 22:51

      Thank you really much!! I didn’t know the pro app having different package name. Probably this is why so many has said that the app didn’t work for them. I’ll release new version tomorrow!

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: