Monday, June 30, 2008

image And there you have it: 30 .NET Windows Mobile Applications in 30 Days!

I really liked yesterday’s application, Community Megaphone Reader. I think it was because it was a Windows Mobile mashup application. And we can look forward to many more of these types of applications to come our way.

 

image

Trippr

You’ve probably already figured out what this application does. That’s right it takes your current GPS position and pulls back pictures that are geotagged for the area you are in. So while you are riding down the road you can flickrscan for photos taken near you, possibly as close as the block you are on.

Really cool idea I think. I’ll probably hook this up to the dashboard of my car and just let it run while I drive around. It should be lots of fun to just see what I see.

The UI is basic sterile white, but I wanted the photos to be the star of the show so I went with the one uber true neutral color.

Control are very simple: Update, Menu, GPS, GPS Start, GPS Stop, About, and Exit. Update is the main feature. Any time it is pressed new photos are downloaded.

Again for this project we looked to the GPS Intermediate Driver Reference, it has served us well these 30 days and I really highly recommend it. If you need to do a Windows Mobile GPS application use this and you are almost done.

Another great API I found is the Flickr.Net API. If you need to connect to Flickr in .NET or .NET Compact Framework this is great. It does all the heavy lifting for you! I was up and running in minutes!

“The Flickr.Net API is a .Net Library for accessing the Flickr API. Written entirely in C# it can be accessed from with any .Net language in .Net Framework 1.1, .Net Framework 2.0, .Net Compact Framework 2.0 and Mono.”

Update Method

   1: if (gpsPosition == null || !gpsPosition.LatitudeValid || !gpsPosition.LongitudeValid)
   2:      return;
   3:  
   4:  double minimumLongitude = gpsPosition.Longitude - 1;
   5:  double minimumLatitude = gpsPosition.Latitude - 1;
   6:  double maximumLongitude = gpsPosition.Longitude + 1;
   7:  double maximumLatitude = gpsPosition.Latitude + 1;
   8:  
   9:  string apikey = "get_your_own_flickr_key";
  10:  Flickr flickr = new Flickr(apikey);
  11:  
  12:  PhotoSearchOptions options = new PhotoSearchOptions();
  13:  options.BoundaryBox = new BoundaryBox(minimumLongitude, minimumLatitude, maximumLongitude, maximumLatitude);
  14:  options.Extras |= PhotoSearchExtras.Geo;
  15:  options.PerPage = 10;
  16:  options.SortOrder = PhotoSearchSortOrder.InterestingnessAsc;
  17:  
  18:  Photos photos = flickr.PhotosSearch(options); 
  19:  StringBuilder stringBuilder = new StringBuilder();
  20:  
  21:  foreach(Photo photo in photos.PhotoCollection)
  22:      stringBuilder.AppendFormat(@"<img src=""{0}"" style=""border: 1px black solid; padding: 0px; margin: 1px"" />", photo.ThumbnailUrl);
  23:  
  24:  webBrowser.DocumentText = stringBuilder.ToString();

Possibilities:

Obviously this needs an auto-update feature and settings for those of use who will use it on the road. If I click on a picture I’d love to see a larger view of it as well. and a details listing telling me more about the photo would be great.

Download executable: trippr.cab

Download Source Code: trippr.zip

Thank You:

I appreciate everyone’s encouragement and feedback. This project would not have been a success without all of you. Keep an out there’s more to come in the future. Wink


Monday, June 30, 2008 10:24:00 PM (Eastern Standard Time, UTC-05:00)  #    Comments [0]  |  Trackback

imageWe only have one more day left in our 30 days of .NET [Windows Mobile Applications]. Where do we go from here?

I’m really happy with the 30 Days of .NET so I do think I will continue that in one format or another for some time. It’s been a blast. And everyone knows my passion for Windows Mobile programming so we keep finding way to work that in there as well.

I haven’t quite decided what I’ll do for next month but I’m sure it’ll only get better as we move forward.

There have been a lot of request for applications that haven’t made it on deck yet, and obviously they aren’t all going to get done tomorrow. But I think I’ll be able to throw in some Bonus Day of .NET or Return of Day of .NET and knock some of them out over time.

My goal is to take all the existing content and clean it up some and make more through and detailed learning materials to really help beginners take off with Windows Mobile.

Hope you’ll join me on the road ahead…


