Last active
June 11, 2020 14:23
-
-
Save ktvipin27/ed6a877c88d88e0ef31a5811bf97631d to your computer and use it in GitHub Desktop.
Sample application class with Timber configuration for pushing logs to Firebase realtime database.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class TimberRemoteApp : Application() { | |
| @SuppressLint("HardwareIds") | |
| override fun onCreate() { | |
| super.onCreate() | |
| if (BuildConfig.DEBUG) { | |
| val deviceId = Settings.Secure.getString(contentResolver, Settings.Secure.ANDROID_ID) | |
| val deviceDetails = DeviceDetails(deviceId) | |
| val remoteTree = TimberRemoteTree(deviceDetails) | |
| Timber.plant(remoteTree) | |
| } else { | |
| //TODO plant timber release tree. | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment