Company logo
  • Jobs
  • Bootcamp
  • About Us
  • For professionals
    • Home
    • Jobs
    • Courses
    • Questions
    • Teachers
    • Bootcamp
  • For business
    • Home
    • Our process
    • Plans
    • Assessments
    • Payroll
    • Blog
    • Calculator

0

68
Views
How to get tethering traffic data

I'm doing an application that store traffic data but i can't get tethering traffics.

    // UIDs for Tethering ?
    appNames.put(5, "Tethering WiFi");
    appNames.put(7, "Tethering USB");
    appNames.put(10, "Tethering BT");
    appNames.put(11, "Tethering Unknown");


    appNames.put(-5, "!Tethering WiFi");
    appNames.put(-7, "!Tethering USB");
    appNames.put(-10, "!Tethering BT");
    appNames.put(-11, "!Tethering Unknown");

    for(ApplicationInfo app : cnt.getPackageManager().getInstalledApplications(0))
    {
        appNames.put(app.uid, app.packageName);
    }

    for(Integer uid: appNames.keySet())
    {
        apps.put(uid, new TrafficRecord(uid, appNames.get(uid)));
    }



TrafficRecord(int uid, String tag)
{
    tx = TrafficStats.getUidTxBytes(uid);
    rx = TrafficStats.getUidRxBytes(uid);
    this.tag = tag;
}

but the Tethering traffic data are always empty. how can I do it?

9 months ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post job Plans Our process Sales
Legal
Terms and conditions Privacy policy
© 2023 PeakU Inc. All Rights Reserved.