This application is part of the author's "30 Days of .NET" initiative to develop 30 mobile applications in 30 days. The source code of the application is included in order to help programmers new to Windows Mobile development write applications in .NET.
Today's application is CallBlock. It is designed to watch incoming calls, and check and see if they match any on the block phone numbers list. If they do match then the phone is "blocked".
The first thing you should notice is the flashy logo at the top of the form. I create this logo with an online 3D logo generator. The one simple touch adds a lot of professional polish to the application. I really like red and white so I didn't change the background color this time. But I am starting to wish I had. It seems a little "blah" to me now.
Next we have our phone number input text box. The user enters the phone number here, and presses the Block menu item to add it to the block number list below. On the main menu we also have options to Unblock, and Unblock All. And we have our almost universal About and Exit menu items.
There are two main pieces to this application. One part is the State and Notification Broker code to give us an event to catch incoming phone calls.
I actually got myself painted into a corner, I assumed you could just programmatically ignore of phone call but it isn't that simple. Fortunately, a good friend of mine, Lou Vega, came up with a very slick workaround for this. And that is the second part which is the keybd_event method that allows us to send keypresses to the OS to Ignore the phone call.
It would be easy to add support for blocking SMS text messages as well. We've done all the code for this already in previous applications. Also the application could really use a persistent data store to remember number to block in case the user closes the application. It would be nice to allow user formatting of entered phone numbers for increased readability.
· .NET Compact Framework