Disk Usage
Connecting dependencies to your project
In your project <project>/<app-module>/build.gradle
.
dependencies {
implementation "ru.ok.tracer:tracer-disk-usage:0.2.7"
}
For a detailed description of the dependencies see “Quickstart”.
DiskUsageConfiguration
description
In your Application.kt
.
class MyApplication : Application(), HasTracerConfiguration {
override val tracerConfiguration: List<TracerConfiguration>
get() = listOf(
DiskUsageConfiguration.build {
// your options
},
)
}
Below are the DiskUsageConfiguration.Builder
options.
setEnabled
— enable/disable plug-in. By default: enabled.setProbability
— the probability (1/n) of daily background disk usage check for this user. By default: 0; that means that the plug-in is enabled.setInterestingSize
— occupied space limit, on exceeding which the SDK will trigger an alarm and send report to Tracer. Measured in bytes. by default: 10 GB.setExcludePath
— paths with known large files to be excluded from the check. Accepts only paths set byGlobalDirs
.
Below is the description of GlobalDirs
.
GlobalDirs.INTERNAL_DATA.excludePath("foo/bar")
— app internal store.GlobalDirs.EXTERNAL_DATA.excludePath("foo/bar")
— app files on SD card.GlobalDirs.SRC.excludePath("foo/bar")
— files of the app itself.