0

GLOBAL TRACKER

<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:tools="http://schemas.android.com/tools" tools:ignore="TypographyDashes">
    <string name="ga_logLevel">verbose</string>
    <int name="ga_dispatchPeriod">2</int>
    <bool name="ga_dryRun">false</bool>         
</resources>

APP TRACKER

<resources xmlns:tools="http://schemas.android.com/tools" tools:ignore="TypographyDashes">
    <string name="ga_trackingId">UA-XXXXXXX-1</string>
    <string name="ga_sampleFrequency">100.0</string>
    <integer name="ga_sessionTimeout">30</integer>
    <!-- <bool name="ga_reportUncaughtExceptions">true</bool> -->
    <bool name="ga_autoActivityTracking">true</bool> 
    <screenNa me name="com.myapp.application.MyAppStartActivity">MyAppStartActivity</screenName>
</resources>

and In my app MyAppStartActivity.java I hit GA first time

Tracker t = ((DilboleApplication) this.getApplication()).getTracker(
                TrackerName.APP_TRACKER);
t.setScreenName(SplashScreenActivity.class.getSimpleName());
t.send(new HitBuilders.AppViewBuilder().build());

PROBLEM:

  1. Access app for sometime

  2. Goto recent apps

  3. Clear my app from recent apps.

  4. Open app again.

I Get BLACK SCREEN and its because UI thread is block by Google Analytics code. If i remove GA code from activity it works without any issue.

What would be solution for this. How should I make GoogleAnalytics instance not block my UI thread when app is cleared from recent apps.

duggu
  • 37,191
  • 12
  • 114
  • 111
Kira
  • 91
  • 2
  • 7

0 Answers0