List of usage examples for android.util Log v
public static int v(String tag, String msg)
From source file:org.mythtv.service.content.v25.FileListHelperV25.java
private List<String> downloadFiles(final String storageGroupName) { Log.v(TAG, "downloadFiles : enter"); List<String> files = null; ResponseEntity<org.mythtv.services.api.ArrayOfString> responseEntity = mMythServicesTemplate .contentOperations().getFileList(storageGroupName, ETagInfo.createEmptyETag()); if (responseEntity.getStatusCode().equals(HttpStatus.OK)) { org.mythtv.services.api.ArrayOfString fileList = responseEntity.getBody(); if (null != fileList) { if (null != fileList.getValue() && fileList.getValue().length > 0) { files = load(fileList.getValue()); }//from w w w . j a v a 2s . c om } } Log.v(TAG, "downloadFiles : exit"); return files; }
From source file:org.mythtv.service.dvr.v25.RecordingRuleHelperV25.java
public boolean process(final Context context, final LocationProfile locationProfile) { Log.v(TAG, "process : enter"); if (!NetworkHelper.getInstance().isMasterBackendConnected(context, locationProfile)) { Log.w(TAG, "process : Master Backend '" + locationProfile.getHostname() + "' is unreachable"); return false; }/*w w w . j av a 2 s.c o m*/ mMythServicesTemplate = (MythServicesTemplate) MythAccessFactory.getServiceTemplateApiByVersion(mApiVersion, locationProfile.getUrl()); boolean passed = true; try { downloadRecordinRules(context, locationProfile); } catch (Exception e) { Log.e(TAG, "process : error", e); passed = false; } Log.v(TAG, "process : exit"); return passed; }
From source file:pt.up.mobile.authenticator.Authenticator.java
@Override public Bundle editProperties(AccountAuthenticatorResponse response, String accountType) { Log.v(TAG, "editProperties()"); throw new UnsupportedOperationException(); }
From source file:com.facebook.unity.FB.java
@UnityCallable public static void LoginWithReadPermissions(String params_str) { Log.v(TAG, "LoginWithReadPermissions(" + params_str + ")"); Intent intent = new Intent(getUnityActivity(), FBUnityLoginActivity.class); intent.putExtra(FBUnityLoginActivity.LOGIN_PARAMS, params_str); intent.putExtra(FBUnityLoginActivity.LOGIN_TYPE, FBUnityLoginActivity.LoginType.READ); getUnityActivity().startActivity(intent); }
From source file:com.klinker.android.twitter.utils.api_helper.TwitPicHelper.java
/** * posts the status onto Twitlonger, it then posts the shortened status (with link) to the user's twitter and updates the status on twitlonger * to include the posted status's id./*from w ww. j av a 2 s . com*/ * * @return id of the status that was posted to twitter */ public long createPost() { TwitPicStatus status = uploadToTwitPic(); Log.v("talon_twitpic", "past upload"); long statusId; try { Status postedStatus; StatusUpdate update = new StatusUpdate(status.getText()); if (replyToStatusId != 0) { update.setInReplyToStatusId(replyToStatusId); } if (location != null) { update.setLocation(location); } postedStatus = twitter.updateStatus(update); statusId = postedStatus.getId(); } catch (Exception e) { e.printStackTrace(); statusId = 0; } // if zero, then it failed return statusId; }
From source file:eu.masconsult.bgbanking.accounts.AccountAuthenticator.java
@Override public Bundle editProperties(AccountAuthenticatorResponse response, String accountType) { Log.v(TAG, "editProperties(accountType: " + accountType + ")"); // TODO Auto-generated method stub return null;// w ww .j ava 2s . c o m }
From source file:org.mythtv.service.channel.v25.ChannelHelperV25.java
public boolean process(final Context context, final LocationProfile locationProfile) { Log.v(TAG, "process : enter"); if (!NetworkHelper.getInstance().isMasterBackendConnected(context, locationProfile)) { Log.w(TAG, "process : Master Backend '" + locationProfile.getHostname() + "' is unreachable"); return false; }/* w w w . j a v a 2s . c o m*/ mMythServicesTemplate = (MythServicesTemplate) MythAccessFactory.getServiceTemplateApiByVersion(mApiVersion, locationProfile.getUrl()); if (null == mMythServicesTemplate) { Log.w(TAG, "process : Master Backend '" + locationProfile.getHostname() + "' is unreachable"); return false; } boolean passed = true; try { ResponseEntity<VideoSourceList> responseEntity = mMythServicesTemplate.channelOperations() .getVideoSourceList(ETagInfo.createEmptyETag()); if (responseEntity.getStatusCode().equals(HttpStatus.OK)) { Log.i(TAG, "process : response returned HTTP 200"); VideoSourceList videoSourceList = responseEntity.getBody(); if (null != videoSourceList) { // holder for all downloaded channel lists List<ChannelInfo> allChannelLists = new ArrayList<ChannelInfo>(); int nap = 1000; // 500ms & 1ms fail int count = 0; for (VideoSource videoSource : videoSourceList.getVideoSources()) { Log.i(TAG, "process : videoSourceId = '" + videoSource.getId() + "'"); // Download the channel listing, return list Log.v(TAG, "process : downloading channels"); ChannelInfo[] channelInfos = downloadChannels(context, locationProfile, videoSource.getId()); if (null != channelInfos) { allChannelLists.addAll(Arrays.asList(channelInfos)); } // wait a second before downloading the next one (if there are more than one video source) if (count < videoSourceList.getVideoSources().length - 1) { Log.i(TAG, "process : sleeping " + nap + " ms"); Thread.sleep(nap); } count++; } // Process the combined lists of downloaded channels if (null != allChannelLists && !allChannelLists.isEmpty()) { Log.i(TAG, "process : process all channels"); int channelsProcessed = load(context, locationProfile, allChannelLists); Log.v(TAG, "process : channelsProcessed=" + channelsProcessed); } } } } catch (Exception e) { Log.e(TAG, "process : error", e); passed = false; } Log.v(TAG, "process : exit"); return passed; }
From source file:org.mythtv.service.guide.v25.ProgramGuideHelperV25.java
public boolean process(final Context context, final LocationProfile locationProfile) { Log.v(TAG, "process : enter"); if (!NetworkHelper.getInstance().isMasterBackendConnected(context, locationProfile)) { Log.w(TAG, "process : Master Backend '" + locationProfile.getHostname() + "' is unreachable"); return false; }/* w w w . ja v a 2 s . c o m*/ mMainApplication = (MainApplication) context.getApplicationContext(); mMythServicesTemplate = (MythServicesTemplate) MythAccessFactory.getServiceTemplateApiByVersion(mApiVersion, locationProfile.getUrl()); if (null == mMythServicesTemplate) { Log.w(TAG, "process : Master Backend '" + locationProfile.getHostname() + "' is unreachable"); return false; } boolean passed = true; try { downloadProgramGuide(context, locationProfile); } catch (Exception e) { Log.e(TAG, "process : error", e); passed = false; } Log.v(TAG, "process : exit"); return passed; }
From source file:com.appunite.socketio.SocketIO.java
@SuppressWarnings("StatementWithEmptyBody") @Override//from w ww. j a v a2 s . c o m public void onStringMessage(String message) throws IOException, InterruptedException, NotConnectedException { try { if (BuildConfig.DEBUG) { Log.v(TAG, "> " + message); } IOMessage msg = IOMessage.parse(message); redelayKill(); if (msg.mMessageType == IOMessage.MSG_DISCONNECT) { // TODO Im not quite sure what we have to do if we will receive // message like this - maybe we will implement this later } else if (msg.mMessageType == IOMessage.MSG_CONNECT) { mListener.onConnectionAccepted(msg.mMessageEndpoint); } else if (msg.mMessageType == IOMessage.MSG_HARTBEAT) { sendMessage(new IOMessage(IOMessage.MSG_HARTBEAT)); } else if (msg.mMessageType == IOMessage.MSG_MESSAGE) { receivedSocketMessage(msg); } else if (msg.mMessageType == IOMessage.MSG_JSON_MESSAGE) { receivedSocketJsonMessage(msg); } else if (msg.mMessageType == IOMessage.MSG_EVENT) { receivedSocketEvent(msg); } else if (msg.mMessageType == IOMessage.MSG_ACK) { } else if (msg.mMessageType == IOMessage.MSG_ERROR) { mListener.onReceiverError(msg.mMessageData); } else if (msg.mMessageType == IOMessage.MSG_NOP) { } else { throw new RuntimeException("Unknown message"); } } catch (WrongSocketIOResponse e) { error(e); } }
From source file:me.moxun.dreamcatcher.connector.util.KLog.java
private static void printLog(int type, String tagStr, String msg) { if (!IS_SHOW_LOG) { return;//from ww w . j av a 2s . c o m } String tag; if (tagStr == null) { tag = "DreamCatcher"; } else { tag = "DreamCatcher-" + tagStr; } if (msg == null) { return; } StackTraceElement[] stackTrace = Thread.currentThread().getStackTrace(); int index = 6; String className = stackTrace[index].getFileName(); String methodName = stackTrace[index].getMethodName(); int lineNumber = stackTrace[index].getLineNumber(); methodName = methodName.substring(0, 1).toUpperCase() + methodName.substring(1); StringBuilder stringBuilder = new StringBuilder(); stringBuilder.append("(").append(className).append(":").append(lineNumber).append("").append(") "); if (msg != null && type != JSON) { stringBuilder.append(msg); } String logStr = stringBuilder.toString(); switch (type) { case V: Log.v(tag, logStr); break; case D: Log.d(tag, logStr); break; case I: Log.i(tag, logStr); break; case W: Log.w(tag, logStr); break; case E: Log.e(tag, logStr); break; case A: Log.wtf(tag, logStr); break; case JSON: { if (TextUtils.isEmpty(msg)) { Log.d(tag, "Empty or Null json content"); return; } String message = null; try { if (msg.startsWith("{")) { JSONObject jsonObject = new JSONObject(msg); message = jsonObject.toString(JSON_INDENT); } else if (msg.startsWith("[")) { JSONArray jsonArray = new JSONArray(msg); message = jsonArray.toString(JSON_INDENT); } } catch (JSONException e) { e(tag, e.getCause().getMessage() + "\n" + msg); return; } printLine(tag, true); message = logStr + LINE_SEPARATOR + message; String[] lines = message.split(LINE_SEPARATOR); StringBuilder jsonContent = new StringBuilder(); for (String line : lines) { jsonContent.append(" ").append(line).append(LINE_SEPARATOR); } Log.d(tag, jsonContent.toString()); printLine(tag, false); } break; } }