Codota Logo
AppBackgroundMonitor.inBackground
Code IndexAdd Codota to your IDE (free)

How to use
inBackground
method
in
co.chatsdk.core.utils.AppBackgroundMonitor

Best Java code snippets using co.chatsdk.core.utils.AppBackgroundMonitor.inBackground (Showing top 2 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
StringBuilder s =
  • Codota Iconnew StringBuilder()
  • Codota Iconnew StringBuilder(32)
  • Codota IconString str;new StringBuilder(str)
  • Smart code suggestions by Codota
}
origin: chat-sdk/chat-sdk-android

if (ChatSDK.auth() == null || !ChatSDK.auth().userAuthenticatedThisSession() || ChatSDK.config().backgroundPushTestModeEnabled) {
  appIntent = new Intent(context, ChatSDK.ui().getLoginActivity());
} else if (AppBackgroundMonitor.shared().inBackground() && ChatSDK.auth().userAuthenticatedThisSession()) {
  appIntent = new Intent(context, ChatSDK.ui().getChatActivity());
origin: chat-sdk/chat-sdk-android

public void handleLocalNotifications () {
  if (localNotificationDisposable != null) {
    localNotificationDisposable.dispose();
  }
  // TODO: Check this
  localNotificationDisposable = ChatSDK.events().sourceOnMain()
      .filter(NetworkEvent.filterType(EventType.MessageAdded))
      .subscribe(networkEvent -> {
        Message message = networkEvent.message;
        Thread thread = networkEvent.thread;
        if(message != null && !AppBackgroundMonitor.shared().inBackground()) {
          if (thread.typeIs(ThreadType.Private) || (thread.typeIs(ThreadType.Public) && ChatSDK.config().pushNotificationsForPublicChatRoomsEnabled)) {
            if(!message.getSender().isMe() && ChatSDK.ui().showLocalNotifications(message.getThread())) {
              ReadStatus status = message.readStatusForUser(ChatSDK.currentUser());
              if (!message.isRead() && !status.is(ReadStatus.delivered())) {
                // Only show the alert if we'recyclerView not on the private threads tab
                ChatSDK.ui().notificationDisplayHandler().createMessageNotification(message);
              }
            }
          }
        }
      });
}
co.chatsdk.core.utilsAppBackgroundMonitorinBackground

Popular methods of AppBackgroundMonitor

  • shared
  • setEnabled

Popular in Java

  • Creating JSON documents from java classes using gson
  • getSystemService (Context)
  • addToBackStack (FragmentTransaction)
  • startActivity (Activity)
  • Point (java.awt)
    A point representing a location in (x, y) coordinate space, specified in integer precision.
  • BufferedReader (java.io)
    Reads text from a character-input stream, buffering characters so as to provide for the efficient re
  • Deque (java.util)
    A linear collection that supports element insertion and removal at both ends. The name deque is shor
  • PriorityQueue (java.util)
    An unbounded priority Queue based on a priority heap. The elements of the priority queue are ordered
  • UUID (java.util)
    UUID is an immutable representation of a 128-bit universally unique identifier (UUID). There are mul
  • JFrame (javax.swing)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now