NetworkUsageCounter

Process-wide bridge from low-level network clients to the data layer.

The data module installs recorder when its repository is created. Network code can then report byte deltas without depending on Room, DI scopes, or presentation modules.

Author

Dmitriy Moroz

Properties

Link copied to clipboard

Callback owned by the data layer. Null means traffic accounting is unavailable in this build.

Functions

Link copied to clipboard
fun record(category: NetworkUsageCategory, bytes: Long)

Forwards positive byte deltas to the installed recorder.