Monday, June 30, 2008 1:10:00 AM (Eastern Standard Time, UTC-05:00)  #    Comments [1]  |  Trackback

Wow, it’s hard to believe the month is almost over already. So far we have 29 applications done in 29 days! Thank you for all your encouragement.

If you missed the week one recap here it is: 30 Days of .NET [Windows Mobile Applications] - Week One.

If you missed the week two recap here it is: 30 Days of .NET [Windows Mobile Applications] - Week Two.

If you missed the week three recap here it is: 30 Days of .NET [Windows Mobile Applications] - Week Three.

What’s your favorite?

image image  image image
GPS Clock MobileInfo Mobile Flashlight SmartDial

Let see we have a time utility, and device information, call blocker, and lots more!

image image image image_thumb15[4]
GeoCash Repeatr CallBlocker What will be next?

Feedback:

Got an idea? Got some feedback? Share it? Thanks!


Monday, June 30, 2008 12:06:00 AM (Eastern Standard Time, UTC-05:00)  #    Comments [1]  |  Trackback

 imageA friend, a coworker, and an all-around great guy, Page Brooks, has created a contest for building controls for Silverlight.

Here’s the highlights:

"Welcome to the Silverlight Control Builder Contest! With this contest, we hope to incite the development of many open and free Silverlight Controls that all developers can use in their applications, and what better way to do this than through a friendly contest! This contest is your chance to demonstrate your control building skills to the Silverlight community and win some pretty cool prizes at the same time!"

Check out the prizes:

1st Place

  • 1-Year MSDN Premium Subscription (Not for Resale)
  • Your choice of one book from the entire O'Reilly catalog

2nd Place

  • Microsoft Visual Studio 2008 Standard Edition
  • Your choice of one book from the entire O'Reilly catalog

3rd Place

  • Essential Silverlight 2 Up-to-Date from O'Reilly
  • Your choice of one book from the entire O'Reilly catalog

Great opportunity to build a little fame and win some great prizes. Find out more after the jump: http://gosilverlight.org/


Sunday, June 29, 2008 11:52:00 PM (Eastern Standard Time, UTC-05:00)  #    Comments [0]  |  Trackback

Only One Day Left…

Not too long ago Page Brooks and myself made the three and a half hour drive from Florence, SC to Greensboro, NC to attend the Ineta Carolina Community Leadership Summit '08. This was a great event and there we meet a lot of the local Ineta user group leaders. We also meet Andrew Duthie, aka DEvHammer. One issue that rose to the top of things we wanted to work on improving at the leadership summit was awareness of events that are occurring in the local regional area. That’s when Andrew told everyone about the project he has been working on: Community Megaphone.

I love have information at my fingertips, so I decided to write a tie-in application:

image

image

Community Megaphone Reader

Basically, this application connects to the Community Megaphone RSS feed and pulls down event data. Then it takes your current GPS position and calculates your distance from each event. Finally, it takes all the events and sorts then so you can find the event that is the closest to you. This is a great application for the traveling .NET geek. Where ever you are you can find great .NET events to attend.

The UI is paying homage to Andrew’s Community Megaphone site. I tried to match the basic colors to keep it familiar. The hyperlinks are active and will take you the event’s page on Community Megaphone. The menu only has a few options: Refresh, About, and Exit.

An application like this is really exciting, because it is tying the world of mobile together with the world wide web.

These types of mashup applications will contitue to take of for years.

LoadRss Method

   1: public static DataSet LoadRss(string requestUriString)
   2: {
   3:     HttpWebRequest feed = HttpWebRequest.Create(requestUriString) as HttpWebRequest;
   4:     StreamReader streamReader = new StreamReader(feed.GetResponse().GetResponseStream());
   5:  
   6:     string rssXml = streamReader.ReadToEnd();
   7:     rssXml = rssXml.Replace(@"<?xml version=""1.0"" encoding=""utf-8""?>", string.Empty);
   8:  
   9:     StringReader stringReader = new StringReader(rssXml);
  10:  
  11:     DataSet dataSet = new DataSet();
  12:     dataSet.ReadXml(stringReader);
  13:  
  14:     return dataSet;
  15: }

 

