Java 类com.google.android.gms.analytics.Logger.LogLevel 实例源码

项目:CustomAndroidOneSheeld    文件:OneSheeldApplication.java   
public synchronized Tracker getTracker() {
    if (gaTracker != null)
        return gaTracker;
    GoogleAnalytics analytics = GoogleAnalytics.getInstance(this);
    analytics.setAppOptOut(isDebuggable);
    if (isDebuggable)
        analytics.getLogger().setLogLevel(LogLevel.VERBOSE);
    gaTracker = analytics.newTracker(ApiObjects.analytics
            .get("property_id"));
    gaTracker.enableAdvertisingIdCollection(true);
    gaTracker.setSessionTimeout(-1);
    return gaTracker;
}
项目:EasyBudget    文件:EasyBudget.java   
@Override
public void onCreate()
{
    super.onCreate();

    // Init actions
    init();

    // Check if an update occurred and perform action if needed
    checkUpdateAction();

    // Crashlytics
    if( BuildConfig.CRASHLYTICS_ACTIVATED )
    {
        Fabric.with(this, new Crashlytics());

        Crashlytics.setUserIdentifier(Parameters.getInstance(getApplicationContext()).getString(ParameterKeys.LOCAL_ID));
    }

    // Batch
    setUpBatchSDK();

    // Analytics
    GoogleAnalytics analytics = GoogleAnalytics.getInstance(this);
    analytics.setDryRun(!BuildConfig.ANALYTICS_ACTIVATED);
    if( BuildConfig.DEBUG_LOG )
    {
        analytics.getLogger().setLogLevel(LogLevel.VERBOSE);
    }

    analyticsTracker = analytics.newTracker(R.xml.analytics);

    // In-app billing
    setupIab();
}
项目:1Sheeld-Android-App    文件:OneSheeldApplication.java   
public synchronized Tracker getTracker() {
    if (gaTracker != null)
        return gaTracker;
    GoogleAnalytics analytics = GoogleAnalytics.getInstance(this);
    analytics.setAppOptOut(isDebuggable);
    if (isDebuggable)
        analytics.getLogger().setLogLevel(LogLevel.VERBOSE);
    gaTracker = analytics.newTracker(ApiObjects.analytics
            .get("property_id"));
    gaTracker.enableAdvertisingIdCollection(true);
    gaTracker.setSessionTimeout(-1);
    return gaTracker;
}
项目:nexus-gallery    文件:GalleryAppImpl.java   
private Tracker getAnalyticsTracker() {
    if (mAnalyticsTracker == null) {
        GoogleAnalytics analytics = GoogleAnalytics.getInstance(this);
        analytics.enableAutoActivityReports(this);
        analytics.getLogger().setLogLevel(LogLevel.VERBOSE);

        mAnalyticsTracker = analytics.newTracker(mTrackerID);
        mAnalyticsTracker.enableAutoActivityTracking(true);
        mAnalyticsTracker.enableExceptionReporting(true);
    }
    return mAnalyticsTracker;
}
项目:nexus-camera    文件:CameraApp.java   
private Tracker getAnalyticsTracker() {
    if (mAnalyticsTracker == null) {
        GoogleAnalytics analytics = GoogleAnalytics.getInstance(this);
        analytics.enableAutoActivityReports(this);
        analytics.getLogger().setLogLevel(LogLevel.VERBOSE);

        mAnalyticsTracker = analytics.newTracker(mTrackerID);
        mAnalyticsTracker.enableAutoActivityTracking(true);
        mAnalyticsTracker.enableExceptionReporting(true);
    }
    return mAnalyticsTracker;
}
项目:DrPermissions    文件:BaseActivity.java   
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    GoogleAnalytics.getInstance(this).getLogger().setLogLevel(LogLevel.VERBOSE);

    Tracker t = GoogleAnalytics.getInstance(this).newTracker(GA_TRACKING_CODE);
    t.setScreenName(this.getClass().getName());
    t.send(new HitBuilders.AppViewBuilder().build());
    t.setScreenName(null);
}
项目:EasyBudget    文件:EasyBudget.java   
@Override
public void onCreate()
{
    super.onCreate();

    // Init actions
    init();

    // Check if an update occurred and perform action if needed
    checkUpdateAction();

    // Crashlytics
    if( BuildConfig.CRASHLYTICS_ACTIVATED )
    {
        Fabric.with(this, new Crashlytics());

        Crashlytics.setUserIdentifier(Parameters.getInstance(getApplicationContext()).getString(ParameterKeys.LOCAL_ID));
    }

    // Batch
    setUpBatchSDK();

    // Analytics
    GoogleAnalytics analytics = GoogleAnalytics.getInstance(this);
    analytics.setDryRun(!BuildConfig.ANALYTICS_ACTIVATED);
    if( BuildConfig.DEBUG_LOG )
    {
        analytics.getLogger().setLogLevel(LogLevel.VERBOSE);
    }

    analyticsTracker = analytics.newTracker(R.xml.analytics);

    // In-app billing
    setupIab();
}
项目:android-dim-block    文件:Analytics.java   
public void initTracker() {
    mTracker = GoogleAnalytics.getInstance(Model.getInstance().getApplication()).newTracker(R.xml.analytics);

    if (!Model.getInstance().getConfiguration().isAnalyticsEnabled()) {
        // When dry run is set, hits will not be dispatched, but will still be logged as
        // though they were dispatched.
        GoogleAnalytics.getInstance(Model.getInstance().getApplication()).setDryRun(!Model.getInstance()
                   .getConfiguration().isAnalyticsEnabled());
        GoogleAnalytics.getInstance(Model.getInstance().getApplication()).getLogger().setLogLevel(LogLevel.VERBOSE);
    }
}
项目:javocsoft-toolbox    文件:ToolBox.java   
/**
 * Gets a new Analytics v4 tracker.
 * 
 * See: https://developers.google.com/analytics/devguides/collection/android/v4/
 * 
 * @param context               
 * @param analyticsTrackingId
 * @param debugMode If enabled, GA operations will not be sent to Analytics but
 *                  are logged. 
 * @return
 */
public static synchronized Tracker analytics_getTracker(Context context, String analyticsTrackingId, boolean debugMode) {
    GoogleAnalytics analytics = GoogleAnalytics.getInstance(context);

    if(debugMode) {
        // When dry run is set, hits will not be dispatched, but will still be logged as
        // though they were dispatched.
        analytics.setDryRun(true);
        //Enable logging for GA.
        analytics.getLogger().setLogLevel(LogLevel.VERBOSE);
    }

    return analytics.newTracker(analyticsTrackingId);
}