Esempio n. 1
0
    @Override
    public void onPageFinished(WebView view, String url) {
      MetaioCloudPlugin.log("Finished loading " + url);
      mProgressView.setVisibility(View.GONE);

      if (mButtonStop != null) {
        mButtonStop.setEnabled(false);
      }
      changeButtonState(view);
      view.resumeTimers();
      super.onPageFinished(view, url);
    }
 private boolean resumeWebView() {
   if (!mActivityInPause) {
     if (mWebView != null) {
       try {
         Method method = WebView.class.getMethod("onResume");
         method.invoke(mWebView);
       } catch (final Exception e) {
       }
       mWebView.resumeTimers();
     }
     return true;
   } else {
     return false;
   }
 }
Esempio n. 3
0
  @Override
  /** Called when the activity will start interacting with the user. */
  protected void onResume() {
    super.onResume();
    if (this.activityState == ACTIVITY_STARTING) {
      this.activityState = ACTIVITY_RUNNING;
      return;
    }

    if (contentWebView == null) {
      return;
    }

    // Send resume event to JavaScript
    // TODO :事件机制需要完善
    /*
     * contentWebView .loadUrl(
     * "javascript:try{JustepApp.fireDocumentEvent('resume');}catch(e){};");
     */

    // Forward to plugins
    this.pluginManager.onResume(this.keepRunning || this.activityResultKeepRunning);

    // If app doesn't want to run in background
    if (!this.keepRunning || this.activityResultKeepRunning) {

      // Restore multitasking state
      if (this.activityResultKeepRunning) {
        this.keepRunning = this.activityResultKeepRunning;
        this.activityResultKeepRunning = false;
      }

      // Resume JavaScript timers (including setInterval)
      contentWebView.resumeTimers();
    }
    if (!loadSuccess) {
      loadSystem();
    }
  }
Esempio n. 4
0
 @Override
 protected void onResume() {
   webView.resumeTimers();
   callHiddenWebViewMethod("onResume");
   super.onResume();
 }
Esempio n. 5
0
 @Override
 public void onLoadResource(WebView view, String url) {
   super.onLoadResource(view, url);
   view.resumeTimers();
   MetaioCloudPlugin.log("onLoadResource " + url);
 }
 @Override
 public void onResume() {
   super.onResume();
   mWebView.resumeTimers();
   mWebView.onResume();
 }