java - Integrating Google Analytics in Android? -


i'm trying integrate google analytics app it's not sending me report or anything. followed this guide google, pasted .jar file in libs folder, set build path, did guide told me to, nothing. no errors when run on emulator not reports , log-cat not showing anything. doing wrong? thanks!!

my main activity class:

public class startingpoint extends activity { public class mytrackedactivity extends activity {     @override       public void oncreate(bundle savedinstancestate) {         super.oncreate(savedinstancestate);       }        @override       public void onstart() {         super.onstart();         // rest of onstart() code.         easytracker.getinstance().activitystart(this); // add method.         }        @override       public void onstop() {         super.onstop();        // rest of onstop() code.         easytracker.getinstance().activitystop(this); // add method.       }     }  public final static string extra_message = "com.primarycode.punnyjokes.message"; //public static int iteration = 1;  @override protected void oncreate(bundle savedinstancestate) {     super.oncreate(savedinstancestate);     setcontentview(r.layout.activity_starting_point);  } 

analytics.xml in values

<?xml version="1.0" encoding="utf-8" ?>  <resources>   <!--replace placeholder id tracking id-->   <string name="ga_trackingid">ua-43160348-1</string>    <!--enable automatic activity tracking-->   <bool name="ga_autoactivitytracking">true</bool>   <bool name="ga_dryrun">false</bool>    <!--enable automatic exception tracking-->   <bool name="ga_reportuncaughtexceptions">true</bool>  </resources> 

you've forgotten initing easytracker. in oncreate of application class of project.

oncreate(){     super.oncreate();     easytracker.getinstance().setcontext(this); } 

Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -