Q:

First Android app: I want to track with Google Analytics before I publish it

I want to publish my first Android app and I've just managed to implement Google Analytics (GA) with this code in my main class within the onCreate method:
    // gA Tracking
    Tracker t = ((gA) getApplication()).getTracker(gA.TrackerName.APP_TRACKER);
    t.setScreenName("MainActivity");
    //Send a screen view.
    t.send(new HitBuilders.ScreenViewBuilder().build());
    // Set the log level to verbose.
    GoogleAnalytics.getInstance(this).getLogger().setLogLevel(Logger.LogLevel.VERBOSE);

But it seems I can't get any results in GA. For example if I want to see real-time users. There has to be 1 user (which is me), but it shows zero (0).
1. Is this because I've just set up GA for this mobile app or doesn't it work locally?
2. Do I have to put this code in every activity I want to track or does this track my whole app already?
I just want to make sure that I've implemented GA it correctly before I would publish the app and won't get any results then.

A:

The answer for your second question

You can manually give, in which ever activity you need to track the screen as you have previously given in the above activity.
If you want GA to track all the screens, just specify 
< bool name="ga_autoActivityTracking" >true< /bool >

in the configurations XML.

The above will automatically track all screens for you. If you want to see a clean report without gettings the names of your screen as per your package identifier like com.example.myapp.screen1

You should mention the screen names in the Configuration XML file like
< screenName name="com.yourapp.ScreenviewFragment" >
    ScreenViewSampleScreen
< /screenName >
in the configuration XML.

