Web application control through text messages - sms

I want to develop an application that works by receiving text messages from users to gather data. I have no clue where to begin and what to begin with. I can code in Python, C++, PHP and can do Java also.
I was wondering if there can be a personal development setup or framework on which I can develop such application. Releasing it is a different story but I do not have any idea about what setup is needed to develop this application.
Also, how much would this setup cost? Are there open-source or any other cheap alternatives?

There are a lot of services out there that let you receive SMS via a web request. The one I work for Twilio will send you a simple POST request to a URL of your choice containing To, From and Body whenever you receive an incoming message. You can read more about how it works here.

This service offers an api for receiving text messages. You can use the shared number and send it to your server with a keyword or you can pay a monthy fee to have your own dedicated number. So there would be a good place to start.

Related

How to build real time notifications in a distributed project?

I wonder to know which technique and tools I should use to have the ability to send real time notifications to users. Specifically if I build a messaging system.
I can see that modern social networks can send notifications about new messages almost immediately. Even when the user 'A' from one country writes a message to the user 'B' in another country you can see that the user 'A' writes a message and you immediately see it (even if those users live in different continents).
I tried to figure out how it is possible and find any information about this but without success.
The only thing I found out is the technique when we use a Redis or RabbitMQ server with several servers which acts like publishers and subscribers. Our API servers receive new messages then they push a new message in the queue then subscribers receives the messages and if they have an open WebSocket with the recipient they push this message in the WebSocket and a client receives the message.
But it really won't work if you have a distributed project and your clients are connected to the nearest servers in the nearest data center.
The question is: what technologies/techniques/anything we should use to be able to build notifications in a distributed project?
If you develop your distributed app/system using web technologies, you can consider building what is referred to as a Progressive Web App. With PWAs you can add push notifications in a relatively easy way. You could start with a PWA approach, and then decide later on if developing a native app as well (i.e. iOS or Android) would be necessary.
There are many resources to learn and guide you in developing progressive web apps. Check the references I mentioned above, and you can do this codelab as a starting point.

Receiving pushed messages from web service

