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:org.lumicall.android.sip.RegisterOtherAccount.java

private void doMainActivity() {
    final Intent intent = new Intent(RegisterOtherAccount.this, org.sipdroid.sipua.ui.Sipdroid.class);
    Log.v(TAG, "going to main activity");
    startActivity(intent);//  w w w .ja  va  2  s.  c o  m
    finish();
}

From source file:org.mythtv.service.frontends.v25.StatusHelperV25.java

private Status downloadStatus(final LocationProfile locationProfile, final String url)
        throws RemoteException, OperationApplicationException {
    Log.v(TAG, "downloadHosts : enter");

    Status status = null;//  ww  w  . j av a2 s. c om

    ResponseEntity<org.mythtv.services.api.v025.beans.FrontendStatus> responseEntity = mMythServicesTemplate
            .frontendOperations().getStatus(ETagInfo.createEmptyETag());

    if (responseEntity.getStatusCode().equals(HttpStatus.OK)) {

        org.mythtv.services.api.v025.beans.FrontendStatus versionStatus = responseEntity.getBody();

        if (null != versionStatus) {
            status = load(versionStatus);
        }

    }

    Log.v(TAG, "downloadHosts : exit");
    return status;
}

From source file:org.mythtv.service.frontends.v26.StatusHelperV26.java

private Status downloadStatus(final LocationProfile locationProfile, final String url)
        throws RemoteException, OperationApplicationException {
    Log.v(TAG, "downloadHosts : enter");

    Status status = null;/*from   ww  w  .  ja v  a  2s .  c  o m*/

    ResponseEntity<org.mythtv.services.api.v026.beans.FrontendStatus> responseEntity = mMythServicesTemplate
            .frontendOperations().getStatus(ETagInfo.createEmptyETag());

    if (responseEntity.getStatusCode().equals(HttpStatus.OK)) {

        org.mythtv.services.api.v026.beans.FrontendStatus versionStatus = responseEntity.getBody();

        if (null != versionStatus) {
            status = load(versionStatus);
        }

    }

    Log.v(TAG, "downloadHosts : exit");
    return status;
}

From source file:org.mythtv.service.frontends.v27.StatusHelperV27.java

private Status downloadStatus(final LocationProfile locationProfile, final String url)
        throws RemoteException, OperationApplicationException {
    Log.v(TAG, "downloadHosts : enter");

    Status status = null;//from  w ww  . jav a  2  s . c om

    ResponseEntity<org.mythtv.services.api.v027.beans.FrontendStatus> responseEntity = mMythServicesTemplate
            .frontendOperations().getStatus(ETagInfo.createEmptyETag());

    if (responseEntity.getStatusCode().equals(HttpStatus.OK)) {

        org.mythtv.services.api.v027.beans.FrontendStatus versionStatus = responseEntity.getBody();

        if (null != versionStatus) {
            status = load(versionStatus);
        }

    }

    Log.v(TAG, "downloadHosts : exit");
    return status;
}

From source file:de.jamoo.muzei.WallSource.java

protected void onTryUpdate(int reason) throws RetryException {
    if (DEBUG)/*  w  ww .ja v a  2 s .c om*/
        Log.w(TAG, "onTryUpdate");

    if (!isConnectedAsPreferred()) {
        scheduleUpdate(System.currentTimeMillis() + getRotateTimeMillis());
        if (DEBUG)
            Log.v(TAG, "Cancelled! Wrong connection!");
        return;
    }

    String currentToken = (getCurrentArtwork() != null) ? getCurrentArtwork().getToken() : null;

    String WALL_URL = getString(R.string.config_wallpaper_manifest_url);

    JSON response = getJson(WALL_URL);

    if (response == null) {
        throw new RetryException();
    }

    if (response.All.size() == 0) {
        Log.w(TAG, "Whoops! No walls returned!");
        scheduleUpdate(System.currentTimeMillis() + getRotateTimeMillis());
        return;
    }

    List<String> categories = getCategories(response);

    PreferenceHelper.categoriesToPref(WallSource.this, categories);

    ArrayList<NodeWallpaper> wallpapers = getValidWalls(response);

    if (wallpapers.size() == 0 || wallpapers == null) {
        Log.i(TAG, "No valid walls returned.");
        scheduleUpdate(System.currentTimeMillis() + getRotateTimeMillis());
        return;
    }

    Random random = new Random();
    NodeWallpaper wall;
    String token;

    while (true) {
        wall = wallpapers.get(random.nextInt(wallpapers.size()));
        token = wall.url;
        if (wallpapers.size() <= 1 || !TextUtils.equals(token, currentToken)) {
            Log.i(TAG, "Selected wall: " + wall.name);
            break;
        }
    }
    ;

    publishArtwork(new Artwork.Builder().title(wall.name).byline(wall.author).imageUri(Uri.parse(wall.url))
            .token(token).viewIntent(new Intent(Intent.ACTION_VIEW, Uri.parse(wall.url))).build());

    scheduleUpdate(System.currentTimeMillis() + getRotateTimeMillis());
}

