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

Android: Prevent error when initializing second time #13

Merged
merged 2 commits into from
Apr 19, 2018
Merged

Android: Prevent error when initializing second time #13

merged 2 commits into from
Apr 19, 2018

Conversation

m1ga
Copy link
Collaborator

@m1ga m1ga commented Apr 19, 2018

No description provided.

Copy link
Owner

@hansemannn hansemannn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a use case for initializing Firebase twice? We should at least throw a warning I think.

@m1ga
Copy link
Collaborator Author

m1ga commented Apr 19, 2018

It shouldn't be initialized a second time but depending on where you put the configure() it will re-run by accident and will throw an error. This would just prevent the error from happening. I've added a log warning

@hansemannn
Copy link
Owner

Got you! From a developer perspective, it's easier, but in the end, the developer should select the place to initialize the SDK properly instead of just hoping it will be handled gracefully. I will merge the PR now, since it does not break anything and helps developers fixing their code.

@hansemannn hansemannn merged commit becad1f into hansemannn:master Apr 19, 2018
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.

2 participants