We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I have a project with multiple activities and fragments. So what is the best way to use Mixpanel? ( I would like to track the whole application)
any advice is appreciated.
The text was updated successfully, but these errors were encountered:
Incase anyone needs this. The best advice I would give is that make MIxpanelApi singleton and then access the singleton in all the other classes.
`class MixPanelUtils private constructor(context : Context) { private val mixPanel: MixpanelAPI = MixpanelAPI.getInstance(context, BuildConfig.MIXPANEL_TOKEN)
companion object { @Volatile private var instance: MixPanelUtils? = null fun getInstance(context: Context) = instance ?: synchronized(this) { instance ?: MixPanelUtils(context).also { instance = it } } }
}`
Sorry, something went wrong.
No branches or pull requests
I have a project with multiple activities and fragments. So what is the best way to use Mixpanel? ( I would like to track the whole application)
any advice is appreciated.
The text was updated successfully, but these errors were encountered: