当前位置: 首页>>代码示例>>Java>>正文


Java Timber.i方法代码示例

本文整理汇总了Java中timber.log.Timber.i方法的典型用法代码示例。如果您正苦于以下问题:Java Timber.i方法的具体用法?Java Timber.i怎么用?Java Timber.i使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在timber.log.Timber的用法示例。


在下文中一共展示了Timber.i方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: addLine

import timber.log.Timber; //导入方法依赖的package包/类
private static boolean addLine(Context context, BMessage message, ArrayList<String> lines, ArrayList<String> senders){

        if(message != null && !message.wasRead())
        {
            lines.add(getMessageContent(context, message));

            String senderName = message.getBUserSender().getMetaName();
            if (!senders.contains(senderName))
                senders.add(senderName);

            return true;
        }
        else if (DEBUG)
            Timber.i("addLine, message was read? %s, payload: %s",
                    message == null? "message is null" : message.wasRead(), message == null ? "null" : message.getText());
        
        return false;
    }
 
开发者ID:MobileDev418,项目名称:AndroidBackendlessChat,代码行数:19,代码来源:NotificationUtils.java

示例2: markMessagesAsRead

import timber.log.Timber; //导入方法依赖的package包/类
private void markMessagesAsRead(Intent intent, Account account, MessagingController controller) {
    Timber.i("NotificationActionService marking messages as read");

    List<String> messageReferenceStrings = intent.getStringArrayListExtra(EXTRA_MESSAGE_REFERENCES);
    List<MessageReference> messageReferences = toMessageReferenceList(messageReferenceStrings);
    for (MessageReference messageReference : messageReferences) {
        String folderName = messageReference.getFolderId();
        String uid = messageReference.getUid();
        controller.setFlag(account, folderName, uid, Flag.SEEN, true);
    }
}
 
开发者ID:philipwhiuk,项目名称:q-mail,代码行数:12,代码来源:NotificationActionService.java

示例3: onMessageReceived

import timber.log.Timber; //导入方法依赖的package包/类
@Override
public boolean onMessageReceived(BMessage message) {
    if (DEBUG) Timber.i("onMessageReceived");
    for (Event e : events.values())
    {
        if (e == null)
            continue;

        // We check to see if the listener specified a specific thread that he wants to listen to.
        // If we could find and match the data we ignore it.
        if (StringUtils.isNotEmpty(e.getEntityId()) && message.getThread() != null
                && message.getThread().getEntityID() != null
                && !message.getThread().getEntityID().equals(e.getEntityId()))
                continue;


        if(e instanceof BatchedEvent)
            ((BatchedEvent) e).add(Event.Type.MessageEvent, message.getEntityID());

        e.onMessageReceived(message);
    }

    return false;
}
 
开发者ID:MobileDev418,项目名称:chat-sdk-android-push-firebase,代码行数:25,代码来源:FirebaseEventsManager.java

示例4: log

import timber.log.Timber; //导入方法依赖的package包/类
static void log(LogType logType, String message) {
    switch (logType) {
        case VERBOSE:
            Timber.v(message);
            break;

        case DEBUG:
            Timber.d(message);
            break;

        case INFO:
            Timber.i(message);
            break;

        case WARN:
            Timber.w(message);
            break;

        case ERROR:
            Timber.e(message);
            break;
    }
}
 
开发者ID:LachlanMcKee,项目名称:timber-junit-rule,代码行数:24,代码来源:LogTester.java

示例5: archiveMessages

import timber.log.Timber; //导入方法依赖的package包/类
private void archiveMessages(Intent intent, Account account, MessagingController controller) {
    Timber.i("NotificationActionService archiving messages");

    String archiveFolderName = account.getArchiveFolderId();
    if (archiveFolderName == null ||
            (archiveFolderName.equals(account.getSpamFolderId()) && QMail.confirmSpam()) ||
            !isMovePossible(controller, account, archiveFolderName)) {
        Timber.w("Can not archive messages");
        return;
    }

    List<String> messageReferenceStrings = intent.getStringArrayListExtra(EXTRA_MESSAGE_REFERENCES);
    List<MessageReference> messageReferences = toMessageReferenceList(messageReferenceStrings);
    for (MessageReference messageReference : messageReferences) {
        if (controller.isMoveCapable(messageReference)) {
            String sourceFolderName = messageReference.getFolderId();
            controller.moveMessage(account, sourceFolderName, messageReference, archiveFolderName);
        }
    }
}
 
