简体   繁体   中英

Flurry analytics not reporting any updates on android

In my application i have added flurry analytic but even after days of adding it. i don't see any updates on the dashboard. could any one help me on 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 am calling the below line on splash

BaseActivity.StartSession(getApplicationContext());

I have done the integration as recommended by the documentation. I have created a BaseActivity that will be extended by my activities. 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

It's very important you never pass an Application Context to FlurryAgent.onStartSession(). As I recall, you should only ever pass Activity or Service contexts.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM