Example usage for android.util Log i

List of usage examples for android.util Log i

Introduction

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

Prototype

public static int i(String tag, String msg) 

Source Link

Document

Send an #INFO log message.

Usage

From source file:Main.java

public static String getPhoneName() {
    myDevice = BluetoothAdapter.getDefaultAdapter();
    String deviceName = myDevice.getName();
    Log.i("DEVICE_NAME : ", deviceName);
    return deviceName;
}

From source file:Main.java

public static void GetSUAccess() {
    Thread su = new Thread(new Thread() {
        public void run() {
            try {
                Log.i("SU", "Trying to grant access to port...");
                Process suProcess = Runtime.getRuntime().exec("su");

                DataOutputStream os = new DataOutputStream(suProcess.getOutputStream());

                if (null != os) {
                    os.writeBytes("chmod 666 /dev/ttymxc1 \n");
                    os.flush();/*  ww w.  j  a va2 s .  com*/
                }
                Log.i("SU", "Granted Access to Port");
            } catch (IOException e) {
                Log.e("SU", "Grant SuperUser Access Failed");
            }
        }
    });
    su.start();
}

From source file:Main.java

/**
 * Logs the data to the android Log.i . 
 * /*from www .  ja  v  a 2s . c  o  m*/
 * @param tag
 * @param msg
 */
public static void i(String tag, String... msg) {
    if (show) {
        Log.i(tag, toString(msg));
    }
}

From source file:Main.java

public static void logi(String msg) {
    if (isShow) {
        Log.i("LM", msg);
    }
}

From source file:Main.java

public static boolean isMobileNO(String mobiles) {
    Pattern p = Pattern.compile("^((13[0-9])|(15[^4,\\D])|(18[0,5-9]))\\d{8}$");
    Matcher m = p.matcher(mobiles);
    Log.i("BaseUtils-->isMobileNO-->", m.matches() + "");
    return m.matches();
}

From source file:Main.java

public static void latencyLog(String data) {
    data = data.substring(data.indexOf("time-") + 5);
    long started = Long.parseLong(data);
    long current = System.currentTimeMillis();
    Log.i("Latency", String.valueOf(current - started));

}

From source file:Main.java

public static String deletaDec(String de) {
    try {/*from w  w  w  .  j a va 2  s. c  om*/
        float tem = Float.parseFloat(de);
        return String.valueOf((int) tem);
    } catch (Exception e) {
        Log.i(LOG_TAG, "deletaDec exception : wind = " + de);
        return "0";
    }
}

From source file:Main.java

public static void onBluetooth() {
    BluetoothAdapter bluetoothAdapter = BluetoothAdapter.getDefaultAdapter();
    if (!bluetoothAdapter.isEnabled()) {
        bluetoothAdapter.enable();//from w  w w  . ja v  a 2 s  .  c om
        Log.i("Log", "Bluetooth is Enabled");
    }
}

From source file:Main.java

/**
 * info log/*from w w w . j a v a 2 s  . c o m*/
 * @param msg log msg
 */
public static void i(String msg) {
    if (LOG_ENABLE) {
        Log.i(TAG, buildMsg(msg));
    }
}

From source file:Main.java

/**
 * Clients can retrieve error messages statically.
 * /*from w  w w  . j a v  a 2s. c  o  m*/
 * @return errorMessage
 */
public static String getErrorMessage() {
    Log.i(TAG, "getErrorMessage = " + errorMessage);
    return errorMessage;
}