Loading Android.mk +1 −1 Original line number Diff line number Diff line Loading @@ -2,7 +2,7 @@ LOCAL_PATH:= $(call my-dir) include $(CLEAR_VARS) LOCAL_JAVA_LIBRARIES := bouncycastle telephony-common LOCAL_STATIC_JAVA_LIBRARIES := guava android-support-v4 jsr305 LOCAL_STATIC_JAVA_LIBRARIES := guava android-support-v4 jsr305 libGoogleAnalyticsV2 LOCAL_MODULE_TAGS := optional Loading res/values/analytics.xml 0 → 100644 +12 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8" ?> <resources> <!--Replace placeholder ID with your tracking ID--> <string name="ga_trackingId">UA-39737599-1</string> <!--Enable automatic activity tracking--> <bool name="ga_autoActivityTracking">false</bool> <!--Enable automatic exception tracking--> <bool name="ga_reportUncaughtExceptions">false</bool> </resources> No newline at end of file src/com/android/settings/cmstats/ReportingService.java +12 −0 Original line number Diff line number Diff line Loading @@ -31,6 +31,11 @@ import org.apache.http.message.BasicNameValuePair; import java.util.ArrayList; import java.util.List; import com.google.analytics.tracking.android.GoogleAnalytics; import com.google.analytics.tracking.android.Tracker; import com.android.settings.R; public class ReportingService extends Service { protected static final String TAG = "CMStats"; Loading Loading @@ -71,6 +76,13 @@ public class ReportingService extends Service { Log.d(TAG, "SERVICE: Carrier=" + deviceCarrier); Log.d(TAG, "SERVICE: Carrier ID=" + deviceCarrierId); // report to google analytics GoogleAnalytics ga = GoogleAnalytics.getInstance(this); Tracker tracker = ga.getTracker(getString(R.string.ga_trackingId)); tracker.sendEvent(deviceName, deviceVersion, deviceCountry, null); tracker.close(); // report to the cmstats service HttpClient httpclient = new DefaultHttpClient(); HttpPost httppost = new HttpPost("http://stats.cyanogenmod.com/submit"); try { Loading Loading
Android.mk +1 −1 Original line number Diff line number Diff line Loading @@ -2,7 +2,7 @@ LOCAL_PATH:= $(call my-dir) include $(CLEAR_VARS) LOCAL_JAVA_LIBRARIES := bouncycastle telephony-common LOCAL_STATIC_JAVA_LIBRARIES := guava android-support-v4 jsr305 LOCAL_STATIC_JAVA_LIBRARIES := guava android-support-v4 jsr305 libGoogleAnalyticsV2 LOCAL_MODULE_TAGS := optional Loading
res/values/analytics.xml 0 → 100644 +12 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8" ?> <resources> <!--Replace placeholder ID with your tracking ID--> <string name="ga_trackingId">UA-39737599-1</string> <!--Enable automatic activity tracking--> <bool name="ga_autoActivityTracking">false</bool> <!--Enable automatic exception tracking--> <bool name="ga_reportUncaughtExceptions">false</bool> </resources> No newline at end of file
src/com/android/settings/cmstats/ReportingService.java +12 −0 Original line number Diff line number Diff line Loading @@ -31,6 +31,11 @@ import org.apache.http.message.BasicNameValuePair; import java.util.ArrayList; import java.util.List; import com.google.analytics.tracking.android.GoogleAnalytics; import com.google.analytics.tracking.android.Tracker; import com.android.settings.R; public class ReportingService extends Service { protected static final String TAG = "CMStats"; Loading Loading @@ -71,6 +76,13 @@ public class ReportingService extends Service { Log.d(TAG, "SERVICE: Carrier=" + deviceCarrier); Log.d(TAG, "SERVICE: Carrier ID=" + deviceCarrierId); // report to google analytics GoogleAnalytics ga = GoogleAnalytics.getInstance(this); Tracker tracker = ga.getTracker(getString(R.string.ga_trackingId)); tracker.sendEvent(deviceName, deviceVersion, deviceCountry, null); tracker.close(); // report to the cmstats service HttpClient httpclient = new DefaultHttpClient(); HttpPost httppost = new HttpPost("http://stats.cyanogenmod.com/submit"); try { Loading