Partager via


TrafficStats.TotalTxPackets Property

Definition

Return number of packets transmitted since device boot.

public static long TotalTxPackets { [Android.Runtime.Register("getTotalTxPackets", "()J", "")] get; }
[<get: Android.Runtime.Register("getTotalTxPackets", "()J", "")>]
static member TotalTxPackets : int64

Property Value

Attributes

Remarks

Return number of packets transmitted since device boot. Counts packets across all network interfaces, and always increases monotonically since device boot. Statistics are measured at the network layer, so they include both TCP and UDP usage.

Before android.os.Build.VERSION_CODES#JELLY_BEAN_MR2, this may return #UNSUPPORTED on devices where statistics aren't available.

Java documentation for android.net.TrafficStats.getTotalTxPackets().

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to