Example usage for android.util Log v

List of usage examples for android.util Log v

Introduction

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

Prototype

public static int v(String tag, String msg) 

Source Link

Document

Send a #VERBOSE log message.

Usage

From source file:edu.umich.flowfence.common.QMDetails.java

public void readFromParcel(Parcel source) {
    final int length = source.readInt();
    final int endPos = source.dataPosition() + length;

    if (localLOGV) {
        Log.v(TAG, "Unparceling, length " + length);
    }/*from  ww w. j  a v a  2s.  c o  m*/

    if (source.dataPosition() < endPos) {
        descriptor = QMDescriptor.readFromParcel(source);
        if (localLOGV) {
            Log.v(TAG, "Descriptor: " + descriptor);
        }
    }
    if (source.dataPosition() < endPos) {
        resultType = source.readString();
        if (localLOGV) {
            Log.v(TAG, "Result type: " + resultType);
        }
    }
    if (source.dataPosition() < endPos) {
        paramInfo = source.createTypedArrayList(ParamInfo.CREATOR);
        if (paramInfo != null) {
            if (localLOGV) {
                Log.v(TAG, "Param info (size " + paramInfo.size() + "):");
                for (ParamInfo pi : paramInfo) {
                    Log.v(TAG, "    " + pi);
                }
            }
            paramInfo = Collections.unmodifiableList(paramInfo);
        } else if (localLOGV) {
            Log.v(TAG, "Param info (null)");
        }
    }
    if (source.dataPosition() < endPos) {
        requiredTaints = TaintSet.readFromParcel(source);
        if (localLOGV) {
            Log.v(TAG, "Required taints: " + requiredTaints);
        }
    }
    if (source.dataPosition() < endPos) {
        optionalTaints = TaintSet.readFromParcel(source);
        if (localLOGV) {
            Log.v(TAG, "Optional taints: " + optionalTaints);
        }
    }
    if (source.dataPosition() < endPos) {
        if (localLOGD) {
            Log.d(TAG, "Excess data at end of parcel");
        }
        source.setDataPosition(endPos);
    }
}

From source file:com.finlay.geomonsters.MyIOCallback.java

@Override
public void onConnect() {
    Log.v(TAG, "Connection established");
    _mainActivity.appendMessage("Connection established.");
}

From source file:com.test.mytest.network.request.VolleyRequest.java

/**
 * Creates a new request with the given method.
 *
 * @param method the request {@link com.android.volley.Request.Method} to use
 * @param url URL to fetch the string at
 * @param listener Listener to receive the String response
 * @param errorListener Error listener, or null to ignore errors
 */// w ww  .j a  va  2 s. co  m
public VolleyRequest(int method, String url, Listener<String> listener, ErrorListener errorListener,
        Cache.Entry entry) {
    super(method, url, errorListener);
    mListener = listener;
    this.entry = entry;
    if (entry != null) {
        Log.v("222", "last etag: " + entry.etag);
    }
}

From source file:edu.umich.oasis.common.SodaDetails.java

public void readFromParcel(Parcel source) {
    final int length = source.readInt();
    final int endPos = source.dataPosition() + length;

    if (localLOGV) {
        Log.v(TAG, "Unparceling, length " + length);
    }/*from ww  w . jav a  2s .c o  m*/

    if (source.dataPosition() < endPos) {
        descriptor = SodaDescriptor.readFromParcel(source);
        if (localLOGV) {
            Log.v(TAG, "Descriptor: " + descriptor);
        }
    }
    if (source.dataPosition() < endPos) {
        resultType = source.readString();
        if (localLOGV) {
            Log.v(TAG, "Result type: " + resultType);
        }
    }
    if (source.dataPosition() < endPos) {
        paramInfo = source.createTypedArrayList(ParamInfo.CREATOR);
        if (paramInfo != null) {
            if (localLOGV) {
                Log.v(TAG, "Param info (size " + paramInfo.size() + "):");
                for (ParamInfo pi : paramInfo) {
                    Log.v(TAG, "    " + pi);
                }
            }
            paramInfo = Collections.unmodifiableList(paramInfo);
        } else if (localLOGV) {
            Log.v(TAG, "Param info (null)");
        }
    }
    if (source.dataPosition() < endPos) {
        requiredTaints = TaintSet.readFromParcel(source);
        if (localLOGV) {
            Log.v(TAG, "Required taints: " + requiredTaints);
        }
    }
    if (source.dataPosition() < endPos) {
        optionalTaints = TaintSet.readFromParcel(source);
        if (localLOGV) {
            Log.v(TAG, "Optional taints: " + optionalTaints);
        }
    }
    if (source.dataPosition() < endPos) {
        if (localLOGD) {
            Log.d(TAG, "Excess data at end of parcel");
        }
        source.setDataPosition(endPos);
    }
}

From source file:com.vendsy.bartsy.venue.GCMIntentService.java

@Override
protected void onRegistered(Context context, String registrationId) {
    Log.v(TAG, "senderid :::" + WebServices.SENDER_ID);
    Log.v(TAG, "in on registered method");
    Log.v(TAG, "Device registered: regId = " + registrationId);

    SharedPreferences settings = getSharedPreferences(REG_ID, 0);
    // String uname = settings.getString("user", "").toString();
    SharedPreferences.Editor editor = settings.edit();
    editor.putString("RegId", registrationId);

    editor.commit();/*w w w .jav a  2s . co m*/
}

From source file:fm.krui.kruifm.DJInfoFetcher.java

@Override
protected DJ doInBackground(Void... params) {
    Log.v(TAG, "Entering DJInfo doInBackground");
    // Get DJ information from the latest track update, so we only need to retrieve one record.
    String apiQuery = "http://staff.krui.fm/api/playlist/main/items.json?limit="
            + Integer.toString(RECORD_COUNT);
    JSONArray arr = JSONFunctions.getJSONArrayFromURL(apiQuery);
    DJ dj = new DJ();
    try {/*from  w  ww  .jav a  2s .co  m*/
        // Hardcoded numbers are lame, but the staff.krui.fm api isn't the cleanest...
        JSONArray nestedArray = arr.getJSONArray(0);
        JSONObject o = nestedArray.getJSONObject(0);

        // Get the user JSON object
        JSONObject userObj = o.getJSONObject(Track.KEY_USER);

        // Add retrieved data to DJ object.
        dj.setFirstName(userObj.getString(DJ.KEY_FIRST_NAME));
        Log.v(TAG, "Got first name: " + userObj.getString(DJ.KEY_FIRST_NAME));
        dj.setLastName(userObj.getString(DJ.KEY_LAST_NAME));
        Log.v(TAG, "Got last name: " + userObj.getString(DJ.KEY_LAST_NAME));
        dj.setUrl(userObj.getString(DJ.KEY_URL));
        Log.v(TAG, "Got URL: " + userObj.getString(DJ.KEY_URL));
        dj.setBio(userObj.getString(DJ.KEY_BIO));
        Log.v(TAG, "Got bio: " + userObj.getString(DJ.KEY_BIO));
        dj.setTwitter(userObj.getString(DJ.KEY_TWITTER));
        Log.v(TAG, "Got twitter: " + userObj.getString(DJ.KEY_TWITTER));
        dj.setImageURL(userObj.getString(DJ.KEY_IMAGE));
        Log.v(TAG, "Got image URL: " + userObj.getString(DJ.KEY_IMAGE));

    } catch (JSONException e) {
        e.printStackTrace();
    }

    // Return the DJ object.
    return dj;
}

From source file:com.cbtec.eliademy.GCMIntentService.java

@Override
protected void onRegistered(Context context, String registrationId) {
    Log.d(TAG, "Device registered: regId = " + registrationId);
    JSONObject json;/*from   w  w  w .j av a 2 s  . c  o m*/

    try {
        json = new JSONObject().put("event", "registered");
        json.put("registrationId", registrationId);
        Log.v(TAG, json.toString());
        GCMPlugin.sendJavascript(json);
    } catch (JSONException e) {
        Log.e(TAG, "JSON exception: " + e.getMessage());
    }
}

From source file:Main.java

/**
 * get the returned information (a string) from DrmInfoStatus instance
 *
 * @param status DrmInfoStatus instance// ww  w.  ja v  a 2s. c  o  m
 * @return The message contained in DrmInfoStatus. may be empty
 */
public static String getMsgFromInfoStatus(DrmInfoStatus status) {
    byte[] data = status.data.getData();
    String message = "";
    if (null != data) {
        try {
            // the information shall be in format of ASCII string
            message = new String(data, "US-ASCII");
        } catch (UnsupportedEncodingException e) {
            Log.e(TAG, "Unsupported encoding type");
            message = "";
        }
    }

    Log.v(TAG, "getMsgFromInfoStatus : >" + message);
    return message;
}

From source file:com.bez4pieci.cookies.Cookies.java

public void clear() {
    Log.v(TAG, "Clearing cookies...");
    CookieManager.getInstance().removeAllCookie();
}

From source file:be.benvd.mvforandroid.data.MVDataHelper.java

/**
 * Returns the GET response of the given url.
 * /*www . j a v  a2  s.  c  om*/
 * @throws IOException
 * @return The response of the given URL. If no response was found, null is
 *         returned.
 */
public static String getResponse(String username, String password, String url) throws IOException {
    /*      DefaultHttpClient httpclient = new DefaultHttpClient();
          httpclient.getCredentialsProvider().setCredentials(new AuthScope(null, -1), new UsernamePasswordCredentials(username + ":" + password));
          HttpGet httpget = new HttpGet(url);
          HttpResponse response = httpclient.execute(httpget);
    */
    DefaultHttpClient httpclient = new DefaultHttpClient();
    Credentials creds = new UsernamePasswordCredentials(username, password);
    httpclient.getCredentialsProvider().setCredentials(new AuthScope(null, -1), creds);

    String auth = android.util.Base64.encodeToString((username + ":" + password).getBytes("UTF-8"),
            android.util.Base64.NO_WRAP);

    HttpGet httpget = new HttpGet(url);
    httpget.addHeader("Authorization", "Basic " + auth);
    HttpResponse response = httpclient.execute(httpget);

    if (response.getEntity() != null) {
        BufferedReader reader = new BufferedReader(new InputStreamReader(response.getEntity().getContent()));
        StringBuilder sb = new StringBuilder();

        String line = null;
        while ((line = reader.readLine()) != null) {
            sb.append(line);
        }
        reader.close();
        Log.v(MVDataHelper.class.getSimpleName(), "Response:" + sb.toString());
        return sb.toString();
    }

    return null;
}