0

I'm using Flurry (Flurry is a solution for analytics tracking on mobile devices) in my unity3D game for wp8.

I have many logEvents in my game and some of them with params. All of them correctly showed in flurry Global Event Logs after about 30 min. But when application deactivated (for example when entering a marketplace to perform in-app purchase) and when coming back no more events come to flurry. Flurry pause session on Application_Deactivated event and on Application_Activated i call StartSession("myAppID") but it seems like it doesn't resume session and doesn't run another.

I recieved flurry logevent after reactivating app only one time and i can't repeat this again. Tryed Start session on UI and on Unity Thread. Steel don't know what to do. Where can be a problem, why it doesn't work?

David
  • 15,894
  • 22
  • 55
  • 66
Vladislav
  • 297
  • 3
  • 13

2 Answers2

0

You are not required to Pause session by your self. Flurry handles Pause session and End session by itself.

You only have to start session on Launching and Activating.

Hamza Hasan
  • 1,368
  • 9
  • 17
0

This is what I have done for my unity project. InitFlurry calls the static method onStartSession whereas EndFlurry calls the static method onEndSession. Hope it helps.

void OnApplicationPause ()
{
    if(isAppPause)
    {
        isAppPause = !isAppPause;
        InitFlurry();
    }
    else
    {
        isAppPause = !isAppPause;
        EndFlurry();
    }
}
KennethLJJ
  • 157
  • 3
  • 12
  • EndFlurry will automatically call when app will be in background for more than 10 seconds by default. – Hamza Hasan Apr 01 '14 at 10:59
  • I changed the default timeout to accommodate short calls. Therefore I am calling EndFlurry so as to have a better gauge of the session length. – KennethLJJ Apr 11 '14 at 02:42