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.onStartSession(String), passing it your ApplicationId.
We recommend placing this call in the constructor method in your application.

public MyClass()
{
// Configuration options set
BangoAgent.onStartSession(ApplicationID);
// your code
}

Insert a call to BangoAgent.onEndSession() when a session is complete.
We recommend placing this call in the destroyApp method of your application.

protected void destroyApp(boolean unconditional) throws MIDletStateChangeException
{
BangoAgent.onEndSession();
// 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 Jul 18, 2011 at 3:13 PM by bangodev, version 3

Comments

No comments yet.