Simple dialog which lets to check the logs from Timber. Logs can be shared as .log
file.
Based on the dialog from u2020 app.
Add it in your root build.gradle
:
allprojects {
repositories {
// ...
maven { url "https://jitpack.io" }
}
}
Add the dependency:
dependencies {
debugImplementation 'com.github.antonygolovin:timberdialog:0.1'
}
Use LumberYard
class:
class App : Application() {
override fun onCreate() {
super.onCreate()
Timber.plant(Timber.DebugTree())
LumberYard.getInstance(this).let {
it.cleanUp()
Timber.plant(it.tree())
}
}
}
Add provider inside <application>
node:
<provider
android:name="android.support.v4.content.FileProvider"
android:authorities="${applicationId}"
android:exported="false"
android:grantUriPermissions="true">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/file_paths" />
</provider>
Add res/xml/file_paths.xml:
<?xml version="1.0" encoding="utf-8"?>
<paths>
<external-path
name="logs"
path="/" />
</paths>