Added in API level 24

UsageCallback


abstract class UsageCallback
kotlin.Any
   ↳ android.app.usage.NetworkStatsManager.UsageCallback

Base class for usage callbacks. Should be extended by applications wanting notifications.

Summary

Public constructors

Public methods
abstract Unit
onThresholdReached(networkType: Int, subscriberId: String?)

Called when data usage has reached the given threshold.

Public constructors

UsageCallback

Added in API level 24
UsageCallback()

Public methods

onThresholdReached

Added in API level 24
abstract fun onThresholdReached(
    networkType: Int,
    subscriberId: String?
): Unit

Called when data usage has reached the given threshold.

Parameters
subscriberId String?: This value may be null.