Push Notification to Mobile Devices via SMS – Part 2

To implement push, let’s start by sending the SMS that will be the notification that the mobile device will receive. To do that, we will use the free SMS service from ZeepMobile. Doing a search for “ZeepMobile C#” results in a match to AboutDev’s Weblog. He has already done all the heavy lifting of writing a managed wrapper around ZeepMobile’s SMS API. I rearranged the code slightly so it is easily reused.

Here’s the code sample from my ZeepMobile managed API:

ZeepMobileClient myClient = new ZeepMobileClient(API_KEY, SECRET_ACCESS_KEY);

private void mySendButton_Click(object sender, EventArgs e)
{
if (string.IsNullOrEmpty(myUser.Text) || string.IsNullOrEmpty(myMessage.Text))
{
MessageBox.Show("Please enter a user and message");
return;
}
myClient.SendSMS(myUser.Text, myMessage.Text);
}

Ok! Now, let’s hook up the SMS notification to my blog. The iframe below is hooked up to a ASP .NET application that uses the ZeepMobile managed API to subscribe a user and allow them to send SMS to themselves. First enter a user name to register on this blog, then follow the steps that show up to allow this site to send you SMS through ZeepMobile:

You should be able to use this site to send SMS to yourself. Next step, intercept the SMS on your phone and handle it. More to come in a later post!

Click here for the code used in this tutorial. The code sample includes a standalone Windows Application that allows you to send SMS to your phone (once you get a free API key with ZeepMobile).

5 comments:

plastiswafer said...

Well I see you're too good to answer any of my questions. Just another stuck up dev, I presume. You people make me sick. Who do you think you are? Always on a power trip because you think your brains are so much bigger than the general population. Good luck writing apps for crap I've never even heard of, I'm going to keep up the journey through Azeroth without your help. Thanks for writing an annoying program that only makes me and every other person angrier than ever.

Koush said...

WoW? Who plays that anymore... :)

Koush said...

And tell Kewpuh I said hi

plastiswafer said...

hahahahaha

miss you CLAWKWORK

Anonymous said...

Nicely done Koush! A very logical next step. :-)