com.google.analytics.tracking.android.Tracker Java Examples
The following examples show how to use
com.google.analytics.tracking.android.Tracker.
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: 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 #2
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 #3
Source File: MainMenu.java From Coloring-book with Apache License 2.0 | 6 votes |
@Override public void onActivityResult(int requestCode, int resultCode, Intent data) { if (requestCode == 1001) { if (resultCode == Activity.RESULT_OK) { try { Intent intent = new Intent(this, DrawerSliderActivity.class); intent.putExtra("pack", "pack2"); startActivity(intent); Tracker tracker = GoogleAnalytics.getInstance(this).getTracker("UA-51610813-3"); tracker.send(MapBuilder .createEvent("Buy", "pack", "item_bouth", null) .build()); } catch (Exception e) { e.printStackTrace(); } } } }
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: DrawerActivity.java From Coloring-book with Apache License 2.0 | 5 votes |
public void finish_anim() { Animation animFadein = AnimationUtils.loadAnimation( getApplicationContext(), R.anim.slide_finish); level_finished.setVisibility(View.VISIBLE); animFadein.setAnimationListener(finish_anim); level_finished.startAnimation(animFadein); int count = screenH / 100; for (int i = 0; i < count; i++) { int id_image = 0; if (i % 2 == 0) id_image = R.drawable.star_pink; else id_image = R.drawable.star_white; ParticleSystem ps = new ParticleSystem(this, 100, id_image, 800); ps.setScaleRange(0.7f, 1.3f); ps.setSpeedRange(0.2f, 0.5f); ps.setRotationSpeedRange(90, 180); ps.setFadeOut(200, new AccelerateInterpolator()); int xStart = (int) (screenW * Math.random()); int yStart = (int) (screenH * Math.random()); ps.oneShot(xStart, yStart, 70); } final Animation scale = AnimationUtils.loadAnimation( getApplicationContext(), R.anim.scale_anim); homeBtn.startAnimation(scale); Tracker tracker = GoogleAnalytics.getInstance(this).getTracker("UA-51610813-3"); tracker.send(MapBuilder .createEvent("Level", packName, "finish_drawing_" + level, null) .build()); }
Example #6
Source File: MainMenu.java From Coloring-book with Apache License 2.0 | 5 votes |
@Override public void onClick(View v) { switch (v.getId()) { case R.id.pack1_button: Intent intent = new Intent(this, DrawerSliderActivity.class); intent.putExtra("pack", "pack1"); startActivity(intent); break; case R.id.pack2_button: Tracker tracker = GoogleAnalytics.getInstance(this).getTracker("UA-51610813-3"); tracker.send(MapBuilder .createEvent("Buy", "pack", "try_to_buy", null) .build()); if (deviceHasGoogleAccount()) buyClick(v); else { tracker.send(MapBuilder .createEvent("Buy", "pack", "no_account", null) .build()); } break; } }
Example #7
Source File: BroadsheetApplication.java From Broadsheet.ie-Android with MIT License | 4 votes |
public Tracker getTracker() { return mGaTracker; }