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:com.funzio.pure2D.ui.UIManager.java

/**
 * Load a config file, synchronously/*from w w w .  java 2 s .  c  om*/
 *
 * @param assets
 * @param filePath
 */
public UIConfigVO loadConfig(final String filePath) {
    Log.v(TAG, "load(): " + filePath);

    final ReadTextFileTask readTask = new ReadTextFileTask(mResources.getAssets(), filePath);
    if (readTask.run()) {
        Log.v(TAG, "Load success: " + filePath);

        try {
            mConfigVO = new UIConfigVO(new JSONObject(readTask.getContent()));
            if (mConfigVO.texture_manager.cache_dir == null
                    || mConfigVO.texture_manager.cache_dir.length() == 0) {
                // default cache dir
                mConfigVO.texture_manager.cache_dir = Environment.getExternalStorageDirectory()
                        + "/Android/data/" + mPackageName + "/";
            }

            // Log.e("long", mConfigVO.texture_manager.cache_dir);
        } catch (JSONException e) {
            Log.e(TAG, "Load failed: " + filePath, e);
        }

    } else {
        Log.e(TAG, "Load failed: " + filePath);
    }

    return mConfigVO;
}

From source file:ch.ethz.dcg.pancho3.view.youtube.Query.java

public InputStream getVideosInputStreamFromUrl(String urlStr) throws Exception {
    //   String urlStr = getQueryURL();
    Log.v(TAG, urlStr);
    HttpGet httpGet = new HttpGet(urlStr);
    Log.v(TAG, "httpGet has been created");
    HttpResponse httpResp = httpClient.execute(httpGet);
    Log.v(TAG, "httpResp has been created");
    HttpEntity httpEntity = httpResp.getEntity();
    Log.v(TAG, "httpEntity has been created");
    InputStream is = httpEntity.getContent();
    Log.v(TAG, "InputStream has been created: " + is);
    return is;/*from  w  w  w  .ja  v a2s . c  o m*/
}

From source file:eu.masconsult.bgbanking.accounts.AccountAuthenticator.java

@Override
public Bundle getAuthToken(AccountAuthenticatorResponse response, Account account, String authTokenType,
        Bundle options) throws NetworkErrorException {
    Log.v(TAG, "getAuthToken(account: " + account + ", authTokenType: " + authTokenType + ")");

    Bank bank = Bank.fromAccountType(context, account.type);
    if (bank == null) {
        throw new IllegalArgumentException("unsupported account type " + account.type);
    }//from  w ww .j  a  v  a2s .  co  m
    if (!Constants.getAuthorityType(context).equals(authTokenType)) {
        throw new IllegalArgumentException("unsupported authTOkenType " + authTokenType);
    }

    final Intent intent = new Intent(context, LoginActivity.class);
    intent.putExtra(KEY_ACCOUNT_AUTHENTICATOR_RESPONSE, response);
    intent.putExtra(KEY_ACCOUNT_NAME, account.name);
    intent.putExtra(KEY_ACCOUNT_TYPE, account.type);

    String password = accountManager.getPassword(account);
    try {
        String authToken = bank.getClient().authenticate(account.name, password);
        Log.v(TAG, "obtained auth token " + authToken);

        if (authToken == null) {
            throw new AuthenticationException("no authToken");
        }

        // store the new auth token and return it
        accountManager.setAuthToken(account, authTokenType, authToken);
        intent.putExtra(KEY_AUTHTOKEN, authToken);
        return intent.getExtras();
    } catch (ParseException e) {
        Log.w(TAG, "ParseException", e);
        Bundle bundle = new Bundle();
        bundle.putInt(KEY_ERROR_CODE, 1);
        bundle.putString(KEY_ERROR_MESSAGE, e.getMessage());
        return bundle;
    } catch (IOException e) {
        Log.w(TAG, "IOException", e);
        throw new NetworkErrorException(e);
    } catch (CaptchaException e) {
        Log.w(TAG, "CaptchaException", e);
        // We need human to verify captcha
        final Bundle bundle = new Bundle();
        bundle.putParcelable(AccountManager.KEY_INTENT, intent);
        intent.putExtra(KEY_CAPTCHA_URI, e.getCaptchaUri());
        return bundle;
    } catch (AuthenticationException e) {
        Log.w(TAG, "AuthenticationException", e);
        // we need new credentials
        final Bundle bundle = new Bundle();
        bundle.putParcelable(AccountManager.KEY_INTENT, intent);
        return bundle;
    }
}

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

/**
 * Passing some request headers//from  w ww . jav a2  s  .co  m
 * */
@Override
public Map<String, String> getHeaders() throws AuthFailureError {
    HashMap<String, String> headers = new HashMap<String, String>();
    //headers.put("Content-Type", "application/json");
    //headers.put("apiKey", "xxxxxxxxxxxxxxx");
    // headers.put("Accept", "application/json");
    if (entry != null && entry.etag != null)
        headers.put("If-None-Match", entry.etag);

    Log.v("222", "----send head----- ");
    for (String key : headers.keySet()) {
        Log.v("222", "key: " + key + " , " + headers.get(key));
    }
    Log.v("222", "----------------- ");
    return headers;
}

