New Relic users often write in to Support with different questions about their Android App’s behaviour or have questions about incomplete/incorrect data, such as app launch count. If you are experiencing any of these issues, it may help to review the Android agent install documentation.
What do I do?
The first step is to go over the installation steps outlined in our docs to check if anything was missed. We can’t overemphasize the importance of initializing Android agent in the onCreate() method of the default activity class defined in the AndroidManifest - this is typically MainActivity class. Starting the agent in another class is not supported and can cause unexpected or unstable behavior.
One known side effect of starting the agent in another class, such as the Application class, is Inflated app launch count. Background services like push notifications can instantiate the Application class which causes the agent to count additional app launches.
But what if I use deep linking and have multiple default activities?
No worries, here is another Level-up post called Relic Solution: Android initialization and deep linking that dives into the recommended options for initializing Android agent in multiple default activity classes.
Let us know if you have questions by replying in this thread.