Communicating to Windows Mobile using C#.net over TCP/IP or HTTP? - c#

We are building an application which is suppose to connect to the Support Engineer's Mobile phone and will alert him about any job to be done.
This application will be based on 2 parts. one is Control Centre part where the interface will be built using Silverlight 4.0 and ppl from Control Centre will be using it using normal pc over internet. The 2nd part is based on the Mobile Part where the support Engineer will be sent a communication via some magic that there is a job. And if the support Engineer will accept the job then the job will assigned to his tasks list...
Now the only issue is that how we communicate to the support Engineer on his mobile. We have couple of options...like SMS, Email over SMS etc...
SMS option is costly, so due to the cost management has refused the option, but actually SMS is fine as far as it is sent from the control Centre, but how we get the reply back from the support engineer. Coz we dont want the support engineer send us reply VIA sms coz this will cost him(thats why management refused this option). We have decided a solution that built a custom application for windows mobile which will intercept the coming SMS on the Support Engineer's mobile and will rasie a poupup detailing the job specs and on the same popup there will be couple of buttons like Accept, Reject. what ever the action will be taken it will update the control room via internet/WCF/HTTP. I have no idea how? and thats why I am here.
I am posting all this LOVE STORY so that any body senior can guide me abut the architect if it is ok or not...or any other options we can dig down further.
I appreciate your participation in this regard.
Thanks

