Back to project page NYU-BusTracker-Android.
The source code is released under:
Apache License
If you think the Android project NYU-BusTracker-Android listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.nyubustracker; /*ww w.ja va 2s. c o m*/ import android.app.Application; import com.google.android.gms.analytics.GoogleAnalytics; import com.google.android.gms.analytics.Tracker; import com.nyubustracker.R; import com.nyubustracker.activities.MainActivity; public class NYUBusTrackerApplication extends Application { Tracker tracker = null; public NYUBusTrackerApplication() { super(); } public synchronized Tracker getTracker() { if (tracker == null) { GoogleAnalytics analytics = GoogleAnalytics.getInstance(this); tracker = analytics.newTracker(R.xml.app_tracker); String id = MainActivity.LOCAL_LOGV ? getString(R.string.google_analytics_debug_tracker) : getString(R.string.google_analytics_tracker); tracker.setAppId(id); } return tracker; } }