public class MyActivity extends Activity {
public void trackEvent() {
HashMap<String, String> attributes = new HashMap<String, String>();
attributes.put("attr1", "val1");
attributes.put("attr2", "val2");
new BoomtrainClient(this).trackEvent("my-event", "model-name", "model-id", attributes, new BoomtrainHandler() {
public void onSuccess() {
}
public void onFailure(Exception e) {
}
});
}
}