Is it possible to notification to specific connectionId in aspnetboilerplate framework? - asp.net-mvc

i'm developing using the AspNetBoilerplate Framework version 2.3 SPA
.In order to send notification to specific user while logged in from another device, want to do this by INotificationPublisher to specific ConnectionId is it possible? Or we have to send to all connectionIds?
to clarify my problem:
I want to when for example John is logged in from PC and then logged in from another device, he receive an alert in pc like this "someone logged in from another device..."

Related

SignalR won't work properly inside Windows Service in comparison with Client Version

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?

How to send user input to designated e-mail?

I am developing an iOS app targeting iOS 9 and above using Swift 3 and xCode 8.
I have a "Contact ViewController" which contains multiple forms where user enters its data to submit. Collected data also contains users' e-mail address. I am validating all the information that entered by the user correctly.
So, what I would like to do is my "send" button to send the user's all data to an e-mail address.
Is this possible without using Mail App or its interface? Do I need additional framework for such functionality?
I appreciate your time and sharing your thoughts.
This is not possible secretly. You can't send an email from the users device via the Apple Mail app because the system will not allow that. You can prepare an email with all the data that opens and let the user send it to you by tapping "Send" in the NavigationBar. So yes, you would need another framework to do that.
But I would not use emails to do that. Just use a server you send the data to or a service like Firebase.
If you really have to send E-mails, and just pushing the data to a backend API is not enough:
This is not possible using built-in functionality, but you could leverage an external mail delivery service like Mailgun to send your mails. (From a security standpoint, this should be handled by a server and not by the app itself however.)

QuickBlox Chat: How to detect that another user has disconnected?

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.

XMPPFramework - iOS Chat Client - Offline Message

I am working on the xmpp iOS chat client, I have developed application in which chat between two user are working fine.
Now I want to load offline message for the user when he logs in the application. I want it when user go to the conversation screen with particular user.
For example if A user receives message From B. And when user A login the app and start conversation with user B user A should see the old message also.
or if possible I would like to load the recent history from the server in xmpp iOS client.
If anyone has any link or document related xmpp framwork please let me know.

how to detect custom urls of a third party application from bbm and email link in blackberry java

Requirement: when the user presses enter on e.g. bbApp001://screen1?param1=1234567890?param2=12345678
where bbApp001 is one of the apps in the device; screen1 is one of the screens that is created in the app; and param1 is the first param that is sent along with the link and same with the param 2.
In a BBM message or in the email the corresponding application will be invoked with that as context.
how to detect custom urls(bbApp001://screen1) of a third party application from an email or bbm link in blackberry
if above can be done then how to send content with links to email and bbm so that when a user click the corresponding app is launched
Note: for the first - I have tried to launch from another application using ApplicationManager.getApplicationManager().launch("bbApp001?screen1&param1") but my requirement is to trigger/invoke the app once the user click on email or bbm message.
It's explained here. Please try and let us know.
http://supportforums.blackberry.com/t5/Java-Development/Launching-Blackberry-Application-via-a-Custom-URL-Scheme/td-p/1395479

Resources