List of usage examples for org.apache.cordova Config getStartUrl
public static String getStartUrl()
From source file:is.route.www.routeIs.java
License:Apache License
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); // Set by <content src="index.html" /> in config.xml super.loadUrl(Config.getStartUrl()); //super.loadUrl("file:///android_asset/www/index.html") // Make sure the status bar is visible getWindow().clearFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN); }
From source file:it.alcacoop.netpanzersb.NetPanzerSB.java
License:Apache License
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); super.setIntegerProperty("splashscreen", R.drawable.splash); super.loadUrl(Config.getStartUrl(), 8000); // super.loadUrl("file:///android_asset/www/index.html") }
From source file:jp.hit_school.flickrpuzzle.flickrpuzzle.java
License:Apache License
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); // Set by <content src="index.html" /> in config.xml super.setIntegerProperty("splashscreen", R.drawable.splash); super.loadUrl(Config.getStartUrl(), 3000); /*/*from ww w . j a va 2 s . c o m*/ super.loadUrl(Config.getStartUrl()); //super.loadUrl("file:///android_asset/www/index.html") */ }
From source file:jp.kwskmk.usakamekawawatari.usakamekawawatari.java
License:Apache License
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); // Set by <content src="index.html" /> in config.xml //super.loadUrl("file:///android_asset/www/index.html") super.init(); this.loadUrl(Config.getStartUrl()); // Main layout RelativeLayout layout = new RelativeLayout(this); RelativeLayout.LayoutParams params = new RelativeLayout.LayoutParams(MP, MP); layout.setLayoutParams(params);//from w w w. j a va2s . c om layout.setGravity(Gravity.CENTER_HORIZONTAL | Gravity.BOTTOM);// ??View?Gravity? this.addContentView(layout, new FrameLayout.LayoutParams(MP, MP)); // AdMob adView = new AdView(this); adView.setAdUnitId(AD_UNIT_ID); adView.setAdSize(AdSize.BANNER); adView.setLayoutParams(new RelativeLayout.LayoutParams(MP, WC)); adView.setAdListener(new AdListener() { @Override public void onAdLoaded() { Log.d(TAG, "onAdLoaded"); } @Override public void onAdFailedToLoad(int errorCode) { Log.d(TAG, "onAdFailedToLoad:" + errorCode); } }); adView.loadAd(new AdRequest.Builder().build()); layout.addView(adView); }
From source file:me.ncu.quickgap.QuickGap.java
License:Apache License
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); super.init(); webviewPool = new Hashtable<String, CordovaWebView>(); webviewPool.put("root", this.appView); display = getWindowManager().getDefaultDisplay(); RelativeLayout.LayoutParams rootWebviewLayout = new RelativeLayout.LayoutParams(display.getWidth(), display.getHeight());/*from w w w . j a v a 2 s . c om*/ this.appView.setLayoutParams(rootWebviewLayout); this.appView.addJavascriptInterface(new QGJavaScriptInterface(this), "quickgap"); super.loadUrl(Config.getStartUrl()); //super.loadUrl("file:///android_asset/www/index.html"); }
From source file:net.bitacademy.java41.oldboy.TaxiPhonegap.java
License:Apache License
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); super.init(); // Set by <content src="index.html" /> in config.xml // super.setIntegerProperty("loadUrlTimeoutValue", 7000); super.loadUrl(Config.getStartUrl()); //super.loadUrl("file:///android_asset/www/index.html") }
From source file:net.edrake.bitcoineasycheck.bitcoinEasyCheck.java
License:Apache License
@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") // Google AdMob AdView adView = new AdView(this, AdSize.BANNER, ADMOB_AD_UNIT); LinearLayout layout = super.root; layout.addView(adView);/*from ww w . ja v a2 s . co m*/ timer = new Timer(); // Delay the launch of ads; otherwise we get a seg fault timer.schedule(new AdMobTask(adView), 5 * 1000); // delay 5 seconds }
From source file:net.skatgame.webiss.webiss.java
License:Apache License
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); super.init(); // Set by <content src="index.html" /> in config.xml super.loadUrl(Config.getStartUrl()); }
From source file:net.tidalsource.EchoEcho.java
License:Apache License
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); // Set by <content src="index.html" /> in config.xml super.loadUrl(Config.getStartUrl()); //super.loadUrl("file:///android_asset/www/index.html") getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON); }
From source file:nl.wienkit.roc.griepum.roc_griepum.java
License:Apache License
@Override public void onCreate(Bundle savedInstanceState) { if (!isOnline()) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_griepum); AlertDialog.Builder altDialog = new AlertDialog.Builder(this); altDialog.setMessage(/*from www . j av a 2 s . co m*/ "Er is geen internetverbinding. Om dit spel te spelen is een verbinding noodzakelijk."); altDialog.setNeutralButton("OK", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int which) { Intent intent = new Intent(Intent.ACTION_MAIN); intent.addCategory(Intent.CATEGORY_HOME); intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); startActivity(intent); System.exit(0); } }); altDialog.show(); } else { super.onCreate(savedInstanceState); // Set by <content src="index.html" /> in config.xml super.loadUrl(Config.getStartUrl()); //super.loadUrl("file:///android_asset/www/index.html") Log.w("Griepum", Environment.getExternalStorageDirectory().getPath()); try { // Kopier de keyfile naar de lokale omgeving, zodat de backend deze kan lezen File file = new File( Environment.getExternalStorageDirectory().getPath() + "/data/roc.griepum/key.p12"); if (!file.exists()) { InputStream in = getResources().getAssets().open("key.p12"); new File(Environment.getExternalStorageDirectory().getPath() + "/data/roc.griepum").mkdirs(); OutputStream out = new FileOutputStream(file); copyFile(in, out); in.close(); out.close(); } } catch (IOException e) { Log.e("Griepum", "De keyfile is niet gevonden." + e.getMessage()); } // Laat settings zien als GPS disabled is. LocationManager locationManager = (LocationManager) getSystemService(LOCATION_SERVICE); if (!locationManager.isProviderEnabled(LocationManager.GPS_PROVIDER)) { Intent myIntent = new Intent(Settings.ACTION_LOCATION_SOURCE_SETTINGS); startActivity(myIntent); } // Start de coordinaten updater & toon Griepum app startService(new Intent(this.getContext(), CoordUpdater.class)); } }