开发者ID:philipwhiuk,项目名称:q-mail,代码行数:21,代码来源:NotificationActionService.java

示例6: onResponse

import timber.log.Timber; //导入方法依赖的package包/类
@Override
public void onResponse(ImageLoader.ImageContainer response, boolean isImmediate) {

    if (killed)
        return;

    // If response was not immidate, i.e  image was cached we show the default image while loading
    if (isImmediate && response.getBitmap() == null)
    {
        setDefaultImg(threadListItem);
        return;
    }

    // Set the response to the image.
    if (response.getBitmap() != null) {
        if (DEBUG) Timber.i("Loading thread picture from url");

        // load image into imageview
        imgIcon.setImageBitmap(response.getBitmap());
    }
}
 
开发者ID:MobileDev418,项目名称:chat-sdk-android-push-firebase,代码行数:22,代码来源:ChatSDKAbstractThreadsListAdapter.java

示例7: retrievePathPrefixIfNecessary

import timber.log.Timber; //导入方法依赖的package包/类
private void retrievePathPrefixIfNecessary() throws IOException, MessagingException {
    if (settings.getPathPrefix() != null) {
        return;
    }

    if (hasCapability(Capabilities.NAMESPACE)) {
        if (K9MailLib.isDebug()) {
            Timber.i("pathPrefix is unset and server has NAMESPACE capability");
        }
        handleNamespace();
    } else {
        if (K9MailLib.isDebug()) {
            Timber.i("pathPrefix is unset but server does not have NAMESPACE capability");
        }
        settings.setPathPrefix("");
    }
}
 
开发者ID:philipwhiuk,项目名称:q-mail,代码行数:18,代码来源:ImapConnection.java

示例8: processStoredUntaggedResponses

import timber.log.Timber; //导入方法依赖的package包/类
private void processStoredUntaggedResponses() throws MessagingException {
    while (true) {
        List<ImapResponse> untaggedResponses = getAndClearStoredUntaggedResponses();
        if (untaggedResponses.isEmpty()) {
            break;
        }

        if (K9MailLib.isDebug()) {
            Timber.i("Processing %d untagged responses from previous commands for %s",
                    untaggedResponses.size(), getLogId());
        }

        processUntaggedResponses(untaggedResponses);
    }
}
 
开发者ID:philipwhiuk,项目名称:q-mail,代码行数:16,代码来源:ImapFolderPusher.java

示例9: openCustomTabs

import timber.log.Timber; //导入方法依赖的package包/类
private void openCustomTabs(String url) {
    Timber.i(url);
    CustomTabsIntent.Builder intentBuilder = new CustomTabsIntent.Builder();
    intentBuilder.setToolbarColor(Color.GRAY);
    intentBuilder.setSecondaryToolbarColor(Color.BLACK);
    intentBuilder.setShowTitle(true);
    intentBuilder.enableUrlBarHiding();

    CustomTabsIntent customTabsIntent = intentBuilder.build();
    String packageName = CustomTabsHelper.getPackageNameToUse(this);
    customTabsIntent.intent.setPackage(packageName);
    customTabsIntent.launchUrl(this, Uri.parse(url));
}
 
开发者ID:alphater,项目名称:garras,代码行数:14,代码来源:LoginActivity.java

示例10: initPing

import timber.log.Timber; //导入方法依赖的package包/类
/**
 * Initiates the Ping broadcast process, creates a Ping AsyncTask and sets the IP address to ping.
 *
 * @return boolean. False if not connected to Wi-Fi, true otherwise .
 */
