Created
September 29, 2014 16:58
-
-
Save DzikuVx/7a35738d7ef5ced9fd0b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package pl.spychalski.WeatherStation; | |
import android.app.Application; | |
import com.google.android.gms.analytics.GoogleAnalytics; | |
import com.google.android.gms.analytics.Tracker; | |
public class PogodaApplication extends Application { | |
private Tracker appTracker = null; | |
private static final String TRACKING_ID = "UA-xxxxxxx-xx"; | |
synchronized Tracker getTracker() { | |
if (appTracker == null) { | |
GoogleAnalytics analytics = GoogleAnalytics.getInstance(this); | |
appTracker = analytics.newTracker(TRACKING_ID); | |
} | |
return appTracker; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment