List of usage examples for android.util Log d
public static int d(String tag, String msg)
From source file:Main.java
private static String getUrl(String search) { Uri builtUri = Uri.parse(url).buildUpon().appendQueryParameter("q", search) .appendQueryParameter("maxResults", "20").build(); Log.d("DEBUG", builtUri.toString() + ". Search = " + search); return builtUri.toString(); }
From source file:Main.java
public static void exitAudioTrack() { if (m_out_trk != null) { m_out_trk.stop();//from w w w.j a va2 s.c o m m_out_trk.release(); m_out_trk = null; Log.d(TAG, "### audio track release."); } }
From source file:Main.java
public static void d(String msg) { if (SHOW) { Log.d(TAG, msg); } }
From source file:Main.java
public static String getWifiName(Context ctx) { WifiManager wifiManager = (WifiManager) ctx.getSystemService(Context.WIFI_SERVICE); WifiInfo wifiInfo = wifiManager.getConnectionInfo(); Log.d("wifiInfo", wifiInfo.toString()); Log.d("SSID", wifiInfo.getSSID()); return wifiInfo.getSSID(); }
From source file:Main.java
public static String decodeParams(List<NameValuePair> params, String queryString) { if (params != null) { queryString = "?" + URLEncodedUtils.format(params, "UTF-8"); Log.d("queryString", queryString); } else {/*from w ww .j a v a 2s . co m*/ queryString = ""; Log.d("queryString", "empty query string"); } return queryString; }
From source file:Main.java
public static void d(String tag, String msg) { if (isShow) { Log.d(tag, msg); } }
From source file:Main.java
public static Uri getOutputImageFileURL() { Log.d(LOG_MESSAGE, "external dir:" + Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES).getAbsolutePath()); File mediaStorageDir = new File( Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES), IMAGE_DIRECTORY); if (!mediaStorageDir.exists()) { if (!mediaStorageDir.mkdirs()) { Log.d(LOG_MESSAGE, "failed to create directory"); return null; }//from w w w . j a v a 2 s . co m } String timeStamp = new SimpleDateFormat("yyyyMMdd_HHmmss").format(new Date()); File mediaFile = new File(mediaStorageDir.getAbsolutePath() + File.separator + "IMG_" + timeStamp + ".png"); return Uri.fromFile(mediaFile); }
From source file:Main.java
public static void unpairDevice(BluetoothDevice device) { try {//from w ww. ja v a 2 s .co m Method m = device.getClass().getMethod("removeBond", (Class[]) null); m.invoke(device, (Object[]) null); } catch (Exception e) { Log.d("BlueUtils", e.getMessage()); } }
From source file:Main.java
public static int getPixels(Context context, int dipValue) { Resources r = context.getResources(); int px = (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, dipValue, r.getDisplayMetrics()); Log.d("getPixels", "" + px); return px;/* w w w . j av a 2 s .c o m*/ }
From source file:Main.java
public static int fileSize(String dir, String fileName) { File sdLien = Environment.getExternalStorageDirectory(); File inFile = new File(sdLien + File.separator + dir + File.separator + fileName); Log.d(TAG, "path of file : " + inFile); if (!inFile.exists()) { throw new RuntimeException("File doesn't exist"); }//w w w . j a v a2 s .c o m return ((int) inFile.length()); }