Example usage for android.util Log d

List of usage examples for android.util Log d

Introduction

In this page you can find the example usage for android.util Log d.

Prototype

public static int d(String tag, String msg) 

Source Link

Document

Send a #DEBUG log message.

Usage

From source file:Main.java

private static boolean loadLibrary(String Name) {
    boolean result = true;

    Log.d(TAG, "Trying to load library " + Name);
    try {//from  w ww . java2s. co  m
        System.loadLibrary(Name);
        Log.d(TAG, "OpenCV libs init was ok!");
    } catch (UnsatisfiedLinkError e) {
        Log.d(TAG, "Cannot load library \"" + Name + "\"");
        e.printStackTrace();
        result &= false;
    }

    return result;
}

From source file:Main.java

private static void file(String path) {
    File destDir = new File(path);
    Log.d(TAG, destDir.getAbsolutePath());
    if (!destDir.exists()) {
        Log.d(TAG, "false");
        destDir.mkdirs();//from   w  w  w . j a  v a2  s  .  c  o m
    }
}

From source file:Main.java

public static void d(String msg) {
    if (IS_DEBUG) {
        Log.d(TAG, "-->" + msg);
    }
}

From source file:Main.java

public static void d(String tag, String text) {
    if (debug) {
        Log.d(tag, text);
    }
}

From source file:Main.java

static public boolean removeBond(Class btClass, BluetoothDevice btDevice) throws Exception {
    Log.d("lxh", " obd bluetooth removeBond");
    Method removeBondMethod = btClass.getMethod("removeBond");
    Boolean returnValue = (Boolean) removeBondMethod.invoke(btDevice);
    return returnValue.booleanValue();
}

From source file:Main.java

public static String toURLEncoded(String paramString) {
    if (paramString == null || paramString.equals("")) {
        Log.d("h", "toURLEncoded error:" + paramString);
        return "";
    }/*from ww  w.  j  a v  a  2 s  .c  o m*/

    try {
        String str = new String(paramString.getBytes(), "UTF-8");
        str = URLEncoder.encode(str, "UTF-8");
        return str;
    } catch (Exception localException) {
        Log.d("h", "toURLEncoded error:" + paramString, localException);
    }

    return "";
}

From source file:Main.java

public static void logd(int message) {
    Log.d(TAG, "" + message);
}

From source file:Main.java

public static void openAbout(Activity a) {
    Log.d("about", "openAbout has been called");
    //Log.d("context", "context = "+ c.toString());
    AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(a);

    alertDialogBuilder.setTitle("About");

    alertDialogBuilder.setMessage(//from w  ww. jav a2s  .c  o  m
            "This app was developed for CS160 at UC Berkeley by:\n\nDominic Kong \nPatrick Lin \nMeghana Seshadri \nJane Sima")
            .setCancelable(true).setNeutralButton("Close", new DialogInterface.OnClickListener() {
                @Override
                public void onClick(DialogInterface dialog, int which) {
                    dialog.cancel();
                }
            });
    AlertDialog alertDialog = alertDialogBuilder.create();
    alertDialog.show();
}

From source file:Main.java

static public void makeLog(String message) {
    if (DEBUG_MODE)
        Log.d(LOG_NAME, message);
}

From source file:Main.java

public static void d(String from, Object... params) {
    try {// w w  w.  j a v a  2 s.  com
        Log.d(TAG, generateLogMessage(from, params));
    } catch (Exception e) {
        System.out.println("[" + TAG + "] - " + generateLogMessage(from, params));
    }
}