Ejemplo n.º 1
0
 @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);
 }
Ejemplo n.º 2
0
 @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);
   }
 }
Ejemplo n.º 3
0
  @Override
  protected void onDestroy() {
    speechHelper.finish();
    webView.setWebViewClient(null);
    webView.removeJavascriptInterface(BrowserActivityJavaScriptInterface.NAME);
    webView.stopLoading();
    webView.destroy();
    translatePanelFragment.setListener(null);

    super.onDestroy();
  }
Ejemplo n.º 4
0
 @Override
 public void onClickTranslatePanelSpeechButton(DicItemListView.Data data) {
   speechHelper.speech(data.Index.toString());
 }