Example usage for org.apache.cordova Config getStartUrl

List of usage examples for org.apache.cordova Config getStartUrl

Introduction

In this page you can find the example usage for org.apache.cordova Config getStartUrl.

Prototype

public static String getStartUrl() 

Source Link

Usage

From source file:com.elovillo.cytype.HelloCordova.java

License:Apache License

@Override
public void onCreate(Bundle savedInstanceState) {

    super.onCreate(savedInstanceState);
    super.init();
    super.setIntegerProperty("splashscreen", R.drawable.splash);
    //super.loadUrl("file:///android_asset/www/index.html", 10000);
    if (checkPlayServices()) {

        // Set by <content src="index.html" /> in config.xml
        super.loadUrl(Config.getStartUrl());
        //super.loadUrl("file:///android_asset/www/index.html")
        Bundle bndl = getIntent().getExtras();
        if (bndl != null) {
            if (bndl.containsKey("pushBundle")) {
                handleGCMMessagesLaunch(bndl.getBundle("pushBundle"));
            }//w w  w. java  2  s .  com
        }
    }
}

From source file:com.elsigh.reflow_timer.Test.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(), 2000);
}

From source file:com.epitechPfa.autoBleu.Auto.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")
}

From source file:com.esolz.whatthetrucks.HelloCordova.java

License:Apache License

@SuppressWarnings("deprecation")
@SuppressLint("NewApi")
@Override/* ww w .ja v a  2s  .co m*/
public void onCreate(Bundle savedInstanceState) {
    CookieManager.setAcceptFileSchemeCookies(true);
    super.onCreate(savedInstanceState);
    super.init();
    super.setIntegerProperty("splashscreen", R.drawable.splashmain);

    //      sharedPreferences=getSharedPreferences("App credit", Context.MODE_PRIVATE);
    //
    //      SharedPreferences.Editor editor=sharedPreferences.edit();
    //
    //      editor.putString("screen_name", screen_name);
    //      editor.putString("twitter_id", twiter_id);
    //      editor.commit();

    // Set by <content src="index.html" /> in config.xml
    // setContentView(R.layout.mainxmlfile);
    // wbvw=(WebView)findViewById(R.id.wbvw1);

    // new Handler().postDelayed(new Runnable() {
    //
    // @Override
    // public void run() {
    // // TODO Auto-generated method stub
    //
    // }
    // }, 5000);

    TwitterAuthConfig authConfig = new TwitterAuthConfig(TWITTER_KEY, TWITTER_SECRET);
    Fabric.with(this, new Twitter(authConfig));
    loadUrl(Config.getStartUrl(), 5000);
    // super.appView.addJavascriptInterface(new twitterbridge(), "b");

    try {
        PackageInfo info = getPackageManager().getPackageInfo("com.esolz.whatthetrucks",
                PackageManager.GET_SIGNATURES);
        for (Signature signature : info.signatures) {
            MessageDigest md = MessageDigest.getInstance("SHA");
            md.update(signature.toByteArray());
            // --- >> C15+g0w3ofdlyANnJjHrf1tZbqQ=
            Log.i("KeyHash :", Base64.encodeToString(md.digest(), Base64.DEFAULT));
            // --- >> 2jmj7l5rSw0yVb/vlWAYkK/YBwk=
            System.out.println("KeyHash : " + Base64.encodeToString(md.digest(), Base64.DEFAULT));
        }
    } catch (NameNotFoundException e) {
        Log.i("NameNotFoundExp : ", e.toString());
    } catch (NoSuchAlgorithmException e) {
        Log.i("NoSuchAlgorithmExp : ", e.toString());
    }

    //      try {
    //         PackageInfo info = getPackageManager().getPackageInfo(
    //               "com.esolz.whatthetrucks", PackageManager.GET_SIGNATURES);
    //         for (Signature signature : info.signatures) {
    //            MessageDigest md = MessageDigest.getInstance("SHA");
    //            md.update(signature.toByteArray());
    //            Log.i("KeyHash:",
    //                  Base64.encodeToString(md.digest(), Base64.DEFAULT));
    //            Log.i("KeyHash:",
    //                  Base64.encodeToString(md.digest(), Base64.DEFAULT));
    //            Log.i("KeyHash:",
    //                  Base64.encodeToString(md.digest(), Base64.DEFAULT));
    //            Log.i("KeyHash:",
    //                  Base64.encodeToString(md.digest(), Base64.DEFAULT));
    //         }
    //      } catch (NameNotFoundException e) {
    //         Log.i("ERROR", "" + e.toString());
    //
    //      } catch (NoSuchAlgorithmException e) {
    //         Log.i("ERROR2", "" + e.toString());
    //      }
    // super.loadUrl("file:///android_asset/www/index.html")
    // super.loadUrl("file:///android_asset/www/index.html");
}

From source file:com.esri.sample.quickstart.phonegap.QuickStartCordova.java

License:Apache License

@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    super.init();

    // NOTICE: Set by <content src="index.html" /> in config.xml
    super.loadUrl(Config.getStartUrl());
    //super.loadUrl("file:///android_asset/www/index_basicwebmap.html");
}

From source file:com.eurpac.gameexchange.GameExchange.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(), 10000);
    //super.loadUrl("file:///android_asset/www/index.html")
}

From source file:com.ever365.slide8.Slide8.java

License:Apache License

@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/index.html");
}

From source file:com.evothings.acmelauncher.MainActivity.java

License:Apache License

@Override
public void onCreate(Bundle savedInstanceState) {
    if (BuildConfig.DEBUG) {
        // Detect all manner of bad things.
        // This code is active only in debug builds.
        /*// w  w  w .ja va  2s.c o  m
        // Cordova does disk access; don't enable this check.
        StrictMode.setThreadPolicy(new StrictMode.ThreadPolicy.Builder()
           .detectAll()
           .penaltyLog()
           .penaltyDeath()
           .build());
        */
        StrictMode
                .setVmPolicy(new StrictMode.VmPolicy.Builder().detectAll().penaltyLog().penaltyDeath().build());
    }
    super.onCreate(savedInstanceState);
    super.init();

    // If the intent has a data string we load it.
    Intent intent = getIntent();
    if (!openEvothingsIntent(intent)) {
        // If the intent is not an evo/evos URL, open the start page.
        // This is the original Cordova page loading code.
        // 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.evothings.evothingsclient.Evothings.java

License:Apache License

@Override
public void onCreate(Bundle savedInstanceState) {
    if (BuildConfig.DEBUG) {
        // Detect all manner of bad things.
        // This code is active only in debug builds.
        /*//w  w w  .  j  a  v  a2s. c  o m
        // Cordova does disk access; don't enable this check.
        StrictMode.setThreadPolicy(new StrictMode.ThreadPolicy.Builder()
           .detectAll()
           .penaltyLog()
           .penaltyDeath()
           .build());
        */
        StrictMode
                .setVmPolicy(new StrictMode.VmPolicy.Builder().detectAll().penaltyLog().penaltyDeath().build());
    }
    super.onCreate(savedInstanceState);
    super.init();

    // If the intent has a data string we load it.
    Intent intent = getIntent();
    if (isEvothingsIntent(intent)) {
        openEvothingsIntent(intent);
    } else {
        // This is the original Cordova page loading code.
        // 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.example.app.Phonegap.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")

    // Add code to print out the key hash

    try {//from   www  .j a v a 2 s . com
        PackageInfo info = getPackageManager().getPackageInfo("com.example.app", 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) {

    }

}