本文整理汇总了Java中com.google.android.gms.analytics.Logger.LogLevel类的典型用法代码示例。如果您正苦于以下问题:Java LogLevel类的具体用法?Java LogLevel怎么用?Java LogLevel使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
LogLevel类属于com.google.android.gms.analytics.Logger包,在下文中一共展示了LogLevel类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: getTracker
import com.google.android.gms.analytics.Logger.LogLevel; //导入依赖的package包/类
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;
}
开发者ID:Dnet3,项目名称:CustomAndroidOneSheeld,代码行数:14,代码来源:OneSheeldApplication.java
示例2: onCreate
import com.google.android.gms.analytics.Logger.LogLevel; //导入依赖的package包/类
@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();
}
开发者ID:benoitletondor,项目名称:EasyBudget,代码行数:36,代码来源:EasyBudget.java
示例3: getAnalyticsTracker
import com.google.android.gms.analytics.Logger.LogLevel; //导入依赖的package包/类
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;
}
开发者ID:asm-products,项目名称:nexus-gallery,代码行数:13,代码来源:GalleryAppImpl.java
示例4: onCreate
import com.google.android.gms.analytics.Logger.LogLevel; //导入依赖的package包/类
@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);
}
开发者ID:alibehzadian,项目名称:DrPermissions,代码行数:12,代码来源:BaseActivity.java
示例5: initTracker
import com.google.android.gms.analytics.Logger.LogLevel; //导入依赖的package包/类
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);
}
}
开发者ID:yyunikov,项目名称:android-dim-block,代码行数:12,代码来源:Analytics.java
示例6: analytics_getTracker
import com.google.android.gms.analytics.Logger.LogLevel; //导入依赖的package包/类
/**
* 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);
}
开发者ID:javocsoft,项目名称:javocsoft-toolbox,代码行数:25,代码来源:ToolBox.java
注:本文中的com.google.android.gms.analytics.Logger.LogLevel类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论