GetEvents Method

   1: public static List<Item> GetEvents(DataSet dataSet, GpsPosition gpsPosition)
   2: {
   3:     List<Item> items = new List<Item>();
   4:  
   5:     foreach (DataRow dataRow in dataSet.Tables["item"].Rows)
   6:     {
   7:         Item item = new Item();
   8:         item.Title = (string)dataRow["title"];
   9:         item.Description = (string)dataRow["description"];
  10:         item.Link = (string)dataRow["link"];
  11:         item.PublishDate = DateTime.Parse((string)dataRow["pubDate"]);
  12:         item.Latitude = Double.Parse((string)dataRow["lat"]);
  13:         item.Longitude = Double.Parse((string)dataRow["long"]);
  14:  
  15:         if(gpsPosition.LatitudeValid && gpsPosition.LongitudeValid)
  16:             item.Distance = GeoCodeCalc.CalcDistance(gpsPosition.Latitude, gpsPosition.Longitude, item.Latitude, item.Longitude);
  17:  
  18:         items.Add(item);
  19:     }
  20:  
  21:     items.Sort(delegate(Item item1, Item item2)
  22:     {
  23:         return item1.Distance.CompareTo(item2.Distance);
  24:     });
  25:  
  26:     return items;
  27: }

Display Events Method

   1: public static string DisplayEvents(List<Item> events)
   2: {
   3:     StringBuilder stringBuilder = new StringBuilder();
   4:  
   5:     foreach (Item item in events)
   6:     {
   7:         stringBuilder.Append(@"<span style=""color: #FFFFFF;font-weight:bold;"">");
   8:         stringBuilder.AppendFormat(@"<a href=""{0}"" style=""color: #DBB94F;"">{1}</a><br/><br/>", item.Link, item.Title);
   9:         stringBuilder.AppendFormat(@"{0}<br/><br/>", item.Description);
  10:         stringBuilder.AppendFormat(@"<b>Distance: <span style=""color: #DBB94F;"">{0} miles</span></b><br/>", item.Distance.ToString("0.00"));
  11:         // stringBuilder.AppendFormat(@"<b>{0}</b><br/>", item.PublishDate);
  12:         // stringBuilder.AppendFormat(@"{0}<br/>", item.Latitude);
  13:         // stringBuilder.AppendFormat(@"{0}<br/>", item.Longitude);
  14:         stringBuilder.AppendFormat(@"<br/><br/>");
  15:         stringBuilder.Append(@"</span>");
  16:     }
  17:  
  18:     return stringBuilder.ToString();
  19: }

Possibilities:

Andrew recently added iCalendar file support to Community Megaphone. This would be a great feature to add to a Windows Mobile application, and it is totally doable. The HTML could be a little more fancy maybe even use a few 16x16 fonts for a little personality.

Download executable: communityMegaphoneReader.cab

Download Source Code: communityMegaphoneReader.zip

Feedback:

Want more? What else would you like to see? Time’s running out only one more day. Be sure to get your ideas in soon!


Sunday, June 29, 2008 11:31:00 PM (Eastern Standard Time, UTC-05:00)  #    Comments [0]  |  Trackback
Saturday, June 28, 2008

Only 2 Days Left…

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”.

 

image

CallBlock

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.

CallBlock Core Code

   1: const int KEYEVENTF_KEYDOWN = 0x0;
   2: const int KEYEVENTF_KEYUP = 0x2;
   3:  
   4: [DllImport("coredll.dll", EntryPoint = "keybd_event", SetLastError = true)]
   5: internal static extern void keybd_event(byte bVk, byte bScan, int dwFlags, int dwExtraInfo);
   6:  
   7: SystemState phoneIncomingCall = new SystemState(SystemProperty.PhoneIncomingCall);
   8: private void frmMain_Load(object sender, EventArgs e)
   9: {
  10:     phoneIncomingCall.Changed += new ChangeEventHandler(phoneIncomingCall_Changed);
  11: }
  12:  
  13: void phoneIncomingCall_Changed(object sender, ChangeEventArgs args)
  14: {
  15:     string phoneNumber = RemoveText(SystemState.PhoneIncomingCallerNumber);
  16:  
  17:     if(listBoxBlockedNumbers.Items.Contains(phoneNumber))
  18:     {
  19:         keybd_event(115, 0, KEYEVENTF_KEYDOWN, 0);
  20:         keybd_event(115, 0, KEYEVENTF_KEYUP, 0);
  21:     }
  22: }

 

Possibilities:

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.

