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

Fix a bug where Analytics is always enabled even Analytics is set to "Enable in JavaScript" #117

Merged
merged 2 commits into from
Sep 18, 2017

Conversation

dhei
Copy link
Member

@dhei dhei commented Sep 18, 2017

Issue: When Analytics is set to "Enable in JavaScript" in the following question in react-native link:

For the [platform] app, should user tracking be enabled automatically ? (Use arrow keys)
          Enable Automatically
        > Enable in JavaScript

Analytics is supposed to remain disabled until await Analytics.setEnabled(true); called in JavaScript code. But Analytics is not disabled in this case. This issue exists in both iOS and Android. It is not affecting other services (e.g. Crashes service).

Root cause: Analytics.setEnabled(false); should not be called before Analytics service is started.

Fix: Start Analytics before calling .setEnabled(false).

@msftclas
Copy link

@dhei,
Thanks for your contribution as a Microsoft full-time employee or intern. You do not need to sign a CLA.
Thanks,
Microsoft Pull Request Bot

@guperrot guperrot merged commit c9af69c into develop Sep 18, 2017
@guperrot guperrot deleted the fix/analytics-setenabled-bug branch September 18, 2017 23:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants