firebase / firebase/firebase-android-sdk
We need an equivalent of Fabric.isInitialized()
- Dominant language
- Java
- Stars
- 2.6k
- Forks
- 710
- Avg merge
- 2d 9h
- Merged PRs (30d)
- 31
Description
## What feature would you like to see?
The previous Fabric SDK had a method `Fabric.isInitialized()` that allowed you to check if Fabric was initialized before doing something like logging an exception. This allowed you to put a guard around methods in unit tests.
## How would you use it?
I would use it to put a guard around things that unit tests might touch when Firebase is not initialized. Example:
```
fun logException(ex: Throwable, nodeInfoCompat: AccessibilityNodeInfoCompat?) {
// We check to make sure Fabric is initialized or else the tests will fail - see above comment
if (Fabric.isInitialized()) {
crashSetParam(CrashParameters.ROOT_NODE, nodeInfoCompat.toString())
Crashlytics.logException(ex)
}
}
```
Contributor guide
Assessment
This issue has not been assessed yet.