amplitude / Amplitude-Kotlin

Amplitude Kotlin SDK
MIT License
27 stars 10 forks source link

Is there a way to change optOut value after configuring it initially? #136

Closed satyajitvure91 closed 1 year ago

satyajitvure91 commented 1 year ago

Summary

I'm trying to change the optOut value depending the user permission but I'm not able to. Is there a way to change this configuration?

yuhao900914 commented 1 year ago

Hi, @satyajitvure91, thanks for choosing Amplitude. Yes. The configuration can also be set after initialization. You can call like the following:

        amplitude = Amplitude(
            Configuration(
                apiKey = "xxx",
                context = applicationContext,
            )
        )
        amplitude.configuration.optOut = true
yuhao900914 commented 1 year ago

Please check here for more details. Thanks.