Вопрос

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.

Это было полезно?

Решение

  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.

Другие советы

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

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top