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 14:46:00 (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 02:11:00 (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 00:25:00 (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 18:31:00 (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!