/** Clear the resource cache. */
 @Deprecated // Call method on appView directly.
 public void clearCache() {
   if (appView == null) {
     init();
   }
   this.appView.clearCache(true);
 }
 @Override
 public void onCreate(Bundle savedInstanceState) {
   super.onCreate(savedInstanceState);
   super.init();
   // Set by <content src="index.html" /> in config.xml
   loadUrl(launchUrl);
 }
Example #3
0
 @Override
 public void onCreate(Bundle savedInstanceState) {
   super.onCreate(savedInstanceState);
   super.init();
   // Set by <content src="index.html" /> in config.xml
   super.loadUrl(Config.getStartUrl());
 }
  /** Load the url into the webview. */
  public void loadUrl(String url) {
    if (appView == null) {
      init();
    }
    this.splashscreenTime = preferences.getInteger("SplashScreenDelay", this.splashscreenTime);
    String splash = preferences.getString("SplashScreen", null);
    if (this.splashscreenTime > 0 && splash != null) {
      this.splashscreen =
          getResources().getIdentifier(splash, "drawable", getClass().getPackage().getName());
      ;
      if (this.splashscreen != 0) {
        this.showSplashScreen(this.splashscreenTime);
      }
    }

    // If keepRunning
    this.keepRunning = preferences.getBoolean("KeepRunning", true);

    // Check if the view is attached to anything
    if (appView.getParent() != null) {
      // Then load the spinner
      this.loadSpinner();
    }
    // Load the correct splashscreen

    if (this.splashscreen != 0) {
      this.appView.loadUrl(url, this.splashscreenTime);
    } else {
      this.appView.loadUrl(url);
    }
  }
Example #5
0
  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    super.init();
    // Set by <content src="index.html" /> in config.xml
    loadUrl(launchUrl);

    WebSettings ws = super.appView.getSettings();
    ws.setMediaPlaybackRequiresUserGesture(false);
  }
Example #6
0
 @JavascriptInterface
 @Override
 public void onCreate(Bundle savedInstanceState) {
   super.onCreate(savedInstanceState);
   // Set by <content src="index.html" /> in config.xml
   super.init();
   WebView wv = (WebView) appView.getEngine().getView();
   wv.addJavascriptInterface(this, "MainActivity");
   loadUrl(launchUrl);
 }
 @Override
 public void onCreate(Bundle savedInstanceState) {
   super.onCreate(savedInstanceState);
   super.init();
   // Set by <content src="index.html" /> in config.xml
   super.loadUrl(Config.getStartUrl());
   // super.loadUrl("file:///android_asset/www/index.html");
   if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
     WebView.setWebContentsDebuggingEnabled(true);
   }
 }
Example #8
0
  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    super.init();
    super.setIntegerProperty("splashscreen", R.drawable.splash);
    // Set by <content src="index.html" /> in config.xml

    super.loadUrl("file:///android_asset/www/index.html", 3000);
    // super.loadUrl(Config.getStartUrl());
    // super.loadUrl("file:///android_asset/www/index.html")
  }
Example #9
0
 @Override
 public void onCreate(Bundle savedInstanceState) {
   super.onCreate(savedInstanceState);
   super.init();
   setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
   // Set by <content src="index.html" /> in config.xml
   super.loadUrl(Config.getStartUrl());
   // super.loadUrl("file:///android_asset/www/sharedLayer/shared.html");
   super.loadUrl("file:///android_asset/www/index.html");
   super.setIntegerProperty("loadUrlTimeoutValue", 60000);
 }