2

I am currently implementing Flurry Analytics for my Unity Android Project. I have a question in mind when I came across the implementation guide provided by Flurry. In order to send data to the Flurry servers, the start and end function for flurry have to pass in the same Activity parameter.

I am currently using AndroidJavaClass to call upon the functions in the jar file passing in Unity's currentActivity.

Here comes my question, Does Unity's currentActivity changes when the scene changes? Or does it change at any point of time? This is important as the activity is used as a parameter to start/stop the flurry session.

2 Answers 2

2
  1. Unity uses single activity throughout. So Unity doesn't changes its current activity which is com.unity3d.player.UnityPlayerActivity if you check it in AndroidManifest.xml file.

  2. Unity Only changes activity whenever you launche anything native thing or video to com.unity3d.player.UnityPlayerNativeActivity or com.unity3d.player.VideoPlayer. These are just examples.

1
  • 1
    Thanks a lot. Only need to know that unity uses UnityPlayerActivity throughout unless something else launches another activity.
    – KennethLJJ
    Jan 16, 2014 at 4:45
1

You may want to repost your question at Unity Answers as it gets a lot more traffic and it's more likely to be answered: http://answers.unity3d.com/index.html

As for your question, I believe the entire Unity lifecycle resides on a single Activity. You may want to get familiar with the Android project which Unity generates, which can be found under the temp/StagingArea directory in your project directory.

You may also want to take a look at this link for details on how to access and modify the project through Eclipse: http://forum.unity3d.com/threads/71607-Integrating-Unity-and-Eclipse

1
  • Thanks a lot. Have been to unity forum too and was hoping to get some ans. The integrating Unity and Eclipse is a hassle thou. I personally don't really recommend that as Unity have already provided with the necessary tools to work with the java side (eg. AndroidJavaClass and JNIHelper)
    – KennethLJJ
    Jan 16, 2014 at 4:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.