com.google.analytics.tracking.android.Fields Java Examples
The following examples show how to use
com.google.analytics.tracking.android.Fields.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: TVPortalApplication.java From android with Apache License 2.0 | 6 votes |
@Override public void onCreate() { super.onCreate(); ACRA.init(this); SharedPreferences mPrefs; mPrefs = PreferenceManager.getDefaultSharedPreferences(this); mPrefs.edit().putInt(ARG_LAUNCH_COUNT, (mPrefs.getInt(ARG_LAUNCH_COUNT, 0)) + 1).apply(); //google analytics minimal just amount of install's and sessions mTracker = GoogleAnalytics.getInstance(this).getTracker(Config.GA_PROPERTY_ID); mTracker.send(MapBuilder.createEvent("UX", "appstart", null, null) .set(Fields.SESSION_CONTROL, "start") .build() ); //Check if the user upgraded via the server: new AsyncTask<Void, Void, Void>() { @Override protected Void doInBackground(Void... voids) { AppUtils.isServerUpgraded(TVPortalApplication.this); return null; } }.execute(); }
Example #2
Source File: RecipeItemListFragment.java From android-recipes-app with Apache License 2.0 | 6 votes |
@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); }
Example #3
Source File: MainMenu.java From Coloring-book with Apache License 2.0 | 6 votes |
@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"); }
Example #4
Source File: RecipeItemDetailFragment.java From android-recipes-app with Apache License 2.0 | 5 votes |
@Override public void onStart() { super.onStart(); final Tracker tracker = EasyTracker.getInstance(getActivity()); tracker.set(Fields.SCREEN_NAME, "Recipe Details"); tracker.send(MapBuilder.createAppView().build()); }
Example #5
Source File: HelloActivity.java From catnut with MIT License | 5 votes |
@Override protected void onStart() { super.onStart(); if (mTracker != null) { mTracker.send(MapBuilder.createAppView().set(Fields.SCREEN_NAME, "auth").build()); mTracker.activityStart(this); } }
Example #6
Source File: TrackedFragment.java From flow-android with MIT License | 5 votes |
@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); }