Back to project page piwik-sdk-android.
The source code is released under:
Copyright 2014 Piwik team All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redi...
If you think the Android project piwik-sdk-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.
/* * Android SDK for Piwik/*from w w w. j a v a 2 s . co m*/ * * @link https://github.com/piwik/piwik-android-sdk * @license https://github.com/piwik/piwik-sdk-android/blob/master/LICENSE BSD-3 Clause */ package org.piwik.sdk; import android.app.Application; import android.util.Log; import java.net.MalformedURLException; public abstract class PiwikApplication extends Application { Tracker piwikTracker; public Piwik getGlobalSettings(){ return Piwik.getInstance(this); } public Tracker getTracker() { if (piwikTracker != null) { return piwikTracker; } try { piwikTracker = getGlobalSettings().newTracker(getTrackerUrl(), getSiteId(), getAuthToken()); } catch (MalformedURLException e) { Log.i(Tracker.LOGGER_TAG, getTrackerUrl()); Log.w(Tracker.LOGGER_TAG, "url is malformed", e); return null; } return piwikTracker; } public String getTrackerUrl() { return ""; } public String getAuthToken() { return ""; } public Integer getSiteId() { return 1; } }