I am implementing a chat application for iOS. Here is the scenario:
Two QBUUsers engaged in an active exchange of chat messages.
User1 goes offline for some reason (disconnects or app goes to background). Lets assume that the app called logout on the QBChat instance.
User2 sends a ChatMessage to User1 because he thinks User1 is still online.
I should send a Push Notification to User1 instead, but how do I detect that User1 is no longer available to receive a ChatMessage?
I saw that on StackOverflow someone recommended checking the "last_request_at" property on a QBUUser, but that seems heavy-handed since I have to query the server every time I send a ChatMessage. Also that will not tell me when they logged out of the QBChat instance.
My fallback plan is to track user login/logout on our own app server (not rely on QuickBlox server). Any elegant solution here using the QuickBlox SDK?
You have 2 ways what to do:
1) Use contact list http://quickblox.com/developers/SimpleSample-chat_users-ios#Contact_list
With contact list you can track online status of user for your contact list. Contact list is similar to common friends list like in Facebook.
2) send Push Notifications for every message. If user is offline - he will receive it. If user is online - just ignore this push.
Related
Objective: I want to send notifications to my customers in certain operations, such as when they loged in. To say in more detail, i wanna show the notification to employer that says {{x}} employe just loged in and clearly all the Authorisation codes are ready and works.
Current State: I opened another asp.net mvc web project(let say signal project) in my solutions and inside signal project i wrote my signalr codes that send notification to users according to their authorizations.(ClassName : Hub)
My client/signalr work flow
List item
user logs in, i check his/her authorizations.
To her/his authorizations i assign them in to groups
and send notifications to employers(which they have they own group)
At this state every thing is fine and works.
But i want to convert this signal project to a windows service.So i created one.
Problem: Windows Service is working but the notifications that should be send to certain groups won't go(in my case employers won t see any notifications).
Analyze:So i review my codes and debuged with log4net library and checked the windows event log
Tested/Debuged/Confirmed Steps
Groups Creating works
Loged in Customer assigning to groups works
Send notification to employers group WON'T work(code below)
Clients.Group("Employers", Context.ConnectionId).Send("Some Context");
So i created a method that sends notification to ALL loged in users and strangely it works
all my users including employers and employees are sees notifications.
In brief, using signalr inside asp.net mvc project, i can send notification to my users which in a specific group but while using windows service i can send notification to all my users but i can t send notification to my users which in a specific group.
I can share code if needed?
Any insights, thoughts, ideas are appreciated.
Revising -
In the method are you setting the hub context?
IHubContext hubContext = GlobalHost.ConnectionManager.GetHubContext<Hub>();
(do some stuff)
hubContext.Clients.Group("Employers").Send("Some Context");
If you are can you show some code?
I'm writing a simple mini-chat with custom User model and authentication via omniauth. The chat uses web-socket faye-rails to send and display messages instantly without refreshing the page. The matter is that I'd like to add private messages - I mean, that I can choose an user and start our own dialog in a secondary chat window. I've looked for the solutions, but everything I found was about e-mailing - with inbox messages, trash cans and so on. So I wonder if there's any solution easy to implement.
The source code of my chat is here
Welcome to push technology and active web design!
When someone logs in, present them with a list of friended accounts and logged in state. For logged in friends, they can select a friend from the list and start a chat session in a new window. For logged out friends, they can send a message that's delivered the next time the recipient logs in.
You'll then have to create a friending mechanism that allows a user to request a connection to a prospective friend, be notified of pending connection requests, approve friend requests, and an unfriend feature. Hopefully that one won't be used too often.
I've worked with Faye & I like Faye but also take a quick look at the beta release of Rails 5. Action Cable will do the same thing and the framework support is better.
How do i get chat history for Zoipm chat iOS SDKs, i am logging using anonymous user using default controller, is there any pre-config to be set to get this.
From an end-user's perspective, there is no way of seeing a chat history. Each chat is treated more like a ticket as it creates a ticket with the transcript upon completion. A chat transcript can be sent to the end-user.
I suppose the end-user could look through their ticket history and effectively see the chats alongside their other submitted tickets.
I integrated QuickBlox in my iOS app. Chat works, however I have one problem:
There is description how to use automatically generated push notifications to offline users:
http://quickblox.com/developers/SimpleSample-chat_users-ios#Push_notifications_to_the_offline_users
I implemented this feature and receive notifications. But if, for example, user of my app has two different dialogs: 1 - private, 2 - group; and chats in 1st dialog, somebody at the same time sends message in second dialog, then user doesn't get push notification.
Thus it seems to me that online status of user spreads to all it's dialogs when user logins to QuickBlox chat in app.
So I want to know is my assumption right? Can you please help me with this issue? Because in this situation I have to write my own logic for sending notifications to offline users.
Thank you.
Could you describe you problem in more detail with steps that you did?
And please look at the http://quickblox.com/developers/Chat#Alerts , by this link you may found your solution.
Let me start by saying facebook's developer documentation sucks. Bad.
I'm using the facebooker plugin in rails to let users sign up through facebook connect. Now when certain things occur I want to send notifications to certain users through facebook. I heard some say that notifications must go from one user to another, but I've seen evidence otherwise. I signed up at the site http://www.meetingwave.com/ through fb connect, and now they send me (annoyingly) daily notifications of new things on their site. Also, using the comments widget on my own site www.tmatthew.net, when an anonymous user leaves a comment I get notified of that as well.
So uh, how do you do that? I've been googling all week long and can't seem to find anything. It seems like I should be able to send a notification from my app to one of it's users.
The api call you are looking for is called Notifications.send. The only thing is that they will be disabling it very soon so there is probably no point in implementing it into your application.