Download executable: callBlock.cab

Download Source Code: callBlock.zip

Feedback:

Want more? What else would you like to see? Time’s running out on submitting ideas. Be sure to get yours in soon!


Saturday, June 28, 2008 4:07:00 PM (Eastern Standard Time, UTC-05:00)  #    Comments [2]  |  Trackback

So Page Brooks was talking with me earlier this week and he had a great idea for another Windows Mobile application. He wants an application that will repeat alerts for missed phones and text messages. I have to admit this is something I could use myself. So I figured I take a crack at it today, since it would make for a fun, simple, Friday app.

 

image

Repeatr

I decided to change up the naming format and play of the popular Web 2.0 naming conventions giving us the name: Repeatr. I have to admit, it is kind of catchy.

I searched for “Web 2.0 Logo Creator” and pretty much went with the first one I saw. This gave me a pretty slick logo in less than 5 minutes. I also decided to make the background a “tooltip” yellow, which I think looks really good.

Other than that everything is rather straight forward. We have checkboxes allowing the user to choose what events we will monitor. And we have a menu with a couple options, namely About and Exit. There is a “Clear Alerts” menu item, as well, that allows users to acknowledge they have responded to the alert(s).

The application allows user to select the number of minutes between alerts up to 60 minutes.

Of course we are using the State and Notification Broker to make all this happen. Using it means we hardly have to write any code ourselves!

State and Notification Broker setup code

   1: SystemState phoneMissedCalls = new SystemState(SystemProperty.PhoneMissedCalls);
   2: SystemState messagingSmsUnread = new SystemState(SystemProperty.MessagingSmsUnread);
   3: SystemState messagingTotalEmailUnread = new SystemState(SystemProperty.MessagingTotalEmailUnread);
   4: SystemState messagingVoiceMailTotalUnread = new SystemState(SystemProperty.MessagingVoiceMailTotalUnread);
   5:  
   6: private void frmMain_Load(object sender, EventArgs e)
   7: {
   8:     phoneMissedCalls.Changed += new ChangeEventHandler(phoneMissedCalls_Changed);
   9:     messagingSmsUnread.Changed += new ChangeEventHandler(messagingSmsUnread_Changed);
  10:     messagingTotalEmailUnread.Changed += new ChangeEventHandler(messagingTotalEmailUnread_Changed);
  11:     messagingVoiceMailTotalUnread.Changed += new ChangeEventHandler(messagingVoiceMailTotalUnread_Changed);
  12: }

 

The way we alert a user to having missed a monitored event is by playing a sounds which is easy to do.

   1: [DllImport("aygshell.dll")]
   2: static extern uint SndPlaySync(string pszSoundFile, uint dwFlags);
   3:  
   4: void PlaySound()
   5: {
   6:     string path;
   7:     path = Path.GetDirectoryName(Assembly.GetExecutingAssembly().GetName().CodeBase);
   8:  
   9:     SndPlaySync(Path.Combine(path, "alert.wma"), 0);
  10: }

Other than a little plumbing to make everything work together that is basically the entire app in a nutshell.

Possibilities:

This is a pretty spiffy application. But software can always be better. An option to allow the phone to vibrate would be great. Another option to allow the user to select the alert sound would be nice too.

Download executable: repeatr.cab

Download Source Code: repeatr.zip

Feedback:

Want more? What else would you like to see? Time’s running out on submitting ideas. Be sure to get yours in soon!


Saturday, June 28, 2008 2:30:00 AM (Eastern Standard Time, UTC-05:00)  #    Comments [0]  |  Trackback
Friday, June 27, 2008

4 Days left…

Today on twitter, Glen Gordon was telling me that Brendon Schwartz had an idea for today’s application:

glengordon @cjcraft here's an idea for a mobile app that @brendonschwartz will like - record $ spent during the day and where it was spent (with GPS) about 13 hours ago from Witty in reply to CJCraft

It’s a really good idea. Probably a better idea than we will be able to do it tonight, but we are all about taking the first small steps to accomplishing great things.

 

image

GeoCash

I love the name, it is a play on GeoCaching. Somehow it adds a lot of “buzz” to the application already.

The application is designed to be easy for the user to use and understand. The user only needs to enter the amount they spent along with a note, and then simply press log and it will be added to the GeoCash log.

