21 March, 2011

WP7: Usage logging of application using Flurry

Not having to write this framework myself, I’m happy to learn that some guys have been busy establishing a nice business that addresses usage logging, error logging and general usage monitoring of your Windows Phone Application. Something that Microsoft did not provide out of the box to the developer experience. And it’s darn easy to use as well. Good work, guys!

Might I add, that Flurry.com supports (BlackBerry, iPhone, Android, Windows Phone 7); so they got them all covered.

image

 

How do you use this stuff?
1) Signup for a new account => you receive an application key to uniquely identity your application
2) Download their API (single assembly) from their website
3) Insert FlurryWP7SDK.Api.StartSession(<sessionKey>) in Activated/Launching events (see below)
4) That’s it!

// Code to execute when the application is launching (eg, from Start)
// This code will not execute when the application is reactivated
void Application_Launching(object sender, LaunchingEventArgs e)
{
//register dispatcher class (Galasoft)
DispatcherHelper.Initialize();

//init data
PortfolioManager.InitializeDataStorage();
IsolatedStorageHelper.ClearRuntime();



//UNDONE: register channel with PUSH-notification service

//flyrry
StartFlurrySession();

}

private void StartFlurrySession()
{
//Api.StartSession(Constants.FLURRY_KEY);
FlurryWP7SDK.Api.SetVersion(Utilities.GetVersion());
FlurryWP7SDK.Api.StartSession(Constants.FLURRY_KEY);
}

That’s basically all there is to it! You can access data afterwards on their reporting website.


Technorati Tags:

No comments: