I’ve looked in multiple places, but cannot find details of how to register a web site against a notification hub for the sending and receiving of push messages.
The only like examples I have seen use a custom Node.js server for the web site to interact with.
Would really prefer to use a hub so we can send tagged messages to our browser app at the same time as our native apps.
It sounds like you want to register a web application to Azure Notification Hub to receive notification message. A web application can be as backend to send notification message using SDK in different languages like .NET, Node.js, Java, PHP, and Python. But the answer to receive notification message from web is absolutely not, there is an answer of the exising SO thread Can we register a webapplication to recieve notification from azure notification hub which has answered it.
Azure Notification Hubs are exclusively for push notifications for mobile platforms.
Only one exception is Google Cloud Messaging (GCM) supports Chrome Apps, please see the tutorial Tutorial: Push notifications to Chrome apps with Azure Notification Hubs
For sending and receiving Push Notification in browser, the only way is using Web Push API, you can refer to my answer of this SO thread Azure browser push notification for chrome, firefox ,and safari browser. And there is a Mozilla cookbook site for Web Push to show some examples to help getting started. Then, you can host your web push server on Azure. These Mozilla examples' backend are all using JavaScript based on Node.js, you can get the other web push libraries at this GitHub org web-push-libs if you want to use other languages.
Related
I have a WinForms application and I want to receive inbound SMS using Twilio. I am using VB.NET. The code that I find on the Twilio website are using web application and MVC. Can anyone help me how to use it in WinForms?
Did not get enough to try out anything.
Twilio uses a standard way of notifying your service, called webhooks. When an SMS, phone call, or something else happens, and you configure a webhook for that, Twilio will send HTTP requests to the URL configured as a webhook.
This does mean that you have to have a publicly running web server that can accept those HTTP requests with the details of the SMS, phone call, etc. That's why the samples will use ASP.NET, as this is only possible with web technology.
Winforms runs on your computer and doesn't expose any public web endpoints to receive the webhook HTTP requests, so you can't receive it directly. However, depending on your use-case, you have options.
If you don't need real-time updates, you can read the message history using the Twilio C# .NET SDK.
In your winforms app, you could add a button to refresh the messages on click. Alternatively, you could query the message X amount of seconds to give it a more real-time feel, even tho it's not really real-time.
Warning: to use the Twilio API to get the messages, you'll need to embed the Twilio credentials into your Winform app. Anyone that has access to your app will be able to read those credentials. Keep that security risk in mind!
The second option is to use ASP.NET to receive the webhook HTTP requests, and then use a SignalR or websockets to notify any connected clients, of which your winform app would be one.
For example, when Twilio receives an SMS, the ASP.NET application receives the webhook HTTP request, the ASP.NET app then send the SMS details to all clients connected to your SignalR hub, and then your Winforms app receives the SMS payload which you can use to render your app.
The second option is a lot more work and requires more infrastructure since the ASP.NET app needs to be hosted somewhere. We don't have a tutorial for that, but I'd be happy to forward more links to docs etc. if you have questions.
I have an application that runs as a website (not locally hosted) on a kiosk and I'd like to improve the usability of the login page by tapping an RFID tag against a reader on the kiosk and populating the username box on the login page with the value read from the tag.
I've written a windows service that monitors the com port and reads the RFID tag but I'm not sure how to communicate this data to the webpage on screen. What I'm currently investigating is having a centralised "device hub" api and transmitting the value from the RFID reader service to the hub via SignalR and then relaying it onwards to the webpage again via SignalR.
I'm using asp.net core for both the kiosk website and the proposed "device hub" and I've already got Identity Server 4 in use that I'm planning to use to authenticate the components here although I think I might run into some issues with cross-domain authentication I'm hoping they're surmountable.
My question is this - is this the right strategy for communicating like this?
Before I go too far down this rabbit hole is this technique my best option (using SignalR to "bounce" the message off a device hub and then forward it to the website login page)?
I'm working with Windows Azure Notification Hub and Android, testing the notifications push service through GCM. I'm using tags, pushing notifications from a Web application (back-end) integrated with Windows Azure.
The issue is: I don't know how to subscribe from an Android App to listen to those tags.
Create a Custom API with Azure Mobile Apps Server SDK. This should take the device registration Id and then do the registration with Notification Hubs. Azure Mobile Apps Server SDK wraps the Notification Hubs SDK for this purpose.
In your client, you can follow the appropriate Client SDK tutorial on push (Android is here), but use InvokeApi to invoke your custom API to do the registration instead of calling client.getPush().register().
Another good reference is the Android Client HOWTO Docs.
I looked at the Skype API docs (http://dev.skype.com/desktop-api-reference) and it seems to provide API functionality for interacting with a Skype program running on the same machine.
How can you send a chat message from a server that is not running Skype?
If you still need a solution for this problem, you can try now creating a Bot using Skype Bot Framework from Microsoft (https://docs.botframework.com/en-us/skype/getting-started).
It's kinda easy to implement, and the bot acts like a contact, wich must be added by someone to start interacting with your app behind it.
I'm creating Google talk client for iOS. I have BOSH server (used node-xmpp-bosh) and iOS client (used xmppframework). The iOS client connect through this BOSH server.
Now, how can I made a push notification to client (possibly from Bosh server) whenever there is incoming chat message or friend request?
Thanks!
node-xmpp-bosh actually provides for exactly this sort of use-case. The BOSH server is an instance of an eventpipe that lets you pipe events to/from the BOSH server to your custom modules/plugins. This is where you can code up the logic for the push notification service.
The advantage of doing this on the BOSH server is that you can support every XMPP service and not just the one that you control the XMPP server for. i.e. You can provide this functionality for google talk, facebook, jabber.org, etc...
Disclosure: I'm one of the authors of node-xmpp-bosh.
To support Push notification you need a special change on the server. We have developed that module for ejabberd (this is something you can see in TextOne and OneTeam).
The details to implement push notification yourself is available on:
http://developer.apple.com/library/mac/#documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/Introduction/Introduction.html