Hey, I need to calculate the data usage speed of any other application. My app/ service is a system-level app.
getUidRxBytes <https://developer.android.com/reference/android/net/TrafficStats.html#getUidRxBytes(int)>(int uid) from the TrafficStats <https://developer.android.com/reference/android/net/TrafficStats.html#TrafficStats()> class is deprecated from android N. It does not return statistics for any other UIDs other than the calling app. Says we have to use the NetworkStatsManage <https://developer.android.com/reference/android/app/usage/NetworkStatsManager.html> r instead. However queryDetailsForUid <https://developer.android.com/reference/android/app/usage/NetworkStatsManager.html#queryDetailsForUid(int, java.lang.String, long, long, int)>(int networkType, String <https://developer.android.com/reference/java/lang/String.html> subscriberId, long startTime,long endTime, int uid) only contains statistics in the range of hours. But I require real-time network usage of an application. Let me know if there is a way to do the above. Thanks -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. To post to this group, send email to android-developers@googlegroups.com. Visit this group at https://groups.google.com/group/android-developers. To view this discussion on the web visit https://groups.google.com/d/msgid/android-developers/6d9b27f8-2016-41b4-966a-532f47b9d5b8%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.