From source file:com.secretparty.app.MainActivity.java

private void openParty(Party p) {
    SharedPreferences prefs = getPreferences(MODE_PRIVATE);
    Log.v("creation", "PartyDate:" + p.getFinishDate().toLocaleString());
    prefs.edit()//.putInt(getString(R.string.SP_user_id), user.getId())
            .putInt(getString(R.string.SP_party_id), p.getId())
            .putLong(getString(R.string.SP_date_party_end), p.getFinishDate().getTime()).commit();
    this.mCurrentParty = p;

    PartyFragment newFragment = new PartyFragment();

    FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();
    transaction.replace(R.id.container, newFragment);
    transaction.addToBackStack(null);//from   ww  w .  jav a2 s  .c o  m
    transaction.commit();
}

From source file:Main.java

/**
 * This method is used to create a sample size for a bitmap given the
 * required size and the Options class for the bitmap.
 * //from   w w w.  ja v a 2s . com
 * Run this method after first running
 * 
 * <pre>
 * <code>
 * final BitmapFactory.Options foo = new BitmapFactory.Options();
 * foo.inJustDecodeBounds = true; 
 * BitmapFactory.decodeResource(Resources, int, foo);
 * </code>
 * </pre>
 * 
 * Then set the output to <code>foo.inSampleSize</code> and then decode the
 * image.
 * 
 * (If using the same BitmapFactory, remember to change
 * <code>inJustDecodeBounds</code> back to false.)
 * 
 * This method was taken from the Developer tutorial on the android website
 * (licensed under Creative Commons) The original source can be found here:
 * {@link http
 * ://developer.android.com/training/displaying-bitmaps/load-bitmap.html}
 * 
 * @param options
 *            A bitmap options class created with
 * @param reqWidth
 *            The preferred width of the image.
 * @param reqHeight
 *            The preferred height of the image.
 * @return The sample size (to be used set to options.inSampleSize)
 */
public static int calculateInSampleSize(BitmapFactory.Options options, float reqWidth, float reqHeight) {
    // Raw height and width of image
    final int height = options.outHeight;
    final int width = options.outWidth;
    int inSampleSize = 1;

    if (height > reqHeight || width > reqWidth) {
        // Calculate ratios of height and width to requested height and
        // width
        final int heightRatio = Math.round(height / reqHeight);
        final int widthRatio = Math.round(width / reqWidth);

        // Choose the smallest ratio as inSampleSize value, this will
        // guarantee
        // a final image with both dimensions larger than or equal to the
        // requested height and width.
        inSampleSize = heightRatio < widthRatio ? heightRatio : widthRatio;
    }
    Log.v(TAG, "inSampleSize = " + inSampleSize);
    return inSampleSize;
}

From source file:com.jeffreyawest.weblogic.rest.WebLogicDemoRestAdapter.java

private <T extends WebLogicEntity> HashMap<String, T> initObjects(String assetFileName, Class<T> theClass) {

    HashMap<String, T> returnMe = new HashMap<String, T>(7);

    JSONObject jsonMessage = null;//from  ww w . ja  v a  2  s . c o m
    ObjectMapper om = new ObjectMapper();

    try {
        String json = getFileData(assetFileName);
        jsonMessage = new JSONObject(json);

        Log.v(LOG_TAG, "Class: " + theClass + " JSON: " + jsonMessage.toString(2));

        JSONArray array = jsonMessage.getJSONObject("body").getJSONArray("items");

        for (int i = 0; i < array.length(); i++) {
            T theType = om.readValue(array.getString(i), theClass);
            theType.setOriginalJSON(jsonMessage.toString(2));

            returnMe.put(theType.getName(), theType);
        }
    } catch (JSONException e) {
        e.printStackTrace();
    } catch (Exception e) {
        e.printStackTrace();
    }
    return returnMe;
}

From source file:com.sonymobile.android.media.internal.VUParser.java

public VUParser(FileDescriptor fd, long offset, long length) {
    super(fd, offset, length);
    if (LOGS_ENABLED)
        Log.v(TAG, "create VUParser from FileDescriptor");
}

From source file:com.github.hobbe.android.openkarotz.fragment.ColorFragment.java

@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    Log.v(LOG_TAG, "onCreateView, bundle: " + savedInstanceState);

    // Fetch the selected page number
    int index = getArguments().getInt(MainActivity.ARG_PAGE_NUMBER);

    // List of pages
    String[] pages = getResources().getStringArray(R.array.pages);

    // Page title
    String pageTitle = pages[index];
    getActivity().setTitle(pageTitle);/*  w  ww.  j a va 2  s. c  om*/

    View view = inflater.inflate(R.layout.page_color, container, false);

    initializeView(view);

    // Load default values
    new GetPulseTask(getActivity()).execute();
    new GetColorTask(getActivity()).execute();

    return view;
}