- Add the Codota plugin to your IDE and get smart completions
private void myMethod () {StringBuilder s =
new StringBuilder()
new StringBuilder(32)
String str;new StringBuilder(str)
- Smart code suggestions by Codota
}
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());
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); } } } } }); }