Time for action – setting up Flurry
Perform the following steps to set up Flurry:
You need a key to uniquely identify your app. Register your app at Flurry Analytics (https://dev.flurry.com/secure/login.do). After registering you will get an application key (also referred to as an API key). This will be the key used to identify your app on Flurry.
Install the module into your project home.
Open
tiapp.xml
and add the new module to the list of attached modules.Add the following code to
app.js
to initialize the Flurry session, adding your Flurry API key in place of the highlighted code:var flurry = require('com.onecowstanding.flurry');
Run the app!
What just happened?
You created a Flurry account and linked it to the app using the API key. You added code to your app to start a new session when the app is opened and to post analytics updates while the app is open. You should see the statistics within a few hours of running the app on the simulator.
We now need to add calls to the app code to fire...