@Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { if (requestCode == SpeechHelper.REQUEST_CODE_TTS) { speechHelper.onActivityResult(requestCode, resultCode, data); return; } super.onActivityResult(requestCode, resultCode, data); }
@Override public void onJavaScriptInterfaceGetSelection(String callback, String selection) { Log.d(TAG, String.format("onJavaScriptInterfaceGetSelection: %s %s", callback, selection)); if (callback.equals(JAVASCRIPT_CALLBACK_SEARCH)) { search(selection); } if (callback.equals(JAVASCRIPT_CALLBACK_SPEECH)) { speechHelper.speech(selection); } }
@Override protected void onDestroy() { speechHelper.finish(); webView.setWebViewClient(null); webView.removeJavascriptInterface(BrowserActivityJavaScriptInterface.NAME); webView.stopLoading(); webView.destroy(); translatePanelFragment.setListener(null); super.onDestroy(); }
@Override public void onClickTranslatePanelSpeechButton(DicItemListView.Data data) { speechHelper.speech(data.Index.toString()); }