Sample Implementation

There are 2 methods that must be called for application analytics to perform correctly.
These must be called after any of the configuration options have been set:

Insert a call to BangoAgent.onStartApp(String) to begin a session, passing it a reference to your application's ApplicationId. It is recommended to place this call in the main() function of your application.

public static void main(String[] args)
{
BangoAgent.onStartSession(tMy Application Id);
// your code
}

Insert a call to BangoAgent.onEndSession() to terminate a session.
It is recommended to place a call to this method at any location where you call System.exit().

public void onClose ()
{
BangoAgent.onEndSession(this);
// your code
}

You can then use either the generic method to log an event:

BangoAgent.onEvent(eventName, eventDetail, eventValue, eventParameters)

Alternatively you can use a predefined event method to log a predefined event type:

BangoAgent.onSearch(eventName, eventDetail, eventValue, eventParameters)
BangoAgent.onPageView(eventName, eventDetail, eventValue, eventParameters)

Last edited Jun 20, 2011 at 3:53 PM by bangodev, version 1

Comments

No comments yet.