From source file:com.funzio.pure2D.particles.nova.NovaLoader.java

public boolean loadURL(final String urlPath, final String cachePath) {
    Log.v(TAG, "loadURL(): " + urlPath + ", " + cachePath);

    // read cache first
    if (cachePath != null && cachePath.length() > 0) {
        final ReadTextFileTask readTask = new ReadTextFileTask(cachePath);
        if (readTask.run()) {
            try {
                if (mListener != null) {
                    mListener.onLoad(NovaLoader.this, urlPath, new NovaVO(readTask.getContent()));
                }/*w w  w  . j a  va2s. c  o  m*/
            } catch (JSONException e) {
                Log.e(TAG, "Load JSON failed: " + urlPath, e);

                if (mListener != null) {
                    mListener.onError(NovaLoader.this, urlPath);
                }
            }
            return true;
        }
    }

    // load from url
    final URLLoadTextTask urlTask = new URLLoadJsonTask(urlPath);
    if (urlTask.run()) {
        final String json = urlTask.getStringBuilder().toString();
        try {
            if (mListener != null) {
                mListener.onLoad(NovaLoader.this, urlPath, new NovaVO(json));
            }
        } catch (JSONException e) {
            Log.e(TAG, "Load JSON failed: " + urlPath, e);

            if (mListener != null) {
                mListener.onError(NovaLoader.this, urlPath);
            }
        }
        // cache it
        if (cachePath != null && cachePath.length() > 0) {
            final WriteTextFileTask fileTask = new WriteTextFileTask(json, cachePath, false);
            fileTask.run();
        }

        return true;
    }

    return false;
}

From source file:uk.org.openseizuredetector.OsdUtil.java

/**
 * updatePrefs() - update basic settings from the SharedPreferences
 * - defined in res/xml/prefs.xml//from   www  . j av a  2 s.c o m
 */
public void updatePrefs() {
    Log.v(TAG, "updatePrefs()");
    SharedPreferences SP = PreferenceManager.getDefaultSharedPreferences(mContext);
    try {
        mLogAlarms = SP.getBoolean("LogAlarms", true);
        Log.v(TAG, "updatePrefs() - mLogAlarms = " + mLogAlarms);
        mLogData = SP.getBoolean("LogData", false);
        Log.v(TAG, "updatePrefs() - mLogData = " + mLogData);
        mLogSystem = SP.getBoolean("LogSystem", true);
        Log.v(TAG, "updatePrefs() - mLogSystem = " + mLogSystem);

    } catch (Exception ex) {
        Log.v(TAG, "updatePrefs() - Problem parsing preferences!");
        showToast(
                "Problem Parsing Preferences - Something won't work - Please go back to Settings and correct it!");
    }
}

From source file:com.example.run_tracker.CustomListAdapter.java

@Override
public void onClick(View arg0) {
    String track_id = TrackItems.get((int) arg0.getTag()).getId();
    int track_position = (int) arg0.getTag();
    Log.v(TAG, "" + track_position);

    // shity hacks
    hack_position = track_position;// ww  w  .  ja  va  2  s. c o  m
    hack_id = track_id;
    // ------------
    show_confirm();

}

From source file:pl.xsolve.verfluchter.rest.RestClient.java

public RestResponse execute(String domain, RequestMethod method) throws IOException {
    RestResponse response = null;/*from  w ww  .  j a  v a 2 s .  c o m*/

    addHeader("Pragma", "no-cache");
    addHeader("Cache-Control", "no-cache");
    addHeader("User-Agent", Constants.USER_AGENT);

    switch (method) {
    case GET:
        Log.v(TAG, "Performing " + method + " on " + domain);
        response = doGET(domain);
        break;
    case POST:
        Log.v(TAG, "Performing " + method + " on " + domain);
        response = doPOST(domain);
        break;
    }

    return response;
}

From source file:fi.iki.murgo.irssinotifier.IrssiNotifierActivity.java

public static void refreshIsNeeded() {
    Log.v(TAG, "Refreshing would be refreshing");
    needsRefresh = true;
}

From source file:com.hoccer.api.android.LinccLocationManager.java

@Override
public void onLocationChanged(Location location) {
    Log.v("LinccLocationManager", location.toString());
    if (mUpdater != null) {
        mUpdater.updateNow();//from w  w  w . ja  va2 s  .  c om
    }
    // try {
    // refreshLocation();
    // } catch (ClientProtocolException e) {
    // // TODO Auto-generated catch block
    // e.printStackTrace();
    // } catch (UpdateException e) {
    // // TODO Auto-generated catch block
    // e.printStackTrace();
    // } catch (IOException e) {
    // // TODO Auto-generated catch block
    // e.printStackTrace();
    // }
}