DanielPollithy / flashwifi

Wifiota - share WiFi p2p in exchange for iota on android
https://tobywoerthle.github.io/flashWiFiSite/
9 stars 1 forks source link

Network monitoring #29

Open DanielPollithy opened 6 years ago

DanielPollithy commented 6 years ago

The BillingServer.java contains the following code:

bucket = networkStatsManager.querySummaryForDevice(ConnectivityManager.TYPE_WIFI,
                                    "",
                                    Accountant.getInstance().getLastTime() * 1000,
                                    System.currentTimeMillis());
long bytes_received = bucket.getRxBytes();
long bytes_transmitted = bucket.getTxBytes();
total_bytes = bytes_received + bytes_transmitted;

But this query leads to the same "data usage" every interval. What I found on google actually reads as if it could be possible that measuring the data usage on a hotspot is quite impossible...