Search in sources :

Example 1 with AnalyticsEvent

use of com.braintreepayments.api.internal.AnalyticsEvent in project braintree_android by braintree.

the class BraintreeFragment method sendAnalyticsEvent.

public void sendAnalyticsEvent(final String eventFragment) {
    final AnalyticsEvent request = new AnalyticsEvent(mContext, getSessionId(), mIntegrationType, eventFragment);
    waitForConfiguration(new ConfigurationListener() {

        @Override
        public void onConfigurationFetched(Configuration configuration) {
            if (configuration.getAnalytics().isEnabled()) {
                mAnalyticsDatabase.addEvent(request);
            }
        }
    });
}
Also used : ConfigurationListener(com.braintreepayments.api.interfaces.ConfigurationListener) AnalyticsEvent(com.braintreepayments.api.internal.AnalyticsEvent) Configuration(com.braintreepayments.api.models.Configuration)

Aggregations

ConfigurationListener (com.braintreepayments.api.interfaces.ConfigurationListener)1 AnalyticsEvent (com.braintreepayments.api.internal.AnalyticsEvent)1 Configuration (com.braintreepayments.api.models.Configuration)1