We are using our own NumericTextBox to be sure the user doesn’t enter in any invalid amounts spent. We have another standard TextBox for the note input. Below this we have the log information. This is done using a WebBrowser control, and setting its DocumentText property.

The main reason to use the WebBrowser control is to be able to do a little better text formatting. This allowed us to easily markup our text in bold and color.

 

HTML formatted output:

   1: sb.AppendFormat(@"<b>Date:</b> {0}", DateTime.Now).Append("<br/>");
   2: sb.AppendFormat(@"<b>Amount:</b> <span style=""color:red"">{0:c}</span>", decimal.Parse(textBoxAmountSpent.Text)).Append("<br/>");
   3: sb.AppendFormat(@"<b>Note:</b> {0}", textBoxNote.Text).Append("<br/>");
   4: sb.AppendFormat(@"<b>Latitude:</b> {0}", position.Latitude).Append("<br/>");
   5: sb.AppendFormat(@"<b>Longitude:</b> {0}", position.Longitude).Append("<br/>");
   6: sb.Append("<br/>");
   7:  
   8: documentText += sb.ToString();
   9: webBrowser.DocumentText = documentText;

 

Possibilities:

I love this app. It has so many cool possibilities. You could easily save this information to a text file or sent it as an email. I think this is perfect data to do a mashup on for example create a heatmap etc for it so you can see the “dangerous” side of town you need to avoid taking your money into from now on. Open-mouthed

Download executable: geoCash.cab

Download Source Code: geoCash.zip

Feedback:

Want more? What else would you like to see? Time’s running out on submitting ideas. Be sure to get yours in soon!


Friday, June 27, 2008 1:59:00 AM (Eastern Standard Time, UTC-05:00)  #    Comments [1]  |  Trackback
Thursday, June 26, 2008

5 Days Left…

So when you are talking Windows Mobile Applications you are usually talking about a cell phone device. We have looked at text messages using SMS, but one thing we haven’t look at so far is programmatically making phone calls. Today we will take a look at creating our own phone dialer application. It’s easier than you think!

 

image

SmartDial

I think the UI is pretty nice, not the best, but good overall. It is bright and clean. I found a web site that allowed me to create buttons in a snap and used it for the numbers. At the top of the screen, I added a label to display the number to dial. The menu only has a few options: Dial, Menu, Clear, About, and Exit.

Since we only allow users to enter numbers using our custom buttons, we don’t have to worry about anyone entering invalid characters.

So how much code did we as Windows Mobile application developers have to write to actually dial a number? See for yourself.

   1: private void Dial()
   2: {
   3:     new Phone().Talk(labelPhoneNumber.Text);
   4: }

Possibilities:

I think this has the potential to be an absolutely great application. One thing I think would be cool is if the application supported skinning. In a way it does, since I decided to leave the image resources as external files to the executable. So a user could edit any of the files themselves. Another great enhancement would be to have mousedown images for each button to give a nice “animated” touch to the application. What about quick soft sounds for when each button is pressed?

Download executable: smartDial.cab

Download Source Code: smartDial.zip

Feedback:

Want more? What else would you like to see? Time’s running out on submitting ideas. Be sure to get yours in soon!


Wednesday, June 25, 2008 11:12:00 PM (Eastern Standard Time, UTC-05:00)  #    Comments [1]  |  Trackback
Tuesday, June 24, 2008

Today I am in Atlanta, GA with Brian Hitney and Glen Gordon. We are presenting Mobility Roadshow: Programming for Windows Mobile. We had a long drive last night, and will have another long drive back to Florence, SC tonight. So I choose not bite off anything too intense today.

Many people today carry mini-flashlights on the end of their key chain. Apparently there is a need for this type of device because many stores sell them near the cash registers in the checkout lines. I wonder why these mini-flashlights are so popular when almost everyone has a mobile phone today. Maybe it is because the phone’s back light is not bright enough.

Hmm, this got me thinking. Most Windows Mobile devices have large powerful screens, maybe there is a way we could reuse our device as both a mobile phone and a mini-flashlight.

image

imageMobile Flashlight

The UI is simple but the task is simple. I considered using a watermark image for the background or add a gradient to the background. With a goal of having as much of the screen as bright as possible I think the simple solid color background was the choice to make.

We only have a few menu options: Burn, Menu, Settings, About, and Exit. I decided to use the term “Burn” like you see on road sign saying “Motorcycles must burn lights”. We only have a few screens: Main, Settings, About. The settings screen you should see to the left, and the main screen should be to the right of this text.

