Skip to content
New issue

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

How to disable trackingSessionEvent? #65

Closed
scana opened this issue Sep 6, 2022 · 5 comments
Closed

How to disable trackingSessionEvent? #65

scana opened this issue Sep 6, 2022 · 5 comments
Labels
question Further information is requested

Comments

@scana
Copy link

scana commented Sep 6, 2022

Summary

Hi! Is there any preferred way to disable trackingSessionEvent property on Android?
I see that Android-supported initialisation method only allows to modify the existing configuration, which in turn declares trackingSessionEvent as a val.

fun Amplitude(apiKey: String, context: Context, configs: Configuration.() -> Unit): com.amplitude.android.Amplitude {
    val config = Configuration(apiKey, context)
    configs.invoke(config)
    return com.amplitude.android.Amplitude(config)
}

EDIT:
Should I just do this?

val amplitude = Amplitude(Configuration(apiKey, context))
@scana scana added the question Further information is requested label Sep 6, 2022
@qingzhuozhen
Copy link
Contributor

Hi @scana, yeah, in the second way you can declare trackingSessionEvents to be false.

@liuyang1520 @justin-fiedler maybe we should turn that value in config to var to prevent future confusion.

@liuyang1520
Copy link
Collaborator

@qingzhuozhen , do you mean this part?

@qingzhuozhen
Copy link
Contributor

@liuyang1520 yeah, that is correct.

@liuyang1520
Copy link
Collaborator

@qingzhuozhen , I create a PR #68 for updating this, PTAL!

@liuyang1520
Copy link
Collaborator

Merged and released in v1.3.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants