데이터 사용량은
TrafficStats.getTotalRxBytes() + TrafficStats.getTotalTxBytes()
이렇게 하는것으로 알고 있습니다. 그런데
이것을 한달 동안으로 기한을 잡을려니 어떻게 해야할지 모르겠습니다.
일단 제가 사용한 방법은
Calendar calendar;
int nFDay;
int nLDay;
calendar = new GregorianCalendar();
nL = calendar.getActualMaximum((gcal.DAY_OF_MONTH));
nF = gcalendar.getActualMinimum((gcal.DAY_OF_MONTH));
if (nFDay <= nLDay) {
info += TrafficStats.getTotalRxBytes() + TrafficStats.getTotalTxBytes();
}
이렇게 하였는데요 다르게해봐도 영 다른값이 나오더군요....
어떻게 해야 한달동안 사용한 값을 구할 수 있나요?