On the about screen we let the user choose the color they would like the screen to “burn” at. By default we have chosen white to maximize brightness.

We used NumericUpDown controls to maximize usability, this allows user to choose the soft input panel or the control directly to set the color amounts.

Save Color Values

   1: int red = (int) numericUpDownRed.Value;
   2: int green = (int) numericUpDownGreen.Value;
   3: int blue = (int) numericUpDownBlue.Value;

 

Get Color Values

   1: numericUpDownRed.Value = (int) Global.Color.R;
   2: numericUpDownGreen.Value = (int) Global.Color.G;
   3: numericUpDownBlue.Value = (int) Global.Color.B;

Possibilities:

The biggest need this application has is a way for the user to save their color preference. Right now if the application is closed the color will go back to the default color of white. Another great feature would be to make the application to go full screen and hide both the title bar and the menu. One last addition would be code to maximize the screen brightness setting in Control Panel.

Download executable: mobileFlashlight.cab

Download Source Code: mobileFlashlight.zip

Feedback:

Want more? What else would you like to see? Time’s running out on submitting ideas. Be sure to get yours in soon!


Tuesday, June 24, 2008 2:46:00 PM (Eastern Standard Time, UTC-05:00)  #    Comments [0]  |  Trackback

Information is power. And with the .NET Compact Framework we can have all the information we want. Windows Mobile has many ways to get details about the device our application is running on. Hands down my favorite is the State and Notification Broker. In a word it ROCKS! You can use it to find out any number of things and you can use it to notify us when information we care about change state.

There are pieces of information that are so important in their own right, they could be used to create an application just to monitor and read that one detail. The first one that comes to mind is battery state.

image

MobileInfo

I thought of a few ways I could make this application flashy, but decided that might get in the way of the facts. Sometimes a simple notepad like application is the most beautiful application. Form and function were meant to be together, but sometimes forms steals the show, and function is what everyone came to see.

So instead we have a WebBrowser control with a simple text listing of the device’s most important details. I decided to use a WebBrowser control in case I ever did want to use more advanced text format.

We stick to our guns about keeping control simple and intuitive. We have a great menu with only a few options: Refresh, About, and Exit.

RefreshData Method

   1: private void RefreshData()
   2: {
   3:     StringBuilder sb = new StringBuilder();
   4:  
   5:     sb.Append("<b>Active Application:</b>").Append("<br/>");
   6:     sb.AppendFormat("'{0}'", SystemState.ActiveApplication).Append("<br/>").Append("<br/>").Append("<br/>");
   7:  
   8:     ...
   9: }

Possibilities:

You can never have too much of a good thing. We have twenty pieces of information here for users to enjoy. How about a hundred? Or how about a quick and easy search bar? And the UI needs to be simple but it could be better.

Download executable: mobileInfo.cab

Download Source Code: mobileInfo.zip

Feedback:

Want more? What else would you like to see? Time’s running out on submitting ideas. Be sure to get yours in soon!


Tuesday, June 24, 2008 2:11:00 AM (Eastern Standard Time, UTC-05:00)  #    Comments [0]  |  Trackback
Monday, June 23, 2008

I have put together a calendar of applications for the 30 Days of .NET [Windows Mobile Applications]. Here you can get a quick feel for all the applications we’ve created so far, and will write in the coming days.

30 Days of .NET Windows Mobile Applications

  image_thumb[37] image_thumb[38] image_thumb[39] image_thumb[40] image_thumb[41] image_thumb[42] image_thumb[43]
image[141] image[134] image[135] image[136] image[137] image[138] image[139] image[140]
image[150] image[142] image[143] image[144] image[145] image[146] image[147] image[149]
image[151] image[152] image[153] image[154] image[155] image[156] image[157] image[158]
image[166] image[159] image[160] image[161] image[162] image[163] image[164] image[165]
image[167] image[168] image[169]          

 

Day 1 Minutes to Midnight Countdown
   Countdown timer until midnight.
Day 2 Bluetooth Manager
   Utility to programmatically control Bluetooth status.
Day 3 GPS Compass
   GPS tools to read device’s heading from device GPS.
Day 4 Mileage Tracker
   Application that will track vehicles mileage statistics.
