public static void startUploading(String url) {
        if (url == null) {
            BmLog.error("Cannot start SamplesUploader: server did not send callBack URL");
            return;
        }
        callBackUrl = new StringBuilder(url);
        samplesUploaderThread = new Thread(new Runnable() {
            @Override
            public void run() {
                while (!Thread.currentThread().isInterrupted()) {
                    long delay = MAX_DELAY - millisOfCurrentIteration;
                    if (delay < 0) {
                        // if sending results to server took more than 30secs, set
                        millisOfCurrentIteration = 30000;
                    }
                    try {
                        List<JSONObject> samples = samplesQueue.take((int) delay);
                        if (samples.size() > 0) {
                            long begin = System.currentTimeMillis();
                            send(samples, callBackUrl.toString());
                            millisOfCurrentIteration = System.currentTimeMillis() - begin;
                        }
                    } catch (InterruptedException e) {
                        return;
                    }
                }
            }
        });
        task = scheduler.schedule(samplesUploaderThread, 0, TimeUnit.SECONDS);
        BmLog.info("Samples uploading is started: " + Constants.CALLBACK_URL + "=" + callBackUrl);
    }