当前位置: 首页>>代码示例>>Java>>正文


Java Fields类代码示例

本文整理汇总了Java中com.google.analytics.tracking.android.Fields的典型用法代码示例。如果您正苦于以下问题:Java Fields类的具体用法?Java Fields怎么用?Java Fields使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


Fields类属于com.google.analytics.tracking.android包,在下文中一共展示了Fields类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: trackView

import com.google.analytics.tracking.android.Fields; //导入依赖的package包/类
private void trackView(String screenname, CallbackContext callbackContext) {
if (! trackerStarted ) {
           callbackContext.error("Tracker not started");
    return;
}

       Tracker tracker = GoogleAnalytics.getInstance(this.cordova.getActivity()).getDefaultTracker();
       addCustomDimensionsToTracker(tracker);
       
       if (null != screenname && screenname.length() > 0) {
           tracker.set(Fields.SCREEN_NAME, screenname);
           tracker.send(MapBuilder
             .createAppView()
             .build()
           );
           callbackContext.success("Track Screen: " + screenname);
       } else {
           callbackContext.error("Expected one non-empty string argument.");
       }
   }
 
开发者ID:psydrake,项目名称:pandacoinBalance,代码行数:21,代码来源:UniversalAnalyticsPlugin.java

示例2: onStart

import com.google.analytics.tracking.android.Fields; //导入依赖的package包/类
@Override
public void onStart() {
	super.onStart();
	final Tracker tracker = EasyTracker.getInstance(getActivity());
	tracker.set(Fields.SCREEN_NAME, "Recipes list");
	tracker.send(MapBuilder.createAppView().build());
	IntentFilter intentFilter = new IntentFilter();
	intentFilter.addAction(RecipesManager.ACTION_FINISH_LOADING_RECIPES);
	intentFilter.addAction(RecipesManager.ACTION_START_LOADING_RECIPES);

	if (RecipesApplication.isLoadingRecipes) {
		getActivity().setProgressBarIndeterminateVisibility(true);
	} else {
		getActivity().setProgressBarIndeterminateVisibility(false);
	}
	LocalBroadcastManager.getInstance(getActivity()).registerReceiver(broadcastReceiver,
			intentFilter);
}
 
开发者ID:groupsky,项目名称:android-recipes-app,代码行数:19,代码来源:RecipeItemListFragment.java

示例3: onCreate

import com.google.analytics.tracking.android.Fields; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main_menu);

    Intent serviceIntent = new Intent("com.android.vending.billing.InAppBillingService.BIND");
    serviceIntent.setPackage("com.android.vending");
    bindService(serviceIntent, mServiceConn, Context.BIND_AUTO_CREATE);

    findViewById(R.id.pack1_button).setOnClickListener(this);
    findViewById(R.id.pack2_button).setOnClickListener(this);

    Tracker tracker = GoogleAnalytics.getInstance(this).getTracker("UA-51610813-3");
    tracker.send(MapBuilder.createAppView().set(Fields.SCREEN_NAME, "Home Screen").build());

    BugSenseHandler.initAndStartSession(MainMenu.this, "718d6664");
}
 
开发者ID:AlexZaiats,项目名称:Coloring-book,代码行数:18,代码来源:MainMenu.java

示例4: onStart

import com.google.analytics.tracking.android.Fields; //导入依赖的package包/类
@Override
protected void onStart() {
	super.onStart();
	if (mTracker != null) {
		mTracker.send(MapBuilder.createAppView().set(Fields.SCREEN_NAME, "auth").build());
		mTracker.activityStart(this);
	}
}
 
开发者ID:missmisslonely,项目名称:fakeweibo,代码行数:9,代码来源:HelloActivity.java

示例5: onResume

import com.google.analytics.tracking.android.Fields; //导入依赖的package包/类
@Override
public void onResume() {
	super.onResume();
	EasyTracker.getInstance(getActivity()).set(Fields.SCREEN_NAME, TAG);
	EasyTracker.getInstance(getActivity()).send(MapBuilder.createAppView().build());
	View view = getView();

	// set the variables
	TextView textViewTitle = (TextView) view
			.findViewById(R.id.text_view_detail_title);
	TextView textViewMetro = (TextView) view
			.findViewById(R.id.text_view_detail_metro);
	ImageView imageView = (ImageView) view
			.findViewById(R.id.image_view_detail);
	TextView textViewCoord = (TextView) view
			.findViewById(R.id.text_view_detail_coordinates);

	// populate the form
	imageView.setOnLongClickListener(new CameraItemLongClickListener());
	textViewTitle.setText(mCamera.getTitle());
	textViewMetro.setText(mCamera.getCity() + ", NC " + mCamera.getZipCode());
	BigDecimal latitude = new BigDecimal(mCamera.getLatitude()).setScale(3, BigDecimal.ROUND_HALF_UP);
	BigDecimal longitude = new BigDecimal(mCamera.getLongitude()).setScale(3, BigDecimal.ROUND_HALF_UP);
	textViewCoord.setText(latitude + getString(R.string.latitude) + ", " +
			longitude + getString(R.string.longitude));
	MainActivity.getImageWorker().loadImage(mCamera.getUrl(), imageView, mCamera);
}
 
开发者ID:emuneee,项目名称:nc-traffic-cams-open,代码行数:28,代码来源:CameraDetailFragment.java

示例6: onResume

