How to send and recive text in windows phone using silverlight? - silverlight

I want to send a message from a windows phone to other windows phone via web services.
How can I do that?

Make use of Push Notifications. They are used to initiate an activity on a phone from a third party. There are three types of them: Tile Notification, Toast Notification and Raw Notification.
Toast Notifications (Example: SMS alert) are received when the application is not running. If for some reason sending from one phone to another implies that both of them run at the same time, consider using Raw Notifications. However, I suppose you should use both of them: if a Raw Notification is dropped (this usually means that the application is not running in the foreground), send Toast Notification.
As far as I undestand your requirements, you should do the following:
Once the application is started (or a user is logged in), establish Push channel and request PushUri for the phone from Microsoft Push Notification Server
Send the PushUri to your service, associate it with the user and save it.
To send a message to a phone application, just pass appropriate parameters to its PushUri. You can do this either from your web service or directly from another phone.
You may find the documentation useful. There are examples of how to establish, send and receive them.
P.S. Take into account that the second Toast Notification may fail as well because during the timespan between two Notifications the user may launch your application. Don't forget to handle this.

Related

How send notification into ms teams user from custom tab

I'm designing a custom team tab using React that calls third party API, I need after executing the API successfully, user gets notified . What is the best way to achieve this? I used Bot in my project, but not sure how can I call it from my custom tab class. I'm aware of the existence of proactive messaging, is it the only way to do it? If it is, a pointer on how to implement it to a custom tab would be appreciated.
If you're wanting to message the user 1-1 (like in the personal app), then proactive messaging is definitely what you need (inside a Team, there are other options), and considering you have the bot already in place that's perfect. The only thing you might be missing are the details required to send the actual proactive message (the best time to get them is when the bot is first installed by the user). In particular, you need ConversationId and ServiceUrl.
With regards the concept of Proactive Messaging, basically once the bot is installed, and you have the required values, you can -send- the message from any backend code at all. That can include, for example, custom tab's backend api. You need to identify the user, which you can do using the Teams Context (it's not the safest way but it's the easiest), and then look up the values in your own backend store (e.g. database or whatever) to get the ConversationId and ServiceUrl, then just message the user in your backend.

how could i identify that alexa notification is being seen(heard) by the user?

I want to push notifications to my Alexa Device until the recent notification is seen by the user. If the user has seen the notification I should stop sending it. If the customer hasn't seen my recent notification I should keep on sending the notifications until they have seen it.
So I need to identify whether my notification has been seen by the user or not.
Is there any service or API that could fetch me whether the delivered notification is seen by the user or not?
As far as I know, Proactive Events are one-way and not bidirectional: you send a notification to the user, the user can read it but there is no way to know if the user has read the notification.

Send updates to a user using Socket.io and nodejs

I'm building an app using MEAN Stack (something like Facebook). So a user can login to my app using different browsers and I want for example, if there user will add a new message to the MongoDB, I want to update his messages in the other sessions. The same of he will remove a massage. At the same time, there maybe logged in different users from different browsers and I want to notify the user with his update in the other sessions.
Does Socket.io supports such an option? And what is the best way to do it?
Thanks.
Yes socket.io do support that. Here is an example made by socket.io themselves: https://github.com/socketio/socket.io/tree/master/examples/chat
You should be looking for socket.on() which are the listeners for an event on the server side and look into socket.emit() which are the senders of the events. the .emit()could be added into an function which are triggered on a button click for example.
Depending on you needs, if you're going to send the message to every user using your app then you could use this above code. But if you only wants to send to a specific list of persons you should look into something called Rooms (http://socket.io/docs/rooms-and-namespaces/#rooms).
This does exactly what it sounds like, it emits the messages to the specific room where users have been added to when they connect to your application.

Making a phone call in Windows Phone

I am developing a Windows Phone app, which needs to make an automatic call when some event occurs, without user interference. Is it possible? (Purpose is legitimate)
If not, is there any other way to send some notification or message to the other phone from my windows phone app?
You can start a PhoneCallTask on Mango or later (so SDK 7.1 and later) - this can be pre-filled, but the action to place the call must be completed by the user of the phone.
Similarly, SMS messaging also requires confirmation (after all, both these actions cost money) - if you need inter-phone communication, you could implement yourself via a webservice and push notifications.
The only way for apps to make a phone call is by using PhoneCallTask, which requires user interaction, so I'm afraid you're out of luck.

How to: Create reminders that should trigger an event to be handled in a Windows application?

I need to develop a windows application with .NET 3.5 that needs to have a calendar and user can schedule appointments.
I want (not with a windows-service) that while the application is on, all the reminders that are set up for this user + reminders that admins set them up, should trigger an event in the application so I can handle it (showing the user a message, notify icon or whatever), once its datetime becomes now.
The data is saved in SQL Server and accessible from many computers, the admin should be able to externally create reminders for users.
Any approaches?
Locally, you could trigger the events using a timer that check the current time e.g. every 10 seconds or more often. The clients should regularily synchronize with the database server, querying all data for the current day or (on user demand) later events. This allows the clients to run and to remind the user even when the network fails for some time.
Another very interesting option is a server side reminder tool next to the database. It generates reminders and sends them via XMPP to the clients. The client machines don't need a special software anymore - any Jabber client would be sufficient, although a special software acting as an XMPP client would be possible, too.
You should really avoid popups. Popups are generally considered not user friendly. They interrupt the user's work flow. Even worse, they steal the keyboard input. What if the users was typing an important email right now?
Instead you might provide a nice, pleasant sound and a task bar bubble or similar.

Resources