Android Chat Application Guide Using Parse and PubNub

I am trying to create a simple Android chat application where a user can register and have a list of friends to start a conversation. I plan to use Parse for the database backend and PubNub for real chat channels.

I do not have much experience in this application. I have an idea of ​​what needs to be done, but I just wanted to get an opinion from someone who has some experience.

Here is the model I plan to implement:

  • User profile information collected on the registration page will be stored in a table in the analysis database.
  • All user associations will be saved in a table in Parse
  • As soon as the user selects a friend to start the chat, the new PubNub channel should be open and the channel name should be stored in a table in Parse (This table contains all the active channels / chats)

Does it look like I'm heading in the right direction? Or can something be done better? Or is there any other service that I could use?

+6
source share
4 answers

This approach will work. You can create a channel for each pair of users. You may not have to save the feed in parsing. You can only have a naming convention - something like channel_user1_user2 Besides standard publishing / subscribing, I also suggest using the api history to catch up on chat messages that the user may have missed since the last connection. Alternatively, you can use pubnub's api presence to determine if there are any users on the network.

The android example at https://github.com/pubnub/java/tree/master/android shows how to use publish / subscribe and history

+3
source

I have compiled an open source instant messenger for Android that uses Parse and Pubnub here https://github.com/WizTheEngineer/DroidMessenger . Hope this helps!

+2
source

I have a 1-1 chat application using a Parse server. This will get you started. https://github.com/faheema/ChatOn

0
source

PubNub ChatEngine

PubNub Chat Engine is an object-based object-oriented environment for creating chat applications in Javascript. PubNub Chat Engine makes it easy to easily create Slack, Flowdock, Discord, Skype, Snapchat or WhatsApp.

The real-time server component is provided by Socket.io or PubNub. The PubNub Chat Engine is extensible and includes a plugin framework that makes it easy to remove features.

0
source

All Articles