Flurry analytics does not report any updates on Android

In my application, I added analytical analysis, but even after adding it. I do not see any updates on the toolbar. could someone help me with this. thanks in advance,

public static void StartSession(Context context) {
    FlurryAgent.onStartSession(context, CommonKeys.APIKey_FLURRY);
    FlurryAgent.onEvent("App Started");
}

@Override
protected void onStart() {
    // TODO Auto-generated method stub
    super.onStart();
    FlurryAgent.onStartSession(this, CommonKeys.APIKey_FLURRY);

}

@Override
protected void onStop() {
    // TODO Auto-generated method stub
    super.onStop();
    FlurryAgent.onEndSession(this);
}

I call the line below for a splash

BaseActivity.StartSession(getApplicationContext());
+5
source share
2 answers

I did the integration as recommended in the documentation. I have created BaseActivitythat will be expanded by my actions. This code works for me ...

public class BaseActivity extends Activity {
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
    }

    @Override
    protected void onStart() {
        super.onStart();
        FlurryAgent.onStartSession(this, Constants.FLURRY_API_KEY);
    }

    @Override
    protected void onStop() {
        super.onStop();
        FlurryAgent.onEndSession(this);
    }
}

Logs from Flurry can be found in your LogCat, and they should look like this:

  4359            FlurryAgent  D  Initializing Flurry session
  4359            FlurryAgent  D  New session
  4359          TitleActivity  V  ::onResume::
  4359               Settings  W  Setting android_id has moved from android.provider.Settings.System to android.provider.Settings.Secure, returning read-only value.
  4359            FlurryAgent  I  loading persistent data: /data/data/com.xxxxxx/files/.flurryagent.-6ee7b2a3
  4359            FlurryAgent  D  Loading API key: ****************KT9C
  4359            FlurryAgent  D  Loading session reports
  4359            FlurryAgent  D  Persistent file loaded
  4359            FlurryAgent  D  generating report
  4359            FlurryAgent  D  Sending report to: http://data.flurry.com/aap.do
  4359            FlurryAgent  D  Report successful
  4359            FlurryAgent  D  Processing report response
  4359            FlurryAgent  D  Done sending initial agent report
+1
source

It is very important that you never pass the application context to FlurryAgent.onStartSession (). As far as I remember, you should only skip the contexts of Activity or Service.

+1

All Articles