public boolean initPing() {
    stopPing();
    int networkState = NetworkUtil.getConnectionStatus(mContext);
    if (networkState == NetworkUtil.WIFI) {
        net.getWifiInfo();
        while (net.gatewayIp.equalsIgnoreCase("0.0.0.0")) {
            Timber.i("in while - network ip: " + net.gatewayIp);
            try {
                //changed sleep time to 500 instead of 200
                Thread.sleep(500);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
            net.getWifiInfo();
        }
        Timber.i("after while network ip: " + net.gatewayIp);
        String ipToPing = "";
        String[] parts = net.gatewayIp.split("\\.");
        for (int i = 0; i < 3; i++) {
            ipToPing += parts[i] + ".";
        }
        mPing = new Ping(mPingCallback, net.gatewayIp);
        mPing.ipToPing = ipToPing + "255";
        Timber.i("Will ping ip: " + mPing.ipToPing);
        return true;
    }
    return false;
}
 
开发者ID:hoanglm4,项目名称:RxAndroidTBP,代码行数:34,代码来源:FindDevicePresenterImpl.java

示例11: onReceive

import timber.log.Timber; //导入方法依赖的package包/类
@Override
public void onReceive(Context context, Intent intent) {
    String action = intent.getAction();
    if ("language".equals(action)) {
        Timber.i("======language changed:" + Thread.currentThread().getName());
        recreate();
    }
}
 
开发者ID:alphater,项目名称:garras,代码行数:9,代码来源:BaseFrameActivity.java

示例12: onDestroy

import timber.log.Timber; //导入方法依赖的package包/类
@Override
protected void onDestroy() {
    if (!isChangingConfigurations()) {
        Timber.i("Clearing ConfigPersistentComponent id=%d", mActivityId);
        sComponentsMap.remove(mActivityId);
    }
    ActivityUtil.getInstance().removeActivity(this);
    super.onDestroy();
}
 
开发者ID:ebridfighter,项目名称:GongXianSheng,代码行数:10,代码来源:BaseActivity.java

示例13: onFragmentPaused

import timber.log.Timber; //导入方法依赖的package包/类
@Override
public void onFragmentPaused(FragmentManager fm, Fragment f) {
    super.onFragmentPaused(fm, f);
    FragmentDelegate fragmentDelegate = fetchFragmentDelegate(f);
    if (fragmentDelegate != null) {
        Timber.i("%s ---> onFragmentPaused", f.toString());
        fragmentDelegate.onPause();
    }
}
 
开发者ID:goutham106,项目名称:GmArchMvvm,代码行数:10,代码来源:FragmentLifecycle.java

示例14: onFragmentViewCreated

import timber.log.Timber; //导入方法依赖的package包/类
@Override
public void onFragmentViewCreated(FragmentManager fm, Fragment f, View v, Bundle savedInstanceState) {
    super.onFragmentViewCreated(fm, f, v, savedInstanceState);
    FragmentDelegate fragmentDelegate = fetchFragmentDelegate(f);
    if (fragmentDelegate != null) {
        Timber.i("%s ---> onFragmentViewCreated", f.toString());
        fragmentDelegate.onCreateView(v, savedInstanceState);
    }
}
 
开发者ID:goutham106,项目名称:GmArchMvvm,代码行数:10,代码来源:FragmentLifecycle.java

示例15: startService

import timber.log.Timber; //导入方法依赖的package包/类
@Override
public int startService(Intent intent, int startId) {
    int startFlag = START_STICKY;
    if (START_SERVICE.equals(intent.getAction())) {
        Timber.i("PushService started with startId = %d", startId);
    } else if (STOP_SERVICE.equals(intent.getAction())) {
        Timber.i("PushService stopping with startId = %d", startId);
        stopSelf(startId);
        startFlag = START_NOT_STICKY;
    }

    return startFlag;
}
 
开发者ID:philipwhiuk,项目名称:q-mail,代码行数:14,代码来源:PushService.java


注:本文中的timber.log.Timber.i方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。