checkLocation static method

void checkLocation()

Implementation

static void checkLocation() {
  if(pocChangeNotifier.isOnline){
    bool hasLocationPrivilege=(pocChangeNotifier.privilege&Constant.Privilege_Location)>0;
    if(hasLocationPrivilege) {
      int durationRecordAndPlayTime = DateTime.now().millisecondsSinceEpoch - lastLocationTime;
      if (durationRecordAndPlayTime > pocChangeNotifier.gpsInterval * 1000) {
        Log.i(tag, "checkLocation:getLocation");
        LocationHandler.getLocation();
        lastLocationTime = DateTime.now().millisecondsSinceEpoch;
      }
    }
  }
}