List of usage examples for android.util Log i
public static int i(String tag, String msg)
From source file:Main.java
/** * network tools/*from w ww . j ava2 s . c om*/ * */ public static boolean isWifiEnable(Context context) { WifiManager wifiManager = (WifiManager) context.getSystemService(Context.WIFI_SERVICE); Log.i(TAG, "wifiEnable" + wifiManager.isWifiEnabled()); return wifiManager.isWifiEnabled(); }
From source file:Main.java
public static String searchForPattern(String message, String pattern) { Pattern first = Pattern.compile(pattern); Matcher match = first.matcher(message); if (match.find()) { String str = match.group(0); Log.i("searchForPattern", str); return str; }/*from w w w . j a v a2 s. c om*/ Log.i("searchForPattern", "no match found"); return null; }
From source file:Main.java
public static void ZLog(String Tag, float Message) { if (BaatnaLog) Log.i(Tag, Message + ""); }
From source file:Main.java
public static void setRingerModeBack(Context context) { if (currentMode == AudioManager.RINGER_MODE_NORMAL) { setRinger2Normal(context);//from ww w .java2 s .c om Log.i("Restored Mode normal", currentVolume + ""); } else if (currentMode == AudioManager.RINGER_MODE_VIBRATE) { setRinger2Vibrate(context); Log.i("Restored Mode vibrate", currentVolume + ""); } else if (currentMode == AudioManager.RINGER_MODE_SILENT) { setRinger2Silent(context); Log.i("Restored Mode Silent", currentVolume + ""); } else { Log.i("Nothing ", "Matched above"); } }
From source file:Main.java
/** * @brief log utility/* ww w. ja v a2s.c om*/ */ static private void log(Exception e) { if (enableLog) Log.i(TAG, Log.getStackTraceString(e)); }
From source file:Main.java
public static void i(String msg) { if (isDebug) Log.i(TAG, msg); }
From source file:Main.java
public static int GetAutorotateSetting(Activity activity) { int setting = 0; try {/*w ww . ja va 2 s . c o m*/ setting = Settings.System.getInt(activity.getContentResolver(), Settings.System.ACCELEROMETER_ROTATION); } catch (Exception e) { Log.i("RotationLockUtil", "Couldn't retrieve auto rotation setting: " + e.getMessage()); } return setting; }
From source file:Main.java
public static void listSupportPreviewSize(Camera.Parameters parameters) { if (parameters == null) { return;/*from w w w . j a v a 2 s.co m*/ } List<Camera.Size> list = parameters.getSupportedPreviewSizes(); for (int j = 0; j < list.size(); j++) { Camera.Size s = list.get(j); Log.i("CameraHelper", "support size : width=" + s.width + ",height=" + s.height); } }
From source file:Main.java
public static String getSocketLocalIpAddress() { String ipAddress = ""; Socket socket;/*from www .j a v a2 s. c om*/ try { socket = new Socket("www.google.com", 80); ipAddress = socket.getLocalAddress().toString(); ipAddress = ipAddress.replace("/", ""); Log.i(TAG, "IP by socket: " + ipAddress); socket.close(); return ipAddress; } catch (Exception e) { Log.i(TAG, e.getMessage()); } return ipAddress; }
From source file:Main.java
public static void i(String tag, String msg) { if (isDebug) { if (tag == null || "".equalsIgnoreCase(tag.trim())) { tag = mTag;//from w ww .jav a 2s . c o m } Log.i(tag, msg); } }