Day 5 Mobile Capture
   Screenshot utility that will programmatically take screenshots on device.
Day 6 Pocket PasswordGen
   Program generates secure random passwords.
Day 7 Mobile FX
   Fun application that allows user to play various “situation” sounds.
Day 8 Rotate Me
   Utility to programmatically control the device’s orientation.
Day 9

Mobile Tipper

   Allows users to calculate tips quickly and easily.
Day 10 What is My IP?
   Find out the IP addresses a device has in a snap.
Day 11 Mobile Signature
   Program that will capture signature from people in the field.
Day 12 Mobile Quiz
   Application that is designed to display created quizzes and polls to users.
Day 13 Pocket Death Calculator
   Fun program that will calculate how long until a user has left to live.
Day 14 Mobile SMS Contact
   Utility to allow sending of SMS text messages to groups.
Day 15 Mobile SMS Remote
   SMS framework and application for sending SMS commands to devices.
Day 16 SMS Logger
   Record and log all SMS text messages received by device.
Day 17 Lunch-O-Matic
  Take the chore out of deciding where to eat lunch today.
Day 18 Mobile Weather
   What will the weather be like today?
Day 19 Mobile Speedometer
   GPS utility that will obtain current speed from the device’s GPS.
Day 20 Mobile Altimeter
   GPS utility that will read the current altitude from GPS.
Day 21 Mobile Sketcher
   Simple but powerful drawing application for Windows Mobile.
Day 22 GPS Clock
  GPS application that can update the device’s time from GPS information.
Day 23 MobileInfo
  Program that will read and display device related information
Day 24 Mobile Flashlight
  In the dark? Mobile Flashlight is here to help.
Day 25

SmartDial

  Want to create your phone dialing interface? Start with SmartDial.
Day 26 GeoCash
  This application will log and track where you spend all your money.
Day 27 Repeatr
   Miss a phone call, text message, or email. This application will remind you.
Day 28 CallBlocker
   Tired of that annoying automated marketing call? Let CallBlocker block it.
Day 29 Community Megaphone Reader
   Wondering where the closest developer event is to you? CMR can tell you.
Day 30 Trippr
   Let Tripper find geotagged photos from your location on Flickr.

Monday, June 23, 2008 12:25:00 AM (Eastern Standard Time, UTC-05:00)  #    Comments [0]  |  Trackback
Sunday, June 22, 2008

Yeah, we have made it through week three of my 30 Days of .NET challenge. So far, we have 22 applications for 22 days. Thanks for your support!

If you missed the week one recap here it is: 30 Days of .NET [Windows Mobile Applications] - Week One.

If you missed the week two recap here it is: 30 Days of .NET [Windows Mobile Applications] - Week Two.

What’s your favorite?

image image image image
Mobile SMS Remote SMS Logger Lunch-O-Matic Mobile Weather

We get around, don’t we? SMS, RSS, GPS, Camera API, and more!

image image image image
Mobile Speedometer Mobile Altimeter Mobile Sketcher What will be next?

Feedback:

Got an idea? Got some feedback? Share it? Thanks!


Sunday, June 22, 2008 6:31:00 PM (Eastern Standard Time, UTC-05:00)  #    Comments [1]  |  Trackback

I couldn’t resist creating another GPS related mobile application. One of the neat pieces of data you get from your GPS device is time. This is great. It is like having one of the clocks that can update itself over the air by reading data transmitted from various atomic clocks throughout the world. Many phones today have the ability to update their time by connecting to the OEM’s time servers, but not all. And there are still lots of Windows Mobile classic devices in the world that do not have cellular capabilities.

Vista has the ability to update its time by using a feature called Internet Time. Basically Vista connects to time.windows.com and reads a Network Time Protocol server.

 

image

GPS Clock

Our user interface is simple and direct. We are using a nice graphic to adds some visual zing to the application. At the top of the screen we show the user their current device time and their current GPS time.

This allows the user to tell at a glance if they need to update their device’s time using the Update menu option.

On the menu we have added some simple settings features: GPS Start, GPS Stop, About, and Exit.

This is one of those Web 2.0 ideas where an application does one thing but does it very well. Sometimes these are the best apps. In this case, our application provides a bride for GPS time data to become device time data.

Somtimes that’s all it takes to make a user happy.

