mercoledì 3 giugno 2015

Add Analytics on android

Update your project's AndroidManifest.xml file to include the INTERNET and ACCESS_NETWORK_STATEpermissions

 xmlns:android="http://schemas.android.com/apk/res/android"
          package="com.example.analytics">

     android:name="android.permission.INTERNET"/>
     android:name="android.permission.ACCESS_NETWORK_STATE"/>

            android
  1. Add the dependency to your project's top-level build.gradle:
    classpath 'com.google.gms:google-services:1.0'
  2. Add the plugin to your app-level build.gradle:
    apply plugin: 'com.google.gms.google-services'
Now, you need to add a dependency for Google Play Services. Inside your app's build.gradle add:
  compile 'com.google.android.gms:play-services-analytics:7.3.0'