Java Code Examples for com.orhanobut.logger.Logger#i()
The following examples show how to use
com.orhanobut.logger.Logger#i() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: SelectDateDialog.java From SmartChart with Apache License 2.0 | 6 votes |
private void setDays(int year, int month) { int day = 31; if (month == 4 || month == 6 || month == 9 || month == 11) { day = 30; } else if (month == 2) { if (isLeapYear(year)) { day = 29; } else { day = 28; } } dayData.clear(); for (int i = 0; i < day; i++) { dayData.add((i + 1) + ""); } Logger.i("ChooseDateDialog:setDays:>>>>>" + dayData.toString()); }
Example 2
Source File: SettingsActivity.java From Easer with GNU General Public License v3.0 | 6 votes |
@Override public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) { switch (requestCode) { case REQCODE_PERM_STORAGE: case REQCODE_PERM_EXPORT: case REQCODE_PERM_IMPORT: if (grantResults.length == 0) { Logger.wtf("Request permission result with ZERO length!!!"); return; } if (grantResults[0] == PackageManager.PERMISSION_GRANTED) { Logger.i("Request for permission <%s> granted", permissions[0]); } else { Logger.i("Request for permission <%s> denied", permissions[0]); } break; } }
Example 3
Source File: QOpenFileDownLoadImpl.java From imsdk-android with MIT License | 6 votes |
@Override public boolean startActivityAndNeedWating(IMBaseActivity context, Map<String, String> map) { IMMessage message = new IMMessage(); TransitFileJSON transitFileJSON = new TransitFileJSON(); transitFileJSON.FileSize = map.get(NativeApi.KEY_FILE_SIZE); String url = map.get(NativeApi.KEY_FILE_URL).replace(" ","+"); String pUrl = new String(Base64.decode(url,Base64.NO_PADDING)); Logger.i("解析后的下载地址:"+pUrl+",解析前的下载地址:"+url); transitFileJSON.HttpUrl = pUrl; transitFileJSON.FileName = map.get(NativeApi.KEY_FILE_NAME); transitFileJSON.FILEMD5 =map.get(NativeApi.KEY_FILE_MD5); transitFileJSON.noMD5 = Boolean.parseBoolean(map.get(NativeApi.KEY_FILE_NOMD5)); // if(TextUtils.isEmpty(transitFileJSON.FILEMD5)){ // transitFileJSON.noMD5 = true; // } message.setBody(JsonUtils.getGson().toJson(transitFileJSON)); Intent intent = new Intent(context, DownloadFileActivity.class); Bundle bundle=new Bundle(); bundle.putSerializable("file_message",message); intent.putExtras(bundle); context.startActivity(intent); return false; }
Example 4
Source File: ConnectionManagerImpl.java From landlord_client with Apache License 2.0 | 5 votes |
public void run() { try { s.acquire(); // Logger.i("connect thread get semaphore"); try { mSocket = getSocketByConfig(); } catch (Exception var7) { if (mOptions.isDebug()) { var7.printStackTrace(); } throw new UnConnectException("Create socket failed.", var7); } if (mLocalConnectionInfo != null) { Logger.d("try bind: " + mLocalConnectionInfo.getIp() + " port:" + mLocalConnectionInfo.getPort()); mSocket.bind(new InetSocketAddress(mLocalConnectionInfo.getIp(), mLocalConnectionInfo.getPort())); } Logger.d("Start connect: " + mRemoteConnectionInfo.getIp() + ":" + mRemoteConnectionInfo.getPort() + " socket server..."); mSocket.connect(new InetSocketAddress(mRemoteConnectionInfo.getIp(), mRemoteConnectionInfo.getPort()), mOptions.getConnectTimeoutSecond() * 1000); mSocket.setTcpNoDelay(true); resolveManager(); sendBroadcast("action_connection_success"); // Logger.i("connect thread release semaphore"); Logger.i("Socket server: " + mRemoteConnectionInfo.getIp() + ":" + mRemoteConnectionInfo.getPort() + " connect successful!"); } catch (Exception var8) { var8.printStackTrace(); Exception exception = new UnConnectException(var8); Logger.e("Socket server " + mRemoteConnectionInfo.getIp() + ":" + mRemoteConnectionInfo.getPort() + " connect failed! error msg:" + var8.getMessage()); sendBroadcast("action_connection_failed", exception); } finally { isConnectionPermitted = true; s.release(); } }
Example 5
Source File: MzPushReceiver.java From imsdk-android with MIT License | 5 votes |
@Override public void onSubAliasStatus(Context context, SubAliasStatus subAliasStatus) { if(subAliasStatus != null) { Logger.i("注册meizu push onSubAliasStatus subAliasStatus=%s", subAliasStatus.toString()); HttpUtil.registPush(subAliasStatus.getAlias(), QTPushConfiguration.getPlatName()); } else { Logger.i("注册meizu push onSubAliasStatus 失败"); } }
Example 6
Source File: DailyNoteEditorActivity.java From imsdk-android with MIT License | 5 votes |
/** * 单纯上传并图片 * * @param filePath */ public void uploadImage(String filePath) { final File origalFile = new File(filePath); final UploadImageRequest request = new UploadImageRequest(); request.filePath = origalFile.getPath(); request.FileType = UploadImageRequest.IMAGE; // request.id = message.getId(); request.progressRequestListener = new ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { // callback.updataProgress((int) (bytesWritten * 100 / contentLength), done); } }; request.requestComplete = new IUploadRequestComplete() { @Override public void onRequestComplete(String id, final UploadImageResult result) { if (result != null && !TextUtils.isEmpty(result.httpUrl)) { Logger.i("上传图片成功 msg url = " + result.httpUrl); runOnUiThread(new Runnable() { @Override public void run() { editor.insertImage(QtalkNavicationService.getInstance().getInnerFiltHttpHost() + "/" + result.httpUrl, "图片"); } }); } else { Logger.i("上传图片失败 "); } } @Override public void onError(String msg) { Logger.i("上传图片失败 msg url = " + msg); } }; CommonUploader.getInstance().setUploadImageRequest(request); }
Example 7
Source File: WebRtcClient.java From imsdk-android with MIT License | 5 votes |
@Override public void onIceCandidate(final IceCandidate candidate) { LogUtil.d(TAG + candidate.sdp); Logger.i(TAG + " onIceCandidate" + candidate.sdp); WebRtcJson.WebRtcPayload payload = new WebRtcJson.WebRtcPayload(); payload.candidate = candidate.sdp; payload.id = candidate.sdpMid; payload.label = candidate.sdpMLineIndex; Logger.i(TAG + " SEND ICE: " + JsonUtils.getGson().toJson(payload)); sendWebrtcMessage("candidate", payload); }
Example 8
Source File: ConnectRequestQueue.java From AndroidBleManager with Apache License 2.0 | 5 votes |
/** * connect bluetooth device one by one * @return the next connect device */ private void triggerConnectNextDevice(){ String mac = deviceQueue.peek(); if (!isEmpty(mac)){ Logger.i( "Start trigger connect device "+mac); connect(mac); } }
Example 9
Source File: WebRtcClient.java From imsdk-android with MIT License | 5 votes |
public void execute(IMMessage imMessage, WebRtcJson.WebRtcPayload payload) { LogUtil.d(TAG, "DenyCommand"); Logger.i(TAG + "音视频连接:" + "DenyCommand"); if (mListener != null) { mListener.onStatusChanged(WebRTCStatus.DENY); } if(!isCaller && !imMessage.isCarbon()) { sendNormalMessage(WebRTCStatus.DENY.getType(), 0, ""); } }
Example 10
Source File: StoryFragment.java From RxZhihuPager with Apache License 2.0 | 4 votes |
@Override public void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); curId = getArguments().getInt(PARAM_ID, -1); Logger.i("curId:" + curId); }
Example 11
Source File: IMLogicManager.java From imsdk-android with MIT License | 4 votes |
public void logout(String userName) { Logger.i("登出"); _pbSocket.shutdown(); }
Example 12
Source File: WebRtcClient.java From imsdk-android with MIT License | 4 votes |
@Override public void onRemoveStream(MediaStream mediaStream) { LogUtil.d(TAG, "onRemoveStream " + mediaStream.label()); Logger.i(TAG + " onRemoveStream " + mediaStream.label()); removePeer(); }
Example 13
Source File: ThirdPushMessageReceiver.java From imsdk-android with MIT License | 4 votes |
@Override public void onReceiveMessage(Context context, MiPushMessage miPushMessage) { Logger.i(TAG + "onReceiveMessage => " + miPushMessage.toString()); super.onReceiveMessage(context, miPushMessage); }
Example 14
Source File: PictureFolderVu.java From FlyWoo with Apache License 2.0 | 4 votes |
public void setListData(List<PictureEntity> list) { Logger.i("setListData:"); mListView.setAdapter(new PictureAdapter(context, list)); }
Example 15
Source File: CharacteristicDetailActivity.java From AndroidBleManager with Apache License 2.0 | 4 votes |
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); ButterKnife.bind(this); setTitle("Characteristic Detail"); notifyListAdapter = new NotifyListAdapter(this); connectManager = BluetoothConnectManager.getInstance(this); connectManager.addConnectStateListener(listener); mNotifyList.setAdapter(notifyListAdapter); Intent intent = getIntent(); mDevice = (BluetoothLeDevice) intent.getParcelableExtra(EXTRA_DEVICE); String uuid = intent.getStringExtra(EXTRA_UUID); UUID serverUUid = null; gatt = connectManager.getBluetoothGatt(mDevice.getAddress()); if (gatt != null){ List<BluetoothGattService> list = gatt.getServices(); if (list != null){ for (BluetoothGattService service:list){ for (BluetoothGattCharacteristic characteristics : service.getCharacteristics()){ if (characteristics.getUuid().toString().equals(uuid)){ characteristic = characteristics; serverUUid = service.getUuid(); break; } } } } }else { Logger.e("gatt is null"); } if (characteristic != null){ initView(); final String unknownCharaString = getResources().getString(R.string.unknown_characteristic); mTvCharName.setText(GattAttributeResolver.getAttributeName(uuid, unknownCharaString)); mTvName.setText(mDevice.getAdRecordStore().getLocalNameComplete()); mTvCharUuid.setText("uuid: "+uuid.substring(4,8)); mTvProperties.setText(getPropertyString(characteristic.getProperties())); DescListAdapter mAdapter = new DescListAdapter(this); mTvDescriptorList.setAdapter(mAdapter); mTvDescriptorList.setVisibility(View.VISIBLE); checkProperty(characteristic.getProperties()); for (BluetoothGattDescriptor gattDescriptor:characteristic.getDescriptors()){ mAdapter.add(gattDescriptor); Logger.i("desc:" + gattDescriptor.getUuid()); } //start subscribe auto //1.set service uuid connectManager.setServiceUUID(serverUUid.toString()); //2.clean history descriptor data connectManager.cleanSubscribeData(); //3.add subscribe params if (BluetoothUtils.isCharacteristicRead(characteristic.getProperties())){ connectManager.addBluetoothSubscribeData( new BluetoothSubScribeData.Builder().setCharacteristicRead(characteristic.getUuid()).build()); } if (BluetoothUtils.isCharacteristicNotify(characteristic.getProperties())){ connectManager.addBluetoothSubscribeData( new BluetoothSubScribeData.Builder().setCharacteristicNotify(characteristic.getUuid()).build() ); } //start descriptor boolean isSuccess = connectManager.startSubscribe(gatt); }else{ setOperatorEnable(false); } }
Example 16
Source File: WebRtcClient.java From imsdk-android with MIT License | 4 votes |
@Override public void onIceConnectionReceivingChange(boolean b) { LogUtil.d(TAG,"onIceConnectionReceivingChange value :"+b); Logger.i(TAG + " onIceConnectionReceivingChange value :"+b); }
Example 17
Source File: FileVu.java From FlyWoo with Apache License 2.0 | 4 votes |
public void setOnItemClickListener( AdapterView.OnItemClickListener listener){ Logger.i("setOnItemClick"); mListView.setOnItemClickListener(listener); }
Example 18
Source File: WorkWorldManagerPresenter.java From imsdk-android with MIT License | 4 votes |
@Override public void workworldstartRefresh() { mView.workworldstartRefresh(); int postType = 0; if(TextUtils.isEmpty(searchId)){ postType = WorkWorldItemState.hot|WorkWorldItemState.top|WorkWorldItemState.normal; }else{ postType = WorkWorldItemState.normal; } Logger.i("获取的数据类型为:"+postType); HttpUtil.refreshWorkWorldV2(listSize, childListSize, postType, owner, ownerHost, 0, true, new ProtocolCallback.UnitCallback<WorkWorldResponse>() { @Override public void onCompleted(WorkWorldResponse workWorldResponse) { mView.workworldshowNewData(workWorldResponse.getData().getNewPost()); IMUserDefaults.getStandardUserDefaults().newEditor(CommonConfig.globalContext) .putObject(com.qunar.im.protobuf.common.CurrentPreference.getInstance().getUserid() + QtalkNavicationService.getInstance().getXmppdomain() + CommonConfig.isDebug + MD5.hex(navurl) + "WORKWORLDSHOWUNREAD", false) .synchronize(); IMNotificaitonCenter.getInstance().postMainThreadNotificationName(QtalkEvent.WORK_WORLD_NOTICE); } @Override public void onFailure(String errMsg) { mView.workworldcloseRefresh(); } }); // HttpUtil.refreshWorkWorld(20, owner, ownerHost, 0, new ProtocolCallback.UnitCallback<WorkWorldResponse>() { // @Override // public void onCompleted(WorkWorldResponse workWorldResponse) { // mView.workworldshowNewData(workWorldResponse.getData().getNewPost()); // IMUserDefaults.getStandardUserDefaults().newEditor(CommonConfig.globalContext) // .putObject(com.qunar.im.protobuf.common.CurrentPreference.getInstance().getUserid() // + QtalkNavicationService.getInstance().getXmppdomain() // + CommonConfig.isDebug // + MD5.hex(navurl) // + "WORKWORLDSHOWUNREAD", false) // .synchronize(); // IMNotificaitonCenter.getInstance().postMainThreadNotificationName(QtalkEvent.WORK_WORLD_NOTICE); //// // } // // @Override // public void onFailure(String errMsg) { // // } // }, 1); }
Example 19
Source File: WebRtcClient.java From imsdk-android with MIT License | 4 votes |
@Override public void onIceGatheringChange(PeerConnection.IceGatheringState iceGatheringState) { LogUtil.d(TAG,"onIceGatheringChange :"+iceGatheringState); Logger.i(TAG +" onIceGatheringChange :"+iceGatheringState); }
Example 20
Source File: Print.java From BaseUIFrame with MIT License | 4 votes |
public static void i(Object log) { Logger.i(String.valueOf(log)); }