July 16, 2013

Flutter - An iOS Dashboard for Flurry Analytics

In my previous post I discussed analytics services in the context of mobile applications. In particular, I focused on Flurry Analytics and included a code sample demonstrating how to integrate this service into an iOS application.

So what's the next step? As either a mobile developer or marketing expert, you probably want the ability monitor the data collected by Flurry Analytics so you can identify and respond to trends. To meet this need, the Flurry website offers some powerful tools for visualizing how your applications are used. It breaks down numbers by country, version, device, operating system, new user, active user, session and more. This tool is comprehensive and allows users to generate a wide variety of custom reports. While it functions on mobile devices, the experience is far from optimized.

Being a developer with several Flurry-enabled apps in the App Store, I searched for a mobile-friendly solution. I wanted a native iOS app that would make it easy to check my usage statistics on the go. I didn't want the kitchen sink, just the analytics that were most relevant and the ability to visualize trends over time. Several options already existed in the App Store, but none were elegant or easy to use. Having recently completed the iOS & Mac Application Development Certification Program through the University of Washington I thought I'd try my hand at writing an app in objective-c to address this need.

Two and a half months later, I finished work on Flutter and pushed it to the App Store. Flutter is a dashboard for viewing Flurry Analytics on an iOS device. It focuses on primary usage statistics such as active users, new users and sessions. Custom events and multiple companies are also supported. Graphs and totals can be evaluated over some of the most common date ranges (Today, Yesterday, 1 Week, 1 Month, 6 Months, 1 Year). Flutter makes use of many powerful open source technologies including CorePlot, PKRevealController, ESNetworking and SVProgressHUD.

Learn more and download Flutter today! I'd love to hear your feedback.

July 10, 2013

Integrating Flurry Analytics into your iOS App

Flurry Analytics is a great service for keeping tabs on mobile app usage. They help over 100,000 companies monitor 300,000 apps that run on a variety of platforms (iOS, Android, Windows Phone and more). Best of all, it's free to use Flurry Analytics in your own apps.

My goal with this blog entry isn't to come across like a sales pitch. If you have a different analytics service that fits your needs, then more power to you. The point is to use something. Measuring unique users, sessions, new users and then visualizing these attributes over the course of time can reveal some powerful trends. The results might help you prioritize certain features or bug fixes. Maybe the information will help you plan the timing of your next sale. The data adds value as an anonymous source of feedback from your users that'll enable you to be an even better steward of your app.

So what do you need to do to get started with Flurry? First go to their website and sign up (or log in if you already have an account). In the "Applications" tab click the "Add a New Application" link and choose a platform. On the next page name the app and assign a category. You'll be greeted with a "Unique Application Key". Save this key for later and then click the button to download the SDK.

The code sample in this post will illustrate how to use the iOS SDK to integrate Flurry into your app. For MonoTouch (aka Xamarin.iOS) developers I'd advise taking a look at the FlurryAnalytics folder in the monotouch-bindings project. For other platforms, visit Flurry's "Getting Started" documentation.

Continuing with our objective-c / iOS example, add the Flurry lib (found in the SDK you downloaded) to your project. You will also need to link your project against the SystemConfiguration.framework. Now move into your app delegate code, replacing YOUR_API_KEY with the Application Key Flurry assigned to you:

#import "Flurry.h"

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
  [Flurry startSession:YOUR_API_KEY];

  // Other code here... 

This illustrates the bare minimum to get you started - very little code in exchange for some powerful analytics...

November 12, 2012

HealthGraphNet - A .NET Library for RunKeeper / HealthGraph

This summer I started running to lose weight. To measure my efforts, I used the RunKeeper iOS app. It's a great product for recording pace, time, distance, location and a whole plethora of other interesting information relevant to your exercise routine.

All of RunKeeper's data gets saved into an API known as the HealthGraph. I was starting to think up some interesting ways to use this information but was dismayed to discover that no one had written a .NET wrapper to integrate with the HealthGraph.

I wanted an easy to use, strongly-typed library, capable of communicating with this REST-based service both synchronously and asynchronously. So I started writing one, called it HealthGraphNet and put it here on GitHub.

The library is comprised of endpoint and model classes. Each endpoint represents a subject within the HealthGraph API (eg. Fitness Activities, Strength Training Activities, Nutrition, Weight, etc) while the models represent the data transfer to and from the service.

Sample use (taken straight out my documentation) in a synchronous situation might look something like this:
//Retrieve the OAuth2 access token.
var tm = new AccessTokenManager(CLIENT_ID, CLIENT_SECRET, REQUEST_URI);

//Retrieve URIs for HealthGraph endpoints.
var userRequest = new UsersEndpoint(tm);
var user = userRequest.GetUser();

//Create a new 30 minute running activity
var newActivity = new FitnessActivitiesNewModel
    Type = "Running",
    StartTime = DateTime.Now,
    Duration = 1800,
    Notes = "Around the park."
var activitiesRequest = new FitnessActivitiesEndpoint(tm, user);
The folks at RunKeeper were kind enough to list HealthGraphNet on their third-party library page. However, the easiest way to get started is to download the library via Nuget.

I've started to add MonoTouch support but this is still a work in progress. Please feel free to fork HealthGraphNet on GitHub. Pull requests are always welcome!