import com.google.analytics.tracking.android.Fields; //导入依赖的package包/类
@Override
public void onResume() {
	EasyTracker.getInstance(getActivity()).set(Fields.SCREEN_NAME, TAG);
	EasyTracker.getInstance(getActivity()).send(MapBuilder.createAppView().build());
	mAdapterView.setSelection(mCurrentIndex);
	if(mWasPaused) {
		new GetCameras(getActivity(), MainActivity.getDBHelper(),
				new PostGetCamerasListener()).execute(mQueryType);
		mWasPaused = false;
	}
	super.onResume();
}
 
开发者ID:emuneee,项目名称:nc-traffic-cams-open,代码行数:13,代码来源:CameraGalleryFragment.java

示例7: addCustomDimensionsToTracker

import com.google.analytics.tracking.android.Fields; //导入依赖的package包/类
private void addCustomDimensionsToTracker(Tracker tracker) {
	for (Entry<String, String> entry : customDimensions.entrySet()) {
		String key = entry.getKey();
		String value = entry.getValue();
	    //System.out.println("Setting tracker dimension slot " + key + ": <" + value+">");
	    tracker.set(Fields.customDimension(Integer.parseInt(key)), value);
	}
}
 
开发者ID:psydrake,项目名称:pandacoinBalance,代码行数:9,代码来源:UniversalAnalyticsPlugin.java

示例8: sendEzCustomMetric

import com.google.analytics.tracking.android.Fields; //导入依赖的package包/类
public static void sendEzCustomMetric(EasyTracker easyTracker, String screenName, int index, String metricValue) {
	// Custom metric value sent is with this screen view.
	easyTracker.send(MapBuilder
	    .createAppView()
	    .set(Fields.SCREEN_NAME, screenName)
	    .set(Fields.customMetric(index), metricValue)
	    .build()
	);
}
 
开发者ID:Austin-Liang,项目名称:OurDailyBread,代码行数:10,代码来源:Util.java

示例9: onStart

import com.google.analytics.tracking.android.Fields; //导入依赖的package包/类
@Override
public void onStart() {
	super.onStart();
	final Tracker tracker = EasyTracker.getInstance(getActivity());
	tracker.set(Fields.SCREEN_NAME, "Recipe Details");
	tracker.send(MapBuilder.createAppView().build());
}
 
开发者ID:groupsky,项目名称:android-recipes-app,代码行数:8,代码来源:RecipeItemDetailFragment.java

示例10: onResume

import com.google.analytics.tracking.android.Fields; //导入依赖的package包/类
@Override
public void onResume() {
    super.onResume();
    String fragmentName = ((Object) this).getClass().getSimpleName();

    // Send data to Google Analytics
    mTracker.set(Fields.SCREEN_NAME, fragmentName);
    mTracker.send(MapBuilder.createAppView().build());

    // Send data to Mixpanel
    ((FlowApplication) getActivity().getApplication()).track("Impression: " + fragmentName);
}
 
开发者ID:UWFlow,项目名称:flow-android,代码行数:13,代码来源:TrackedFragment.java

示例11: onStart

import com.google.analytics.tracking.android.Fields; //导入依赖的package包/类
@Override
public void onStart() {
	// GA tracking
	OmniNotes.getGaTracker().set(Fields.SCREEN_NAME, getClass().getName());
	OmniNotes.getGaTracker().send(MapBuilder.createAppView().build());	
	super.onStart();
}
 
开发者ID:kanpol,项目名称:omni-note,代码行数:8,代码来源:DetailFragment.java

示例12: onStart

import com.google.analytics.tracking.android.Fields; //导入依赖的package包/类
@Override
public void onStart() {
	// GA tracking
	OmniNotes.getGaTracker().set(Fields.SCREEN_NAME, getClass().getName());
	OmniNotes.getGaTracker().send(MapBuilder.createAppView().build());
	super.onStart();
}
 
开发者ID:kanpol,项目名称:omni-note,代码行数:8,代码来源:ListFragment.java

示例13: onStart

import com.google.analytics.tracking.android.Fields; //导入依赖的package包/类
@Override
public void onStart() {
	// GA tracking
	OmniNotes.getGaTracker().set(Fields.SCREEN_NAME, getClass().getName());
	OmniNotes.getGaTracker().send(MapBuilder.createAppView().build());		
	super.onStart();
}
 
开发者ID:kanpol,项目名称:omni-note,代码行数:8,代码来源:AboutActivity.java

示例14: init

import com.google.analytics.tracking.android.Fields; //导入依赖的package包/类
@Kroll.method
public void init( String trackingId, boolean dryRun, boolean manualSession, boolean async, int dispatch){
	async_state = async;
	
	if( async_state == false ){
		GAServiceManager.getInstance().setLocalDispatchPeriod(dispatch);
	}
	
	mInstance.setDryRun(dryRun);
	tracker = mInstance.getTracker(trackingId);
	
	if( manualSession == true ){
		tracker.set(Fields.SESSION_CONTROL, "start");
	}
}
 
开发者ID:UnRyongPark,项目名称:Titanium-Google-Analytics-for-Android-v3,代码行数:16,代码来源:GaAndroidModule.java

示例15: trackScreen

import com.google.analytics.tracking.android.Fields; //导入依赖的package包/类
@Kroll.method
public void trackScreen(String screen){
	tracker.set(Fields.SCREEN_NAME, screen);
	tracker.send(MapBuilder.createAppView().build());
	
	if( async_state == true ){
		GAServiceManager.getInstance().dispatchLocalHits();
	}
}
 
开发者ID:UnRyongPark,项目名称:Titanium-Google-Analytics-for-Android-v3,代码行数:10,代码来源:GaAndroidModule.java


注:本文中的com.google.analytics.tracking.android.Fields类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。