public interface BandwidthMeter
Modifier and Type | Interface and Description |
---|---|
static interface |
BandwidthMeter.EventListener
A listener of
BandwidthMeter events. |
Modifier and Type | Method and Description |
---|---|
void |
addEventListener(Handler eventHandler,
BandwidthMeter.EventListener eventListener)
Adds an
BandwidthMeter.EventListener to be informed of bandwidth samples. |
long |
getBitrateEstimate()
Returns the estimated bandwidth in bits/sec.
|
TransferListener |
getTransferListener()
Returns the
TransferListener that this instance uses to gather bandwidth information
from data transfers. |
void |
removeEventListener(BandwidthMeter.EventListener eventListener)
Removes an
BandwidthMeter.EventListener . |
long getBitrateEstimate()
@Nullable TransferListener getTransferListener()
TransferListener
that this instance uses to gather bandwidth information
from data transfers. May be null, if no transfer listener is used.void addEventListener(Handler eventHandler, BandwidthMeter.EventListener eventListener)
BandwidthMeter.EventListener
to be informed of bandwidth samples.eventHandler
- A handler for events.eventListener
- A listener of events.void removeEventListener(BandwidthMeter.EventListener eventListener)
BandwidthMeter.EventListener
.eventListener
- The listener to be removed.