UpdateData Method:

   1: void UpdateData(object sender, System.EventArgs args)
   2: {
   3:     if (gps.Opened)
   4:     {
   5:         if (position != null)
   6:         {
   7:             if (position.TimeValid)
   8:             {
   9:                 gpsTime = position.Time;
  10:  
  11:                 labelCurrentGpsDate.Text = gpsTime.ToLongDateString();
  12:                 labelCurrentGpsTime.Text = gpsTime.ToLongTimeString();
  13:             }
  14:         }
  15:     }
  16: }

 

UpdateTime Method:

   1: private struct SYSTEMTIME
   2: {
   3:     public short Year;
   4:     public short Month;
   5:     public short DayOfWeek;
   6:     public short Day;
   7:     public short Hour;
   8:     public short Minute;
   9:     public short Second;
  10:     public short Milliseconds;
  11: }
  12:  
  13: [DllImport("coredll.dll")]
  14: private static extern bool SetSystemTime(ref SYSTEMTIME time);
  15:  
  16: private void UpdateTime()
  17: {
  18:     DateTime idag = gpsTime.ToUniversalTime();
  19:  
  20:     SYSTEMTIME s = new SYSTEMTIME();
  21:     s.Year = (short) idag.Year;
  22:     s.Month = (short) idag.Month;
  23:     s.DayOfWeek = (short) idag.DayOfWeek;
  24:     s.Day = (short) idag.Day;
  25:     s.Hour = (short) idag.Hour;
  26:     s.Minute = (short) idag.Minute;
  27:     s.Second = (short) idag.Second;
  28:     s.Milliseconds = (short) idag.Millisecond;
  29:  
  30:     SetSystemTime(ref s);
  31: }

Possibilities:

How about changing the color of the date and time if they are more than five minutes off? Simple feature to add but really helps the user. And that’s what matters.

Download executable: gpsClock.cab

Download Source Code: gpsClock.zip

Feedback:

Want more? What else would you like to see? Time’s running out on submitting ideas. Be sure to get yours in soon!


Sunday, June 22, 2008 6:16:00 PM (Eastern Standard Time, UTC-05:00)  #    Comments [0]  |  Trackback

The main goal of 30 Days of .NET was to create a series of applications, any of which, a reader could take and use as a springboard to creating their first application. Well that, and to have some fun along the way and get more people excited about mobile development. A secondary goal of mine has been to show off various capabilities of mobile devices like GPS, Bluetooth, and multimedia features. One feature we haven’t covered so far is using a built-in camera.

Today we will mark that item off our list…

image

Mobile Sketcher

The goal is to create a basic drawing application, but add a mobile twist to it. On the menu, I have added a menu item for selecting a picture using the select picture dialog. The nice thing about the select picture dialog is it allows you to use your camera to take a picture and then select it as your picture.

In a way this application is a lot like the mobile signature capture application we did a while back, but there are some important differences: picture selection support, camera support, save file dialog support, and more. The business case for this application is something like the following: an insurance agent arrives on the scene of an automotive accident, she takes a picture using Mobile Sketcher and then adds notes and sketches to the picture for claims processing.

So users can select a picture from their device or take a picture and use it for their background. And then they can draw and edit the picture using Mobile Sketcher. At the bottom of the screen we allow user to select different colors for the pen’s ink: red, orange, yellow, green, blue, brown, white, and black. Well okay, white is really a light gray since white on white is hard to see.

SelectPicture Method:

   1: private void SelectPicture()
   2: {
   3:     SelectPictureDialog selectPictureDialog = new SelectPictureDialog();
   4:     DialogResult dialogResult = selectPictureDialog.ShowDialog();
   5:  
   6:     if (dialogResult != DialogResult.OK)
   7:         return;
   8:  
   9:     pictureBox.Image = new Bitmap(selectPictureDialog.FileName);
  10: }

Possibilities:

There is lots of room for improvement with this application. Just think of all the features most drawing programs have and there’s your list for improvements.

Download executable: mobileSketcher.cab

Download Source Code: mobileSketcher.zip

Feedback:

Want more? What else would you like to see? The managed API for using a Window Mobile camera is a great feature that is very powerful and very easy. Use it in your next mobile application or your first.


Sunday, June 22, 2008 1:17:00 AM (Eastern Standard Time, UTC-05:00)  #    Comments [0]  |  Trackback

Theme design by Jelle Druyts

Pick a theme: