The community forums are in BETA and closed to the public.

Would like to integrate PubNub Chat example

Hi, I am building an app based on appery.io. The basic function of the is app is linking up with friends that are within a certain geographical proximity to you and then finding things to do, get coffee, catch a movie etc. I would like to use PubNub to facilitate the chat component of this app. I am using appery to execute all other functions and figured all I need to do to achieve the chat functionality I want is to edit the example found here http://www.pubnub.com/blog/create-private-chat-demand-connecting-users/ To do so I would assign each user a uuid and when I choose a particular user to chat with I would just start chatting. Currently, I am not using PubNub's presence functionality to determine who's online. One of my questions is do you think it would be a good idea to use the presence functionality? Let me tell you how I implement the app at present. As a user enters the app, the app scans the user's phone contact list and compares that list against a database of all users of the app. If a user's phone contact exists in the database and is within a certain proximity that contact is made available via a list within the app ( in other words that contact is a potential person to link up with). Of course with my current implementation there is no way to know if a user is currently on line, "presence" would solve this problem. If I were to add the a PubNub uuid for each user to the database and compare as I am currently doing, could I just feed that result into the example http://www.pubnub.com/blog/create-private-chat-demand-connecting-users/ and get the added benefit of knowing who is currently online? The phone contact list -database compare result is a simple array. I am assuming I would modify this portion of code

var Userfactory = function() { var userlist = {}; var self = this;

and simply not display users that are not in my database compare results list, do you have any pointers as to how I would go about this task?

get busy, i'm a beginner when it comes to programming, which has led me to try to build my app using tools such like appery. i'm currently trying to implement chatting in the app much like this pubnub 10chat. how exactly are you using the js code they give you to work in appery? i would appreciate the help though i know my question is pretty retarded. thanks

Get_Busy, I highly suggest using presence. In any other manner you are going to end up rebuilding the presence functionality.

As far as appery, it seems like it runs normal HTML/CSS/JS which means PubNub should work fine.


Comments to this discussion are now closed!