What is the best way to track an "app opened" metric for Android?
I'm integrating with Mixpanel, which lets you track arbitrary events for your app. 开发者_开发问答I want to track how often the Android app is opened.
Is there a central place where I can put code that runs every time the app is opened, regardless of activity?
You can track if it was started from the launcher by tracking Intent parameters in your Main Activity. Or if you want to track how many times this screen was started, u could put your tracking code inside onStart of your activity.
精彩评论