evaluateDataUsageTrackingAllocated method
void
evaluateDataUsageTrackingAllocated()
Implementation
void evaluateDataUsageTrackingAllocated() {
// Calculate the bucket allocation
String combinedId = this.visitorId +
DateTime.now().year.toString() +
DateTime.now().month.toString() +
DateTime.now().day.toString();
int hashAlloc = (MurmurHash.v3(combinedId, 0) % 1000);
Flagship.logger(Level.INFO,
"The hash allocation for Datausage tracking bucket is $hashAlloc ");
bool ret = _singleton.sdkConfig?.disableDeveloperUsageTracking ?? false;
_singleton.dataUsageTrackingReportAllowed =
(hashAlloc <= dataUsageAllocationThreshold) && !ret;
}