Skip to content

Instantly share code, notes, and snippets.

@JustinAngel
Created May 28, 2015 19:37
Show Gist options
  • Save JustinAngel/afac121f21a071c9d173 to your computer and use it in GitHub Desktop.
Save JustinAngel/afac121f21a071c9d173 to your computer and use it in GitHub Desktop.
Android M: network statistics
public class android.app.usage.NetworkStatsManager extends Object {
NetworkStatsManager();
public NetworkUsageStats querySummary(int, String, long, long) throws SecurityException, RemoteException;
public NetworkUsageStats queryDetails(int, String, long, long) throws SecurityException, RemoteException;
public NetworkUsageStats$Bucket querySummaryForUser(int, String, long, long) throws SecurityException, RemoteException;
public NetworkUsageStats queryDetailsForUid(int, String, long, long, int) throws SecurityException, RemoteException;
public NetworkUsageStats$Bucket querySummaryForDevice(int, String, long, long) throws SecurityException, RemoteException;
}
public final class android.app.usage.NetworkUsageStats extends Object implements AutoCloseable {
NetworkUsageStats();
protected void finalize() throws Throwable;
public void close();
public boolean getNextBucket(NetworkUsageStats$Bucket);
public boolean hasNextBucket();
}
public static class android.app.usage.NetworkUsageStats$Bucket extends Object {
public NetworkUsageStats$Bucket();
public static final int STATE_ALL;
public static final int STATE_DEFAULT;
public static final int STATE_FOREGROUND;
public static final int UID_REMOVED;
public static final int UID_TETHERING;
public int getState();
public long getTxBytes();
public long getRxPackets();
public int getUid();
public long getRxBytes();
public long getTxPackets();
public long getEndTimeStamp();
public long getStartTimeStamp();
}
public static final class android.app.usage.UsageEvents$Event extends Object {
public static final int INTERACTION;
}
public final class android.app.usage.UsageStatsManager extends Object {
public boolean isAppInactive(String);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment