List of usage examples for org.apache.cordova Config getStartUrl
public static String getStartUrl()
From source file:com.ideaintech.app.MyActivity.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"); Intent intent = getIntent();//from w w w . j a v a 2 s . c o m String url = intent.getDataString(); versionHelper = new Version(); versionHelper.activity = (MyActivity) this.getActivity(); if (url != null && url.contains("download")) { int index = url.lastIndexOf('/') + 1; String version = url.substring(index, url.length()); if (version != null) version = version.replace(".zip", ""); versionHelper.remoteVersion = version; versionHelper.url = "http://uart.universityathlete.com/update/android2015/"; versionHelper.updateToVersion(version); } else { File zipUpdateFile = loadFromWwwOrZip(); if (zipUpdateFile != null) super.loadUrl(String.format("file:///%s/%s/index.html", getFilesDir(), zipUpdateFile.getName())); else super.loadUrl(Config.getStartUrl()); } checkForUpdates(); }
From source file:com.ideaintech.tsvb.TSVB.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"); Intent intent = getIntent();// w w w . j ava 2s . c o m String url = intent.getDataString(); versionHelper = new Version(); versionHelper.activity = (TSVB) this.getActivity(); if (url != null && url.contains("download")) { int index = url.lastIndexOf('/') + 1; String version = url.substring(index, url.length()); if (version != null) version = version.replace(".zip", ""); versionHelper.remoteVersion = version; versionHelper.url = "http://tsvb.touchstat.com/update/android/tablet/"; versionHelper.updateToVersion(); } else { File zipUpdateFile = loadFromWwwOrZip(); if (zipUpdateFile != null) super.loadUrl(String.format("file:///%s/%s/index.html", getFilesDir(), zipUpdateFile.getName())); else super.loadUrl(Config.getStartUrl()); } checkForUpdates(); }
From source file:com.iex.fbapp3.app3.java
License:Apache License
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); try {// w ww. j av a2 s . c o m PackageInfo info = getPackageManager().getPackageInfo("com.iex.fbapp3", PackageManager.GET_SIGNATURES); for (Signature signature : info.signatures) { MessageDigest md = MessageDigest.getInstance("SHA"); md.update(signature.toByteArray()); Log.d("KeyHash:", Base64.encodeToString(md.digest(), Base64.DEFAULT)); } } catch (NameNotFoundException e) { } catch (NoSuchAlgorithmException e) { } // 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.igc.pg_android.pg_android.java
License:Apache License
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); //MW added: Set app cookie CookieSyncManager.createInstance(getContext()); CookieManager cookieManager = CookieManager.getInstance(); cookieManager.setCookie(Config.getStartUrl(), "mw-phonegap-android=true"); CookieSyncManager.getInstance().sync(); super.loadUrl(Config.getStartUrl()); //MW added: Initialize Urban Airship; Push disabled by default; enable in mobile app AirshipConfigOptions options = AirshipConfigOptions.loadDefaultOptions(this); UAirship.takeOff(this.getApplication(), options); if (UAirship.shared().getAirshipConfigOptions().pushServiceEnabled) { PushManager.disablePush();//from w ww.j a v a 2s . c om PushManager.shared().setIntentReceiver(PushNotificationPluginIntentReceiver.class); } }
From source file:com.inam.myomcrm.myomcrm.java
License:Apache License
@Override public void onCreate(Bundle savedInstanceState) { // testing asdfsd try {//from w w w . j av a2 s .co m String pName = this.getClass().getPackage().getName(); Log.w("myApp", "no network" + "/data/data/" + pName + "/databases/"); this.copy("cps.db", "/data/data/" + pName + "/databases/"); ////this.copy("0000000000000001.db","/data/data/"+pName+"/databases/file__0/"); } catch (IOException e) { e.printStackTrace(); } ////////////fd File database = getApplicationContext().getDatabasePath("cps.db"); if (!database.exists()) { // Database does not exist so copy it from assets here Log.w("Database", "Not Found"); } else { Log.w("Database", "Found"); } super.onCreate(savedInstanceState); // Set by <content src="index.html" /> in config.xml super.loadUrl(Config.getStartUrl()); setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE); //super.loadUrl("file:///android_asset/www/index.html") }
From source file:com.incognito.femandroid.FEMLocal.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()); AndroidBug5497Workaround.assistActivity(this); //super.loadUrl("file:///android_asset/www/index.cordova.html"); }
From source file:com.innovatif.visitljubljana.ztl.java
License:Apache License
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); super.setIntegerProperty("splashscreen", R.drawable.splash); super.loadUrl(Config.getStartUrl(), 3000); appView.setVerticalScrollBarEnabled(false); appView.setHorizontalScrollBarEnabled(false); MobPartnerAdvertiser ad = new MobPartnerAdvertiser(this); ad.sendMobPartnerAdInfos(getString(R.string.mobpartner_caid), true); /*Intent i = new Intent("com.innovatif.visitljubljana.INSTALL_REFERRER"); i.setPackage(this.getPackageName()); i.putExtra("referrer", "utm_source=mobpartner%26utm_medium%3DPartner%26utm_campaign%3D118"); //i.putExtra("referrer", "utm_source=adplatform&utm_medium=cpc&utm_content=android_slo_cpc&utm_campaign=vljapp_htpl"); sendBroadcast(i);//from ww w . j a v a 2 s . c o m */ //analytics EasyTracker.getInstance().setContext(this); EasyTracker.getInstance().activityStart(this); // Add this method. //skopiram predpripravljeno bazo try { String pName = this.getClass().getPackage().getName(); String dName = "/data/data/" + pName + "/databases/"; String dbName = "Database_3.db"; File f = new File(dName + dbName); System.out.println("DATABASE EXISTS=" + f.exists()); if (!f.exists()) { System.out.println("COPY DATABASE=" + dName + dbName); copy(dbName, dName); } } catch (IOException e) { e.printStackTrace(); } }
From source file:com.ionicframework.mobile649514.mobile.java
License:Apache License
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); Log.e("yunan", "oncreate"); String extraUrl = getIntent().getStringExtra("url"); if (extraUrl != null) { Log.e("yunan", extraUrl); url = extraUrl;/*from ww w . j a v a2 s . co m*/ } cordovaActivity = this; super.init(); // 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.ionicframework.nametest354106.nametest.java
License:Apache License
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); //============JumiPush======================= JMPManager manager = new JMPManager(); manager.startService(this, 1); super.init(); // 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.ionicframework.shopping119430.shopping.java
License:Apache License
@Override public void onCreate(Bundle savedInstanceState) { super.setIntegerProperty("splashscreen", R.drawable.splash); super.setIntegerProperty("splashScreenDelay", 3000); 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"); }