public int getPublicationPeriodResolutionResource(final int progress) {
        final int resolutionResource;
        if (progress >= 1 && progress <= 63) {
            lastValue = progress;
            publicationSteps = progress;
            publicationResolution = RESOLUTION_100_MS;
            resolutionResource = R.string.time_ms;
        } else if (progress >= 64 && progress <= 120) {
            if (progress > lastValue) {
                publicationSteps = progress - 57;
                lastValue = progress;
            } else if (progress < lastValue) {
                publicationSteps = -(57 - progress);
            }
            publicationResolution = RESOLUTION_1_S;
            resolutionResource = R.string.time_s;
        } else if (progress >= 121 && progress <= 177) {
            if (progress > lastValue) {
                publicationSteps = (progress - 114);
                lastValue = progress;
            } else if (progress < lastValue) {
                publicationSteps = (-(114 - progress));
            }
            publicationResolution = RESOLUTION_10_S;
            resolutionResource = R.string.time_s;
        } else if (progress >= 178 && progress <= 234) {
            if (progress >= lastValue) {
                publicationSteps = (progress - 171);
                lastValue = progress;
            } else {
                publicationSteps = (-(171 - progress));
            }
            publicationResolution = RESOLUTION_10_M;
            resolutionResource = R.string.time_m;
        } else {
            lastValue = progress;
            publicationSteps = (progress);
            publicationResolution = RESOLUTION_100_MS;
            resolutionResource = R.string.disabled;
        }
        return resolutionResource;
    }
Returns the String resource to be used based on the progress

@param progress Publication period value
app/src/main/java/no/nordicsemi/android/nrfmesh/viewmodels/PublicationViewModel.java