Example usage for org.apache.cordova LOG setLogLevel

List of usage examples for org.apache.cordova LOG setLogLevel

Introduction

In this page you can find the example usage for org.apache.cordova LOG setLogLevel.

Prototype

public static void setLogLevel(String logLevel) 

Source Link

Document

Set the current log level.

Usage

From source file:com.justep.cordova.CordovaPreferences.java

License:Apache License

public void copyIntoIntentExtras(Activity action) {
    for (String name : prefs.keySet()) {
        String value = prefs.get(name);
        if (value == null) {
            continue;
        }//from  w w  w  . j a v  a2s . c o m
        if (name.equals("loglevel")) {
            LOG.setLogLevel(value);
        } else if (name.equals("splashscreen")) {
            // Note: We should probably pass in the classname for the variable splash on splashscreen!
            int resource = action.getResources().getIdentifier(value, "drawable",
                    action.getClass().getPackage().getName());
            action.getIntent().putExtra(name, resource);
        } else if (name.equals("backgroundcolor")) {
            int asInt = (int) (long) Long.decode(value);
            action.getIntent().putExtra(name, asInt);
        } else if (name.equals("loadurltimeoutvalue")) {
            int asInt = Integer.decode(value);
            action.getIntent().putExtra(name, asInt);
        } else if (name.equals("splashscreendelay")) {
            int asInt = Integer.decode(value);
            action.getIntent().putExtra(name, asInt);
        } else if (name.equals("keeprunning")) {
            boolean asBool = Boolean.parseBoolean(value);
            action.getIntent().putExtra(name, asBool);
        } else if (name.equals("inappbrowserstorageenabled")) {
            boolean asBool = Boolean.parseBoolean(value);
            action.getIntent().putExtra(name, asBool);
        } else if (name.equals("disallowoverscroll")) {
            boolean asBool = Boolean.parseBoolean(value);
            action.getIntent().putExtra(name, asBool);
        } else {
            action.getIntent().putExtra(name, value);
        }
    }
    // In the normal case, the intent extras are null until the first call to putExtra().
    if (preferencesBundleExtras == null) {
        preferencesBundleExtras = action.getIntent().getExtras();
    }
}