Quickblox Blog

Taras Filatov

How QuickBlox (XMPP-based) presence and unread messages alerts mechanism works

Posted by Taras Filatov on August 29, 2014

This is to explain how QuickBlox chat presence and chat message alerts for offline users work as we’ve been receiving quite a few questions on the mechanism of this lately:

1. User logs in and establishes chat session, sends presence with ‘available’ flag
2. Every 30 seconds chat client sends a ‘keep-alive’ presence to the server. This way both server and other users know the person is still online. In chat this can be displayed as a green dot against user pic / name.
3(a) If user logs out manually, chat client sends presence = unavailable flag.
3(b) if app is put into background, QuickBlox recommends doing the same (presence = unavailable, session log out) but you can choose. On iOS system may kill your app. On Android you could keep it alive as much as you want in background but it will consume more battery power this way.
3(c) if app crashes, server will determine that socket connection is closed and soon will set the status to unavailable automatically.
4. While user keeps the chat session alive and status is ‘available’ they won’t receive any alerts about missed messages. Once user is unavailable, server will be sending all the missed messages via push notifications. To ALL devices belonging to the user.
5. Push notification is the default channel. You may also customise template for the alert via admin panel. This includes choosing whether to quote message excerpt, you may also use wildcard variables such as username etc, or you may want to send just a number of new messages such as “you have 5 unread messages from X”. Badge counter and sound alerts can also be adjusted.
6. If needed be, instead or along with push notification alert, QuickBlox chat server can also send alerts via e-mails or dump to external message base / middle man system such as Apache Kafka, Cassandra DB etc. Additionally, QuickBlox dumps all messages by default into own MongoDB (NoSQL) DB where messages also get accessible via REST JSON API for chat history purposes.

Igor Khomenko

QuickBlox releases iOS SDK 2.0

Posted by Igor Khomenko on August 28, 2014


New improved iOS SDK released by QuickBlox

QuickBlox releases iOS SDK 2.0 – this is the biggest iOS update we’ve ever made. It incorporates a complete SDK re-architecture, new syntax for requests, CocoaPods and lots of other crazy new features.

Main Features & Improvements:

  • New syntax for requests
  • ARC support for new API
  • Switched from delegates to block-based API
  • JSON requests
  • Added CocoaPods distribution
  • New API covered with tests
  • General re-architecture
  • Old API is fully supported + marked as deprecated

Other Chat related features which we also included in this release:

  • Added the ability to track ‘user is typing’ status
  • Added the ability to track ‘delivered’ status
  • Completely supports TLS negotiation
  • Added ‘markMessagesAsRead’ method to QBChat
  • Added ‘createMessage’ method to QBChat

How to get it

To install QuickBlox framework using CocoaPods – you should just add following line in your Podfile:

pod 'QuickBlox'

Or download it from the iOS SDK documentation page: Download Quickblox iOS SDK 2.0

We’ve also made a  transition guide from version 1.9 to 2.0 and updated all of the code samples too.

Conquer the world with QuickBlox!

Taras Filatov

QuickBlox compatible chat bot (in Python)

Posted by Taras Filatov on August 25, 2014

Why would anyone need a chat bot?


Well, you may need a chat bot for:
1) testing (or if you feel lonely and need someone to chat with :)
2) moderation
3) simulated / virtual presence, for example when chat is being used for customer support, so that system can greet and ask questions before live operator joins
4) entertainment, such as trivia, quiz etc chat games as seen in IRC chats
5) processing instructions from chat to control 3rd party software and devices for example control IoT / smart home appliances via chat instructions

so at QuickBlox we decided to release a simple chat bot in Python based on SleekXMPP so you can do all the above or anything else you might think of.

Chat Bot is currently tested to work well with Q-municate project and should also work well with any QuickBlox code samples and projects from QuickBlox however you might need to play with credentials / stanzas in some cases but feel free to ask questions.

Use this link to access GitHub repo: QuickBlox compatible XMPP chat bot.

Alex Bass

Q-municate Web

Posted by Alex Bass on August 21, 2014


It’s a busy day for blogs today. But we have more news!

We’re really happy to release Q-municate Web beta: the third member of the Q-municate family (or third piece in the Q-municate group if you’re not a fan of personification). Q-municate for Web is a powerful web app built in Javascript using websockets for realtime chatting – it features emojis, one-to-one and group chats, and all messages are stored in the cloud so you can login and retrieve them on any device. In other words, it’s pretty awesome and we’re very proud of it.

However, it is still in beta – so bugs are to be expected. Wonderful new features like video calling are also to be expected, so stay tuned. Go check out Q-municate Web on GitHub or register to receive the beta source on the Q-municate website.

Igor Khomenko

QuickBlox releases Privacy Lists API for iOS Chat

Posted by Igor Khomenko on August 21, 2014

QuickBlox releases Privacy Lists API for iOS SDK today.

Privacy list API allows to enable or disable communication with other users in a chat. It also enables a user to create, modify, or delete its privacy lists, define a default list.

Now users can block other users. Blocked entities will be receiving an error when try to chat with a user.

Read Privacy Lists documentation for iOS

Download iOS SDK 1.9.2 to start using Privacy Lists API