Commit 7e2c8fda authored by Matthieu PASCAUD's avatar Matthieu PASCAUD

Remove any call to Google Analytics

Disable Google Analytics library in build.gradle
parent b570e1aa
...@@ -4,7 +4,7 @@ buildscript { ...@@ -4,7 +4,7 @@ buildscript {
jcenter() jcenter()
} }
dependencies { dependencies {
classpath 'com.android.tools.build:gradle:1.0.0' classpath 'com.android.tools.build:gradle:2.2.2'
} }
} }
......
#Wed Apr 10 15:27:10 PDT 2013 #Mon Nov 21 11:20:57 CET 2016
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.2.1-all.zip distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip
...@@ -13,8 +13,8 @@ android { ...@@ -13,8 +13,8 @@ android {
config { config {
keyAlias 'Stavor' keyAlias 'Stavor'
keyPassword '2TqXSDgA' keyPassword '2TqXSDgA'
storeFile file('D:/Users/xgibert/CS/Projets/Stavor_files/Release/Keys_CS_Mobile/releaseKey') //storeFile file('D:/Users/xgibert/CS/Projets/Stavor_files/Release/Keys_CS_Mobile/releaseKey')
storePassword '2TqXSDgA' //storePassword '2TqXSDgA'
} }
} }
compileSdkVersion 21 compileSdkVersion 21
...@@ -72,7 +72,6 @@ dependencies { ...@@ -72,7 +72,6 @@ dependencies {
//compile project(':crosswalkwebview103923515arm') //compile project(':crosswalkwebview103923515arm')
//compile 'org.xwalk:xwalk_core_library:10.39.235.15' //compile 'org.xwalk:xwalk_core_library:10.39.235.15'
compile 'org.xwalk:xwalk_core_library:13.42.319.11' compile 'org.xwalk:xwalk_core_library:13.42.319.11'
compile 'com.google.android.gms:play-services:+'
compile 'com.android.support:multidex:1.0.+' compile 'com.android.support:multidex:1.0.+'
compile 'com.android.support:appcompat-v7:21.0.3' compile 'com.android.support:appcompat-v7:21.0.3'
compile files('libs/gson-2.2.4.jar') compile files('libs/gson-2.2.4.jar')
......
...@@ -14,8 +14,6 @@ import android.view.View; ...@@ -14,8 +14,6 @@ import android.view.View;
import android.widget.ImageView; import android.widget.ImageView;
import android.widget.TextView; import android.widget.TextView;
import com.google.android.gms.analytics.HitBuilders;
import com.google.android.gms.analytics.Tracker;
/** /**
* Activity to show the app About screen * Activity to show the app About screen
...@@ -89,18 +87,7 @@ public class AboutActivity extends Activity { ...@@ -89,18 +87,7 @@ public class AboutActivity extends Activity {
ImageView img_jocs = (ImageView) findViewById(R.id.imageView2); ImageView img_jocs = (ImageView) findViewById(R.id.imageView2);
img_jocs.setOnClickListener(new View.OnClickListener(){ img_jocs.setOnClickListener(new View.OnClickListener(){
public void onClick(View v){ public void onClick(View v){
//********** Google Analytics ***********
// Get tracker.
Tracker t = ((StavorApplication) getApplication()).getTracker(
StavorApplication.TrackerName.APP_TRACKER);
t.setScreenName("About");
t.send(new HitBuilders.EventBuilder()
.setCategory("Link")
.setAction("JOCS")
.setLabel("JOCS")
.setValue(1)
.build());
//***************************************
Intent intent = new Intent(); Intent intent = new Intent();
intent.setAction(Intent.ACTION_VIEW); intent.setAction(Intent.ACTION_VIEW);
......
...@@ -16,12 +16,8 @@ import java.util.ArrayList; ...@@ -16,12 +16,8 @@ import java.util.ArrayList;
//import org.xwalk.core.XWalkSettings; //import org.xwalk.core.XWalkSettings;
import org.xwalk.core.XWalkView; import org.xwalk.core.XWalkView;
import com.google.android.gms.analytics.HitBuilders;
import com.google.android.gms.analytics.Tracker;
import unused.WelcomeDialogFragment; import unused.WelcomeDialogFragment;
import cs.si.stavor.R; import cs.si.stavor.R;
import cs.si.stavor.StavorApplication.TrackerName;
import cs.si.stavor.app.Installer; import cs.si.stavor.app.Installer;
import cs.si.stavor.app.OrekitInit; import cs.si.stavor.app.OrekitInit;
import cs.si.stavor.app.Parameters; import cs.si.stavor.app.Parameters;
...@@ -507,18 +503,7 @@ public class MainActivity extends ActionBarActivity implements ...@@ -507,18 +503,7 @@ public class MainActivity extends ActionBarActivity implements
private ShareActionProvider mShareActionProvider; private ShareActionProvider mShareActionProvider;
private void launchMarket() { private void launchMarket() {
//********** Google Analytics ***********
// Get tracker.
Tracker t = ((StavorApplication) getApplication()).getTracker(
TrackerName.APP_TRACKER);
t.setScreenName("Menu");
t.send(new HitBuilders.EventBuilder()
.setCategory("Menu")
.setAction("Rate")
.setLabel("Rate")
.setValue(1)
.build());
//***************************************
Uri uri = Uri.parse("market://details?id=" + getPackageName()); Uri uri = Uri.parse("market://details?id=" + getPackageName());
Intent myAppLinkToMarket = new Intent(Intent.ACTION_VIEW, uri); Intent myAppLinkToMarket = new Intent(Intent.ACTION_VIEW, uri);
......
...@@ -8,11 +8,6 @@ import org.orekit.time.DateTimeComponents; ...@@ -8,11 +8,6 @@ import org.orekit.time.DateTimeComponents;
import org.orekit.time.TimeScale; import org.orekit.time.TimeScale;
import org.orekit.time.TimeScalesFactory; import org.orekit.time.TimeScalesFactory;
import com.google.android.gms.analytics.HitBuilders;
import com.google.android.gms.analytics.Tracker;
import cs.si.stavor.R;
import cs.si.stavor.StavorApplication.TrackerName;
import cs.si.stavor.app.Parameters; import cs.si.stavor.app.Parameters;
import cs.si.stavor.database.SerializationUtil; import cs.si.stavor.database.SerializationUtil;
import cs.si.stavor.database.MissionReaderContract.MissionEntry; import cs.si.stavor.database.MissionReaderContract.MissionEntry;
...@@ -130,20 +125,7 @@ public class MissionActivity extends Activity{ ...@@ -130,20 +125,7 @@ public class MissionActivity extends Activity{
if(isEdit){ if(isEdit){
//Update register with new name and serialized //Update register with new name and serialized
if(editMission()){ if(editMission()){
//********** Google Analytics ***********
// Get tracker.
Tracker t = ((StavorApplication) getApplication()).getTracker(
TrackerName.APP_TRACKER);
t.setScreenName("MissionEditor");
t.send(new HitBuilders.EventBuilder()
.setCategory("MissionEditor")
.setAction("Edit")
.setLabel(mission.mission.name)
.setValue(1)
.build());
//***************************************
//((StavorApplication)getApplication()).loader.reset();
finish(); finish();
}else{ }else{
Toast.makeText(getApplicationContext(), getString(R.string.mission_error_edit), Toast.LENGTH_LONG).show(); Toast.makeText(getApplicationContext(), getString(R.string.mission_error_edit), Toast.LENGTH_LONG).show();
...@@ -151,18 +133,6 @@ public class MissionActivity extends Activity{ ...@@ -151,18 +133,6 @@ public class MissionActivity extends Activity{
}else{ }else{
//Create new register in db //Create new register in db
if(addMission()){ if(addMission()){
//********** Google Analytics ***********
// Get tracker.
Tracker t = ((StavorApplication) getApplication()).getTracker(
TrackerName.APP_TRACKER);
t.setScreenName("MissionEditor");
t.send(new HitBuilders.EventBuilder()
.setCategory("MissionEditor")
.setAction("Create")
.setLabel(mission.mission.name)
.setValue(1)
.build());
//***************************************
//((StavorApplication)getApplication()).loader.reset(); //((StavorApplication)getApplication()).loader.reset();
finish(); finish();
......
package cs.si.stavor; package cs.si.stavor;
import com.google.android.gms.analytics.HitBuilders;
import com.google.android.gms.analytics.Tracker;
import cs.si.stavor.R;
import cs.si.stavor.StavorApplication.TrackerName;
import cs.si.stavor.database.StationsReaderContract.StationEntry; import cs.si.stavor.database.StationsReaderContract.StationEntry;
import cs.si.stavor.station.GroundStation; import cs.si.stavor.station.GroundStation;
import cs.si.stavor.station.StationAndId; import cs.si.stavor.station.StationAndId;
...@@ -68,18 +64,7 @@ public class StationActivity extends Activity{ ...@@ -68,18 +64,7 @@ public class StationActivity extends Activity{
if(isEdit){ if(isEdit){
//Update register with new name and serialized //Update register with new name and serialized
if(editStation()){ if(editStation()){
//********** Google Analytics ***********
// Get tracker.
Tracker t = ((StavorApplication) getApplication()).getTracker(
TrackerName.APP_TRACKER);
t.setScreenName("StationEditor");
t.send(new HitBuilders.EventBuilder()
.setCategory("StationEditor")
.setAction("Edit")
.setLabel(station.station.name)
.setValue(1)
.build());
//***************************************
//((StavorApplication)getApplication()).loader.reset(); //((StavorApplication)getApplication()).loader.reset();
finish(); finish();
...@@ -89,18 +74,7 @@ public class StationActivity extends Activity{ ...@@ -89,18 +74,7 @@ public class StationActivity extends Activity{
}else{ }else{
//Create new register in db //Create new register in db
if(addStation()){ if(addStation()){
//********** Google Analytics ***********
// Get tracker.
Tracker t = ((StavorApplication) getApplication()).getTracker(
TrackerName.APP_TRACKER);
t.setScreenName("StationEditor");
t.send(new HitBuilders.EventBuilder()
.setCategory("StationEditor")
.setAction("Create")
.setLabel(station.station.name)
.setValue(1)
.build());
//***************************************
//((StavorApplication)getApplication()).loader.reset(); //((StavorApplication)getApplication()).loader.reset();
finish(); finish();
......
...@@ -3,9 +3,6 @@ package cs.si.stavor; ...@@ -3,9 +3,6 @@ package cs.si.stavor;
import java.util.HashMap; import java.util.HashMap;
import com.commonsware.cwac.loaderex.SQLiteCursorLoader; import com.commonsware.cwac.loaderex.SQLiteCursorLoader;
import com.google.android.gms.analytics.GoogleAnalytics;
import com.google.android.gms.analytics.Tracker;
import cs.si.stavor.app.Parameters; import cs.si.stavor.app.Parameters;
import cs.si.stavor.database.ReaderDbHelper; import cs.si.stavor.database.ReaderDbHelper;
import cs.si.stavor.web.WebAppInterface; import cs.si.stavor.web.WebAppInterface;
...@@ -49,34 +46,5 @@ public class StavorApplication extends MultiDexApplication { ...@@ -49,34 +46,5 @@ public class StavorApplication extends MultiDexApplication {
public String getSearchTerm() { public String getSearchTerm() {
return this.searchTerm; return this.searchTerm;
} }
//********************** GOOGLE ANALYTICS
/**
* Enum used to identify the tracker that needs to be used for tracking.
*
* A single tracker is usually enough for most purposes. In case you do need multiple trackers,
* storing them all in Application object helps ensure that they are created only once per
* application instance.
*/
public enum TrackerName {
APP_TRACKER, // Tracker used only in this app.
//GLOBAL_TRACKER, // Tracker used by all the apps from a company. eg: roll-up tracking.
//ECOMMERCE_TRACKER, // Tracker used by all ecommerce transactions from a company.
}
HashMap<TrackerName, Tracker> mTrackers = new HashMap<TrackerName, Tracker>();
public synchronized Tracker getTracker(TrackerName trackerId) {
GoogleAnalytics.getInstance(this).setAppOptOut(BuildConfig.DEBUG);
if (!mTrackers.containsKey(trackerId)) {
GoogleAnalytics analytics = GoogleAnalytics.getInstance(this);
/*Tracker t = (trackerId == TrackerName.APP_TRACKER) ? analytics.newTracker(PROPERTY_ID)
: (trackerId == TrackerName.GLOBAL_TRACKER) ? analytics.newTracker(R.xml.global_tracker)
: analytics.newTracker(R.xml.ecommerce_tracker);*/
Tracker t = analytics.newTracker(R.xml.tracker);
mTrackers.put(trackerId, t);
}
return mTrackers.get(trackerId);
}
} }
\ No newline at end of file
...@@ -12,7 +12,6 @@ public class Parameters { ...@@ -12,7 +12,6 @@ public class Parameters {
* *
*/ */
public static class App { public static class App {
//public static final String google_analytics_property_id = "UA-58638794-1";
public static final int splash_min_time_ms = 3000;//[ms] 3.0s min public static final int splash_min_time_ms = 3000;//[ms] 3.0s min
public static final boolean show_tests_section = false; public static final boolean show_tests_section = false;
......
package cs.si.stavor.app; package cs.si.stavor.app;
import com.google.android.gms.analytics.HitBuilders;
import com.google.android.gms.analytics.Tracker;
import cs.si.stavor.MainActivity; import cs.si.stavor.MainActivity;
import cs.si.stavor.R; import cs.si.stavor.R;
import cs.si.stavor.StavorApplication; import cs.si.stavor.StavorApplication;
import cs.si.stavor.StavorApplication.TrackerName;
import android.app.Activity; import android.app.Activity;
import android.app.Dialog; import android.app.Dialog;
import android.app.ActionBar.LayoutParams; import android.app.ActionBar.LayoutParams;
...@@ -46,13 +43,7 @@ public class RatingSystem { ...@@ -46,13 +43,7 @@ public class RatingSystem {
} }
private static void showSuggestion(final Activity activity, final SharedPreferences.Editor editor){ private static void showSuggestion(final Activity activity, final SharedPreferences.Editor editor){
//********** Google Analytics ***********
// Get tracker.
Tracker t = ((StavorApplication) activity.getApplication()).getTracker(
TrackerName.APP_TRACKER);
t.setScreenName(screenName);
t.send(new HitBuilders.AppViewBuilder().build());
//***************************************
final Handler handler = new Handler(); final Handler handler = new Handler();
handler.postDelayed(new Runnable() { handler.postDelayed(new Runnable() {
...@@ -87,19 +78,7 @@ public class RatingSystem { ...@@ -87,19 +78,7 @@ public class RatingSystem {
} }
activity.startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("market://details?id=" + activity.getPackageName()))); activity.startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("market://details?id=" + activity.getPackageName())));
dialog.dismiss(); dialog.dismiss();
//********** Google Analytics ***********
// Get tracker.
Tracker t = ((StavorApplication) activity.getApplication()).getTracker(
TrackerName.APP_TRACKER);
//t.setScreenName(screenName);
t.send(new HitBuilders.EventBuilder()
.setCategory(screenName)
.setAction("Rate")
.setLabel("Rate")
.setValue(1)
.build());
//***************************************
} }
}); });
ll.addView(b1); ll.addView(b1);
...@@ -114,18 +93,6 @@ public class RatingSystem { ...@@ -114,18 +93,6 @@ public class RatingSystem {
} }
dialog.dismiss(); dialog.dismiss();
//********** Google Analytics ***********
// Get tracker.
Tracker t = ((StavorApplication) activity.getApplication()).getTracker(
TrackerName.APP_TRACKER);
//t.setScreenName(screenName);
t.send(new HitBuilders.EventBuilder()
.setCategory(screenName)
.setAction("Remind")
.setLabel("Remind")
.setValue(1)
.build());
//***************************************
} }
}); });
ll.addView(b2); ll.addView(b2);
...@@ -140,18 +107,7 @@ public class RatingSystem { ...@@ -140,18 +107,7 @@ public class RatingSystem {
} }
dialog.dismiss(); dialog.dismiss();
//********** Google Analytics ***********
// Get tracker.
Tracker t = ((StavorApplication) activity.getApplication()).getTracker(
TrackerName.APP_TRACKER);
//t.setScreenName(screenName);
t.send(new HitBuilders.EventBuilder()
.setCategory(screenName)
.setAction("No")
.setLabel("No")
.setValue(1)
.build());
//***************************************
} }
}); });
ll.addView(b3); ll.addView(b3);
......
...@@ -3,13 +3,10 @@ package cs.si.stavor.fragments; ...@@ -3,13 +3,10 @@ package cs.si.stavor.fragments;
import org.xwalk.core.XWalkView; import org.xwalk.core.XWalkView;
import com.google.android.gms.analytics.HitBuilders;
import com.google.android.gms.analytics.Tracker;
import cs.si.stavor.R; import cs.si.stavor.R;
import cs.si.stavor.MainActivity; import cs.si.stavor.MainActivity;
import cs.si.stavor.StavorApplication; import cs.si.stavor.StavorApplication;
import cs.si.stavor.StavorApplication.TrackerName;
import cs.si.stavor.app.Parameters; import cs.si.stavor.app.Parameters;
import cs.si.stavor.model.Browsers; import cs.si.stavor.model.Browsers;
import cs.si.stavor.simulator.Simulator; import cs.si.stavor.simulator.Simulator;
...@@ -85,13 +82,6 @@ public final class HudFragment extends Fragment { ...@@ -85,13 +82,6 @@ public final class HudFragment extends Fragment {
public View onCreateView(LayoutInflater inflater, ViewGroup container, public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) { Bundle savedInstanceState) {
//********** Google Analytics ***********
// Get tracker.
Tracker t = ((StavorApplication) getActivity().getApplication()).getTracker(
TrackerName.APP_TRACKER);
t.setScreenName(screenName);
t.send(new HitBuilders.AppViewBuilder().build());
//***************************************
View rootView = inflater.inflate(R.layout.hud_display, container, View rootView = inflater.inflate(R.layout.hud_display, container,
false); false);
...@@ -309,20 +299,7 @@ public final class HudFragment extends Fragment { ...@@ -309,20 +299,7 @@ public final class HudFragment extends Fragment {
} }
views_menu.setText(com_view); views_menu.setText(com_view);
mXwalkView.load("javascript:changeView('"+command+"')", null); mXwalkView.load("javascript:changeView('"+command+"')", null);
//********** Google Analytics ***********
// Get tracker.
Tracker t = ((StavorApplication) getActivity().getApplication()).getTracker(
TrackerName.APP_TRACKER);
t.setScreenName(screenName);
t.send(new HitBuilders.EventBuilder()
.setCategory(screenName)
.setAction("ChangeView")
.setLabel(command)
.setValue(1)
.build());
//***************************************
return true; return true;
} }
}); });
......
...@@ -3,13 +3,9 @@ package cs.si.stavor.fragments; ...@@ -3,13 +3,9 @@ package cs.si.stavor.fragments;
import org.xwalk.core.XWalkView; import org.xwalk.core.XWalkView;
import com.google.android.gms.analytics.HitBuilders;
import com.google.android.gms.analytics.Tracker;
import cs.si.stavor.MainActivity; import cs.si.stavor.MainActivity;
import cs.si.stavor.R; import cs.si.stavor.R;
import cs.si.stavor.StavorApplication; import cs.si.stavor.StavorApplication;
import cs.si.stavor.StavorApplication.TrackerName;
import cs.si.stavor.app.Parameters; import cs.si.stavor.app.Parameters;
import cs.si.stavor.model.Browsers; import cs.si.stavor.model.Browsers;
import cs.si.stavor.simulator.Simulator; import cs.si.stavor.simulator.Simulator;
...@@ -81,14 +77,7 @@ public final class MapFragment extends Fragment { ...@@ -81,14 +77,7 @@ public final class MapFragment extends Fragment {
@Override @Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) { Bundle savedInstanceState) {
//********** Google Analytics ***********
// Get tracker.
Tracker t = ((StavorApplication) getActivity().getApplication()).getTracker(
TrackerName.APP_TRACKER);
t.setScreenName(screenName);
t.send(new HitBuilders.AppViewBuilder().build());
//***************************************
View rootView = inflater.inflate(R.layout.map_display, container, View rootView = inflater.inflate(R.layout.map_display, container,
false); false);
......
...@@ -3,13 +3,9 @@ package cs.si.stavor.fragments; ...@@ -3,13 +3,9 @@ package cs.si.stavor.fragments;
import org.xwalk.core.XWalkView; import org.xwalk.core.XWalkView;
import com.google.android.gms.analytics.HitBuilders;
import com.google.android.gms.analytics.Tracker;
import cs.si.stavor.R; import cs.si.stavor.R;
import cs.si.stavor.MainActivity; import cs.si.stavor.MainActivity;
import cs.si.stavor.StavorApplication; import cs.si.stavor.StavorApplication;
import cs.si.stavor.StavorApplication.TrackerName;
import cs.si.stavor.model.Browsers; import cs.si.stavor.model.Browsers;
import cs.si.stavor.simulator.Simulator; import cs.si.stavor.simulator.Simulator;
import android.annotation.SuppressLint; import android.annotation.SuppressLint;
...@@ -76,14 +72,7 @@ public final class OrbitFragment extends Fragment { ...@@ -76,14 +72,7 @@ public final class OrbitFragment extends Fragment {
@Override @Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) { Bundle savedInstanceState) {
//********** Google Analytics ***********
// Get tracker.
Tracker t = ((StavorApplication) getActivity().getApplication()).getTracker(
TrackerName.APP_TRACKER);
t.setScreenName(screenName);
t.send(new HitBuilders.AppViewBuilder().build());
//***************************************
View rootView = inflater.inflate(R.layout.orb_display, container, View rootView = inflater.inflate(R.layout.orb_display, container,
false); false);
......
...@@ -3,7 +3,6 @@ package cs.si.stavor.fragments; ...@@ -3,7 +3,6 @@ package cs.si.stavor.fragments;
import cs.si.stavor.R; import cs.si.stavor.R;
import cs.si.stavor.MainActivity; import cs.si.stavor.MainActivity;
import cs.si.stavor.StavorApplication; import cs.si.stavor.StavorApplication;
import cs.si.stavor.StavorApplication.TrackerName;
import cs.si.stavor.app.Parameters; import cs.si.stavor.app.Parameters;
import cs.si.stavor.database.MissionReaderContract; import cs.si.stavor.database.MissionReaderContract;
import cs.si.stavor.database.ReaderDbHelper; import cs.si.stavor.database.ReaderDbHelper;
...@@ -58,8 +57,7 @@ import android.widget.TextView; ...@@ -58,8 +57,7 @@ import android.widget.TextView;
import android.widget.ViewSwitcher; import android.widget.ViewSwitcher;
import com.commonsware.cwac.loaderex.SQLiteCursorLoader; import com.commonsware.cwac.loaderex.SQLiteCursorLoader;
import com.google.android.gms.analytics.HitBuilders;
import com.google.android.gms.analytics.Tracker;
/** /**
* Fragment to show all the simulator configurations * Fragment to show all the simulator configurations
...@@ -105,14 +103,7 @@ public final class SimulatorFragment extends Fragment implements LoaderCallbacks ...@@ -105,14 +103,7 @@ public final class SimulatorFragment extends Fragment implements LoaderCallbacks
@Override @Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) { Bundle savedInstanceState) {
//********** Google Analytics ***********
// Get tracker.
Tracker t = ((StavorApplication) getActivity().getApplication()).getTracker(
TrackerName.APP_TRACKER);
t.setScreenName(screenName);
t.send(new HitBuilders.AppViewBuilder().build());
//***************************************
View rootView = inflater.inflate(R.layout.sim, container, View rootView = inflater.inflate(R.layout.sim, container,
false); false);
...@@ -295,18 +286,7 @@ public final class SimulatorFragment extends Fragment implements LoaderCallbacks ...@@ -295,18 +286,7 @@ public final class SimulatorFragment extends Fragment implements LoaderCallbacks
ImageView img_orekit = (ImageView)rootView.findViewById(R.id.nav_item_icon); ImageView img_orekit = (ImageView)rootView.findViewById(R.id.nav_item_icon);
img_orekit.setOnClickListener(new View.OnClickListener(){ img_orekit.setOnClickListener(new View.OnClickListener(){
public void onClick(View v){ public void onClick(View v){
//********** Google Analytics ***********
// Get tracker.
Tracker t = ((StavorApplication) getActivity().getApplication()).getTracker(
StavorApplication.TrackerName.APP_TRACKER);
t.setScreenName("Simulator");
t.send(new HitBuilders.EventBuilder()
.setCategory("Link")
.setAction("Orekit")
.setLabel("Orekit")
.setValue(1)
.build());
//***************************************
Intent intent = new Intent(); Intent intent = new Intent();
intent.setAction(Intent.ACTION_VIEW); intent.setAction(Intent.ACTION_VIEW);
......
...@@ -3,7 +3,6 @@ package cs.si.stavor.fragments; ...@@ -3,7 +3,6 @@ package cs.si.stavor.fragments;
import cs.si.stavor.MainActivity; import cs.si.stavor.MainActivity;
import cs.si.stavor.R; import cs.si.stavor.R;
import cs.si.stavor.StavorApplication; import cs.si.stavor.StavorApplication;
import cs.si.stavor.StavorApplication.TrackerName;
import cs.si.stavor.database.MissionReaderContract; import cs.si.stavor.database.MissionReaderContract;
import cs.si.stavor.database.ReaderDbHelper; import cs.si.stavor.database.ReaderDbHelper;
import cs.si.stavor.database.StationsCursorAdapter; import cs.si.stavor.database.StationsCursorAdapter;
...@@ -33,8 +32,6 @@ import android.widget.Toast; ...@@ -33,8 +32,6 @@ import android.widget.Toast;
import android.widget.TextView; import android.widget.TextView;
import com.commonsware.cwac.loaderex.SQLiteCursorLoader; import com.commonsware.cwac.loaderex.SQLiteCursorLoader;
import com.google.android.gms.analytics.HitBuilders;
import com.google.android.gms.analytics.Tracker;
/** /**
* Fragment to show all the simulator configurations * Fragment to show all the simulator configurations
...@@ -72,14 +69,7 @@ public final class StationsFragment extends Fragment implements LoaderCallbacks< ...@@ -72,14 +69,7 @@ public final class StationsFragment extends Fragment implements LoaderCallbacks<
@Override @Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) { Bundle savedInstanceState) {