I am working as part of a team using Android and WP7 to create apps that communicate with a server. So ideally we want a consistent approach to receiving the data from the server.
I currently am using HTTPWebRequest to form a SOAP message and send it to a Java-based web service to receive messages (Adding as a ServiceReference didn't work no matter what I tried) At the moment it's a simple case of receiving the full list of things and just recreate the list each time via DespatchTimer to do periodic calls. But of course periodic pollin is likely to be ratehr battery intensive so not the best apporach for my needs.
I now need to change the code so that changes are pushed rather than polled. The team is looking at XMPP to do this as Android libraries are readily available to do this but I am having trouble finding open source libraries to do this.
Microsoft Push seems available but this appears to require a Microsoft based server side environment to push unless I have misinterpreted this? Or even if push notifications are a sensible way to do this.
So what I would like to know is the approach to handling pushed messages in this scenario which i hope someone out there has had experience in
Thanks
Microsoft Push Notification System [MPNS] does not require a MSFT-based server backend. It simply relays the Push Notifications through carrier or other data channels to subscribing phones. You should be able to make HTTP POST requests to MPNS at the Windows Phone subscriber Channel URI & MPNS would deliver the Push Notifications for you. Your server side can be anything, as long as you able to make the HTTP requests.
A good starting point can be found here.
Hope this helps!

Windows Phone 7 - how to send files from/to the app?

I'm trying to write the most basic application for windows phone 7 and want to be able to send files (specifically XML in case that changes anything) to my app. Currently I have a WCF service setup so I can send push notifications through it. The problem is that there is a limit on the amount of raw data I can send via a push notification.
My solution to this is to send the initial push notification (either tile or raw) to alert my application that I want to send a file to it and then make the app somehow communicate with a server (everything is on my personal computer btw - I'm just trying to figure out how things work) - from which the app will recieve/download the files.
What is the easiest way to accomplish this? Note that I'm not concerned with security or anything like that.
Clarification - the question is essentialy: how do I transfer files from/to a server to/from the phone? Assume everything else was handled - the app is up and running and the user has given or will give permissions to every possible thing he may give his permission to.
Unfortunately, the total size of a push notification (including HTTP headers) is 1kb. This means that it can't be used to send large amounts of data.
Instead of sending the whole file, send a notification (raw or toast—as appropriate) which should be treated by the application as a trigger to go and retrieve the new file/data/whatever from the server. It may also be worth checking for new messages when your app starts. However, if when you start the app it will notify the server that it is ready to receive raw notifications and such messages will be sent indicating new content is available, it may be unnecessary to add this extra check.
To transfer files to/from the phone you will need to use either HttpWebRequest or WebClient as this is the only way to use HTTP on the device and HTTP is the only protocol currently available to transfer data.
While WebClient may appear to be easier to use than HttpWebRequest it is less flexible and will automatically perform it's callback on the UI thread and if you're downloading files in the background you almost certainly don't want this.
There is no way to transfer files to/from a conencted PC and have them exclusively available to your app.
First of all: you won't be able to do this approach automatically - the user will have to open your app to do that because WP7 SDK doesn't allow your app to run on background/start automatically once a push notification is received.
The only way to communicate with your server, at this point in time, is web services. If I were you, I would check for new information available once the app is started, if there is new info, I would call one or more web services which would return me all the information that I need.
If you want, you can use a timer to check for information periodically.
As I said, it will only work while your app is running (check the app lifecycle if you don't know it yet), WP7 doesn't allow apps to run in background, that is a serious limitation IMHO.
Good Luck,
Oscar
Maybe a little bit off topic but when I was thinking about file sharing in my WP7 app, I found two approaches:
Integrate an app with Dropbox
Use advanced explorer for WP7
You can use the WebClient class and the DownloadStringAsync method in order to download data from a web service .
A good example of this is Scott Guthrie's Twitter app from MIX10 .
George

getting started with SMS developement

i will have the following set up:
people will be sending text messages to a server, and that server will be forwarding the messages to other phone numbers
i am not sure what kind of framework i should use.
should i develop an SMS gateway and use AT commands?
should i just try to somehow use AIM or GCHAT to capture and send SMS messages?
would there be a different more suitable configuration?
are there already developed frameworks that are free which i can use? for example i know that i can send an SMS to almost anyone through gchat or aim by sending a message to "+" and the number of the person. is this scalable and can i use it for my own benefit?
any sms developers out there?
I used to use this website: www.aspsms.com.
It provides a lot of libraries in different languages, the prices are affordable (I think) and they offer some kind of "2 ways service".
are there already developed frameworks that are free which i can use?
Free, that would surprise me.
You could get a short code from an aggregator like www.openmarket.com

SMS alerting to respond to error situations faster

What is the easiest way to set up an SMS alerting system so that I will receive notification if my server doesn't respond or a GET query doesn't return correct content?
You can completely outsource the monitoring and alerting, for example by subscribing to Pingdom. The most basic Pingdom plan will monitor up to 5 services (including using HTTP GETs with optional content pattern matching) and send an SMS after a configurable amount of downtime.
If you want to roll your own solution, the first thing to get right is the monitoring software. Many, many third party solutions exist for this, from the free to the outrageously expensive. Of course, rolling your own "try a GET and do something if it doesn't work" script is always an option, but as with all software, feature creep may mean that you're just re-implementing existing solutions soon...
For the SMS notification, using an e-mail-to-SMS gateway might work for you, if you're in a territory well-served by such services. Most US providers, for example, provide free gateways, whereas in Europe they tend to be run by third parties and pay-only. As already suggested, Google is your friend here. Also, your monitoring tool may support sending notifications directly using a cellphone/GSM modem attached to the monitoring server.
Often I've found that what you need is a SMS modem attached directly to your monitoring server. What if the problem is the network connection?
What you want is an SMS gateway. There are surely some service providers local to you. Unfortunately, they are a bit hard to find. Try asking Google...
You can get a service like http://www.serviceuptime.com/ and the send an email to your-number#a-domain-your-provider-gives They usually have the exact domains for the providers on their respective websites but you could just try #t-mobile.com if your provider is t-mobile for example.
If you want to write your own tool should be pretty straightforward - send GET request if you dont get the expected response send email. You should run it from 2 different locations from 2 different ISPs tho because if there are routing problems and the request doesnt go through you'll get smsed

Resources