@Override
    public void onInit(final int status) {
        // The text to speech system takes some time to initialize.
        if (status != TextToSpeech.SUCCESS) {
            Log.e("Text to speech cannot be initialized.");
            return;
        }

        final int switchLocale = tts.setLanguage(Settings.getApplicationLocale());

        if (switchLocale == TextToSpeech.LANG_MISSING_DATA) {
            synchronized (startingActivityLock) {
                if (startingActivity != null) {
                    startingActivity.startActivity(new Intent(Engine.ACTION_INSTALL_TTS_DATA));
                }
            }
            return;
        }
        if (switchLocale == TextToSpeech.LANG_NOT_SUPPORTED) {
            Log.e("Current language not supported by text to speech.");
            synchronized (startingActivityLock) {
                if (startingActivity != null) {
                    ActivityMixin.showToast(startingActivity, R.string.err_tts_lang_not_supported);
                }
            }
            return;
        }

        initialized = true;

        synchronized (startingActivityLock) {
            final Activity startingActivityChecked = startingActivity;
            if (startingActivityChecked != null) {
                initDisposable.add(geoDirHandler.start(GeoDirHandler.UPDATE_GEODIR));
                ActivityMixin.showShortToast(startingActivity, startingActivityChecked.getString(R.string.tts_started));
            }
        }
    }
Return distance required to be moved based on overall distance.<br>

@param distance in km
@return delta in km
main/src/main/java/cgeo/geocaching/speech/SpeechService.java