Communication to the device is typically the hard part because the device rarely will have a routable network address. Sending an SMS is a reasonable way - so is sending an email (that's how the Microsoft email transport for WCF works). Another option is to have the device periodically "check in" to a server to see if it has any messages waiting.
Communication back is pretty simple. Build up a public web/WCF service that the devices communicate back to. Personally I'd probably lean toward a REST service to keep your mobile connection point a bit more open in the event you want to connect via something that maybe doesn't support WCF.

#Shax I've not done any mobile development but I think you need a WP7 app that will poll control center server over HTTP etc. if there is any job for the engineer. Another option will be to push any job notification from server to mobile. But I am not sure if this (push notification) is easier and/or cost effective.
Another option will be of setting up a website with details of jobs, then you can alert engineer with an SMS. Upon receiving SMS engineer can log into website and get details of the job.

Related

Implementing phone communication with my C# application

I want to have the app i am creating to communicate with my personal android device. As in, my application will be monitoring something on my server, and when something changes it needs to somehow send an option to act or ignore to my phone, and my personal reply (Yes/No) should be send back to the server.
I don't mind any specific protocols. Anything which does not require an app running actively on my phone would be nice, but i am not that great with android native development so if it can be done it should be relatively simply to achieve.
My own idea would be to actually implement Email somehow. So my phone could get an email on my google account (which in turn creates a notification), to which i would send a reply email with my reply. Which in turn will be read out on my server.
The bad part is that i would have to actually open gmail and type out a short message to send back as a reply. So anything easier then that would be a great thing.
I have seen newer android 6 apps use custom buttons in notifications in order for the app to act on, but i have no clue how hard those are to implement and rig to my reply.
Please note that this application is probably nothing that will go public. So i am not going to bother to worry about load or efficiency in the end of it. Since it will be just me and my server.
Any input would be greatly appreciated. The most convenient/easy-to-use method will be marked as the answer.
I think...u can use xml-rpc " http://xmlrpc.scripting.com " for communicating with your server and android app.
I used it in my personal project and found iI to be useful.In my case,I used wordpress as framework so any new updates in my server is notified by this protocol.

How do I create a Live Support chat application in C#?

I'm attempting to build a live support chat application in C# using a WCF microservice and after endless searches I still can't find the answer, hopefully someone here can point me in the right direction.
My problem is that rather than a typical chat room a where users broadcast messages to all connected clients, I need the application to be more like a Live Support app found on websites such as Amazon or eBay.
Ideally multiple customer support agents will have a pre installed WinForms chat application on their machines, when a customer opens a chat window (aspx page) it will connect to a server/service and the server/service will then call all connected customer support agents until one answers. At this point the customer and agent will be connected in a private chat window.
Could somebody please give me some insight or ideas on how to do this?
Thanks,
Owen
You can use ASP.NET SignalR which is a library for ASP.NET developers that makes developing real-time web functionality easy. SignalR allows bi-directional communication between server and client. Servers can now push content to connected clients instantly as it becomes available.
Here you can find more details and many tutorials about SignalR.
The first resoult in google
A WCF-WPF Chat Application
Video tutorial
WCF Chat Application
ASP.NET Chatting using WCF Services and JSon
A simple peer to peer chat application using WCF netPeerTcpBinding
usefull lectures
HTML 5 Web Sockets
Always first ask google, above you have few ready to use projects that you can copy to your solution
EDIT:
Also as tip I can recommend bi-directional message queues at application level, then make index for messages with session and users identifier. Next step would be WCF with pop and push logic based on wait objects. At low cost you will need to lock queue. WCF will do heavy job. Also problems can occure inside app with proxy management and message sending so dedicated proxy for chat would be great and safest idea. And read about Duplex Services that can be usefull here DUPLEX SERVICE
These are my findings, not checked though:
Live Support Chat using SignalR
Parle
A tutorial from ASP.NET team:
Real-time chat with SignalR 2
The first one looks very early development stage, Parle is somewhat more promising.
Anyway, since I continue my research on the topic maybe I'd need to augment my answer. Until then the links could be a good starting point.

Instant notifications like Facebook

I am building a social application and was wondering how facebook achieve their notifications.
As you know, facebooks notifications are instant. As soon as someone takes an action, people are notified.
I assume they don't have a query running on the database all the time.
Can someone point me in the right direction. Thanks
Since your question is tagged with C#, ASP.NET you should use the awesome SignalR library. Basically SignalR enables you to send push notifications to the clients. Which exact underlying technique it uses is influenced by the capabilities of the Server and the Client.
There is a big real time chat site called jabbR that is built on top of SignalR:
http://jabbr.net/
Here are some more links that should get you started.
Project site: http://signalr.net/
Hosted Code (Open Source): https://github.com/SignalR/SignalR
Wiki: https://github.com/SignalR/SignalR/wiki
Projects using it: https://github.com/SignalR/SignalR/wiki/Projects-Using-SignalR
Facebook uses a messaging protocol (which it designed) called Thrift. This allows notifications from clients to servers with very low latency. I would imagine updates on the server would be triggered depending on the user action and relevant users that are logged in would be notified by the same mechanism.
Using a messaging protocol such as thrift (also see Protocol buffers) clients don't have to poll the server for updates, instead the server can push notifications to clients. To do this the server needs to have a notion of who is logged in at any one time (Login, logout handshaking) and of them, who should receive notifications from a particular client action.
Easier said than done, especially when you have 800 million potential users logged in!
You might want to take a look at http://nodejs.org/ - it is an event-driven model which is perfectly ideal for a 'social network' / instant notifications scenario.
FYI: You also might find that using a non-SQL database such as MongoDB (http://www.mongodb.org/) will be a lot faster when querying from the DB since each 'person' object in a social network scenario has his/her own unique attributes - which in a normal SQL database is hard to design.

Send SMS from desktop application

How should I proceed? I found nothing useful googling it but some really expensive programs to connect a cell phone to the pc and use it to send the messages.
I'm willing to pay for the service and the messages will be sent to Israel and US.
I'm using C# but I'm willing to use any language.
Cheers!
The easiest way to do it is with Twilio. You can get it set up in a matter of minutes. Check out my answer Sending SMS from asp.net website for an example program of just how easy it is to send SMS with Twilio and C#.
You want to use an sms gateway that has an API. The most likely will be a REST or SOAP API that you can consume from your app.
When you need to send an SMS invoke the gateway's send method.
The gateway you choose will be influenced by which country you're in and if you need to send international sms.
As a reference we use SMS Global for AU message sending via their API, which can serve as an example of the type of thing you could expect:
http://www.smsglobal.com/en-au/technology/developers.php
Yea, for an actual sms message you will have to buy some hardware or software. A free alternative is to use sms gateways, http://en.wikipedia.org/wiki/List_of_SMS_gateways. You can send an email to 1234567890#vmoboile.ca and virgin mobile will forward that email as a text message to #1234567890. The limitation here is not every company offers this service (most major ones do) and you will have to know which company each number belongs to. Here is a list of sms gateways.
http://en.wikipedia.org/wiki/List_of_SMS_gateways
I have work on that purely through C#.
1st you need a sms modem, I live in Singapore and the vendor I got from resides in singapore too. But at home I did my own testing using my Nokia E63 handphone.
I don't have the coding at the moment, but I can tell you how to go about searching.
Using C#, I did a serial port connection (applicable too if using USB), send AT+ commands over to the modem, and the message will be sent.
To test if you phone is suitable, it can be done so using HyperTerminal. Connect your phone to the computer via the correct port and setting and send AT commands directly from there.
The best way to achieve this is to use an SMS gateway. An SMS gateway encapsulates the technicalities of interfacing with SMS carrier medium on one hand and on other hand it provides an interface for application level protocols like http, SMTP, ftp etc. to interact with it. For example, you can have a web application talking to the SMS Gateway over HTTP and the gateway on its other side will talk to the SMS centre over some proprietory protocol to send the SMS text received from the application. This way, the application need not know the low level protocols to send the SMSs.
You can lease a line to an SMS center (SMSC) if you need to send large number of bulk SMSs and configure your SMS gateway to use this lease line to send the msgs. But leasing a line is far more expensive. If you need to send small number of messages, then you can use your mobile phone in place of the leased line. Attach your mobile phone to your PC/Server and configure the Gateway to use your phone. You need to refer to your gateway documentation on interfacing your phone with the gateway. This is not very difficult but fairly simple.
There are lot of commercial gateways available in the market which can be used. But using an open source SMS gateway is a good option. You can use an open source gateway called - Kannel. Believe me, it is not very difficult to set it up and start using.

Easiest way to Send/Receive/Respond to IM in a website

I have a website written in C# and when a user does something I want to be able to send an IM message to an admin and allow the admin to respond to approve/deny the request.
I would like to use something like MSN Messenger or AIM so that the IM messages can also be sent to phones as sms.
You need to pay for the use of an SMS gateway of which there are many. Typically you buy bulk messages in advance. There are very few (if any) free gateways out there as we all know what scalping b*stards the cellular companies are. IIRC, the protocol used is SMPP.
http://en.wikipedia.org/wiki/SMS_gateway
If you weren't on a hosted site and owned your own hardware, you can plug any modern cell phone into your USB port and use the vendors software to send SMS either via a serial protocol using Hayes commands, or much more likely these days, a nice object model in java, C# or c++. Nokia have offered this for years.
I would take a look at Twilio (http://www.twilio.com/). They specialize in helping developers integrate SMS/Voice into applications.
Twilio is a web service that can be used to make and receive calls and text messages using their REST/XML API. You have to pay for the service, but it is very very to use.
For sending SMS messages out from the program, one simple approach is to use email (as long as you know the phone company of the person you're sending the message to). For example, to send a text to a telus (Canadian provider) phone, just send an email to
[10 digit phone number]#msg.telus.com.
Different phone companies have different formats, you would need to find a list of these addresses for your area. Not all of them support receiving these messages without paying a fee, but some do.
Edit: Here is a list of addresses for US carriers, try the appropriate one and see if it will work for you:
http://www.tech-recipes.com/rx/939/sms_email_cingular_nextel_sprint_tmobile_verizon_virgin/

Categories