List of usage examples for org.apache.cordova Config getStartUrl
public static String getStartUrl()
From source file:com.brudan.popi.popi.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") Parse.initialize(this, "2ewFp8fRfANLxuFB4ZhudaBv4STaRh30mespF0wx", "G5md2MvmROPeUQMvXURUe4UOuXUwtfMpv6h9xpgl"); PushService.subscribe(this, "", popi.class); PushService.subscribe(this, "foo", popi.class); }
From source file:com.camargo.app.TimecardReview.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("splashscreen", R.drawable.splash); super.loadUrl(Config.getStartUrl()); //super.loadUrl("file:///android_asset/www/index.html"); }
From source file:com.card.signup.CardSignup.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()); }
From source file:com.cau.foodapp.FoodApp.java
License:Apache License
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); super.init(); super.loadUrl(Config.getStartUrl()); //super.loadUrl("file:///android_asset/www/index.html") // //from w ww . j a va 2s . c o m this.appView.addJavascriptInterface(new Converse(), "android"); //this.appView.addJavascriptInterface(new CameraLauncher(), "navigator"); }
From source file:com.cbtec.eliademy.Eliademy.java
License:Open Source License
@Override public void onCreate(Bundle savedInstanceState) { sInstance = this; super.onCreate(savedInstanceState); super.loadUrl(Config.getStartUrl(), 10000); bindService(new Intent("com.android.vending.billing.InAppBillingService.BIND"), mBillingServiceConn, Context.BIND_AUTO_CREATE); // Rate app dialog, mostly taken from here: // http://www.androidsnippets.com/prompt-engaged-users-to-rate-your-app-in-the-android-market-appirater final Context context = getContext(); final SharedPreferences prefs = context.getSharedPreferences("apprater", 0); if (prefs.getBoolean("dontshowagain", false)) { return;//from ww w. j av a2 s . c om } final SharedPreferences.Editor editor = prefs.edit(); // Get date of first launch Long date_firstLaunch = prefs.getLong("date_firstlaunch", 0); if (date_firstLaunch == 0) { date_firstLaunch = System.currentTimeMillis(); editor.putLong("date_firstlaunch", date_firstLaunch); } // Wait at least 7 days before opening if (System.currentTimeMillis() >= date_firstLaunch + 604800000) { final Dialog dialog = new Dialog(context); dialog.setTitle("Rate " + getString(R.string.app_name)); LinearLayout ll = new LinearLayout(context); ll.setOrientation(LinearLayout.VERTICAL); TextView tv = new TextView(context); tv.setText("If you enjoy using " + getString(R.string.app_name) + ", please take a moment to rate it. Thanks for your support!"); tv.setWidth(240); tv.setPadding(4, 0, 4, 10); ll.addView(tv); Button b1 = new Button(context); b1.setText("Rate " + getString(R.string.app_name)); b1.setOnClickListener(new OnClickListener() { public void onClick(View v) { context.startActivity( new Intent(Intent.ACTION_VIEW, Uri.parse("market://details?id=com.cbtec.eliademy"))); editor.putBoolean("dontshowagain", true); editor.commit(); dialog.dismiss(); } }); ll.addView(b1); Button b2 = new Button(context); b2.setText("Remind me later"); b2.setOnClickListener(new OnClickListener() { public void onClick(View v) { editor.putLong("date_firstlaunch", System.currentTimeMillis()); dialog.dismiss(); } }); ll.addView(b2); Button b3 = new Button(context); b3.setText("No, thanks"); b3.setOnClickListener(new OnClickListener() { public void onClick(View v) { editor.putBoolean("dontshowagain", true); editor.commit(); dialog.dismiss(); } }); ll.addView(b3); dialog.setContentView(ll); dialog.show(); } editor.commit(); }
From source file:com.ceip.carnegie.Carnegie.java
License:Apache License
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); //super.init(); super.setIntegerProperty("splashscreen", R.drawable.ic_launcher); //super.loadUrl("file:///android_asset/www/index.html", 10000); // Set by <content src="index.html" /> in config.xml super.loadUrl(Config.getStartUrl()); //super.loadUrl("file:///android_asset/www/index.html"); }
From source file:com.chocolate.client.Chocolate.java
License:Apache License
@SuppressWarnings("deprecation") @Override//from ww w. j av a 2 s . c o m public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); super.init(); String host = "www.yansite.jp"; int port = 8080; //chocoViewClient = new ChocolateWebViewClient(); //this.appView.setWebViewClient(chocoViewClient); this.appView.getSettings().setJavaScriptEnabled(true); //WebView.enablePlatformNotifications(); //DefaultHttpClient httpClient = new DefaultHttpClient(); //HttpHost proxy = new HttpHost(host, port); //proxy that i need //httpClient.getParams().setParameter(ConnRouteParams.DEFAULT_PROXY, proxy); //System.setProperty("http.proxyHost", host); //System.setProperty("http.proxyPort", port + ""); //System.setProperty("https.proxyHost", host); //System.setProperty("https.proxyPort", port + ""); // Set by <content src="index.html" /> in config.xml super.setIntegerProperty("loadUrlTimeoutValue", 70000); super.loadUrl(Config.getStartUrl()); //super.loadUrl("http://www.google.com"); //super.loadUrl("file:///android_asset/www/index.html"); //super.loadUrl("http://www.google.com"); }
From source file:com.christough.Osciller.Osciller.java
License:Apache License
@Override public void onCreate(Bundle savedInstanceState) { CookieManager.setAcceptFileSchemeCookies(true); super.onCreate(savedInstanceState); // Set by <content src="index.html" /> in config.xml super.setIntegerProperty("splashscreen", R.drawable.splash); super.loadUrl(Config.getStartUrl(), 8000); //super.loadUrl("file:///android_asset/www/index.html") this.appView.addJavascriptInterface(new WebSocketFactory(appView), "WebSocketFactory"); }
From source file:com.classroom.knomadix.SmartLabel.java
License:Apache License
@Override public void onCreate(Bundle savedInstanceState) { String dataString = null;/* ww w.ja v a2 s .c o m*/ 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") Intent intent = getIntent(); Uri uri = intent.getData(); if (null != uri) { String fileName = getContentName(getContentResolver(), uri); dataString = readContent(uri); if (null != dataString) { dbHelper = new SmartLabelSQLiteHelper(this.getApplicationContext()); dbHelper.writeToDB(fileName, dataString); dbHelper.close(); // FileUtils.write("attachment_invoke.xml", dataString); } } }
From source file:com.clearblade.clearconcert.ClearConcertAndroid.java
License:Apache License
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); super.setIntegerProperty("splashscreen", R.drawable.splash); super.loadUrl(Config.getStartUrl(), 10000); //super.loadUrl("file:///android_asset/www/index.html") }