2017-05-30 32 views
-1

我想在下載批量數據時監視MB中的應用程序網絡使用情況,以供離線使用。有應用TrafficMonitor從@commonsguy但我使用Android Studio工具如何在Android Studio中的網絡監視器中下載總MB數

Android Studio中monitor>network需要仔細看只能說明Tx傳輸的字節和Rx接收字節。 看起來好像network monitor缺少必要的功能。

有沒有什麼辦法在特定的時間間隔內使用network monitor或任何其他方式獲取應用程序的使用情況。

回答

1

嘗試NetworkStatsManager。

  NetworkStats queryDetailsForUid (int networkType, 
      String subscriberId, 
      long startTime, 
      long endTime, 
      int uid) 

Refer this

+0

@Qamar一次嘗試 –

+0

@thanks這是很好的。在API 23中添加 – Qamar

相關問題