Ejemplo n.º 1
0
  @Override
  protected void onResume() {
    super.onResume();

    if (ProxySettings.checkSystemProxyProperties()) {
      ProxySettings.shouldSetProxySetting = true;
    }

    // Save the context for further access
    AndroidServiceLocator.setContext(this);
    NotificationManager nMngr =
        (NotificationManager) this.getSystemService(Context.NOTIFICATION_SERVICE);
    nMngr.cancelAll();
    LOG.Log(Module.GUI, "onResume");

    /*
    // security reasons
    if(splashShownOnBackground) {
    	activityManager.dismissSplashScreen();
    	splashShownOnBackground = false;
    }
    */
    // Start HTTP server
    startServer();

    appView.loadUrl("javascript:try{Unity._toForeground()}catch(e){}");

    // storing last intent extras
    if (this.getIntent() != null) {
      this.lastIntentExtras = this.getIntent().getExtras();
      Bundle nullExtras = null;
      this.getIntent().replaceExtras(nullExtras);
    }
  }
  @Override
  protected void onResume() {
    super.onResume();

    if (ProxySettings.checkSystemProxyProperties()) {
      ProxySettings.shouldSetProxySetting = true;
    }

    // Save the context for further access
    AndroidServiceLocator.setContext(this, activityManager);
    if (extras != null) {
      NotificationManager nMngr =
          (NotificationManager) this.getSystemService(Context.NOTIFICATION_SERVICE);
      nMngr.cancelAll();
      // nMngr.cancel(Integer.parseInt(id));
    }
    LOG.Log(Module.GUI, "onResume");

    /*
     * // security reasons if(splashShownOnBackground) {
     * activityManager.dismissSplashScreen(); splashShownOnBackground =
     * false; }
     */

    if (!performSecurityChecks((AndroidServiceLocator) AndroidServiceLocator.GetInstance())) return;

    LOG.Log(Module.GUI, "Security checks passed... beaking up Appverse...");

    ((AndroidServiceLocator) AndroidServiceLocator.GetInstance())
        .sendApplicationEvent(AndroidApplicationEvent.onResume);

    // Start HTTP server
    startServer();

    this.activityManager.loadUrlIntoWebView("javascript:try{Appverse._toForeground()}catch(e){}");

    // TESTING getExtras();

    if (this.getIntent() != null) {

      LOG.Log(Module.GUI, "Processing intent data and extras... ");

      this.lastIntentExtras = this.getIntent().getExtras();
      Bundle nullExtras = null;
      this.getIntent().replaceExtras(nullExtras);

      this.lastIntentData = this.getIntent().getData();
      Uri nullData = null;
      this.getIntent().setData(nullData);
    }
  }
Ejemplo n.º 3
0
 private void setGlobalProxy() {
   final WebView view = this.appView;
   ProxySettings.shouldSetProxySetting = true;
   ProxySettings.setProxy(view.getContext(), view, "", 0);
 }