My first three Windows Phone apps

Posted on January 19, 2012

3


Before anything else, I would like to clarify that the only programming experience that I had was when I was still part of the UP Diliman Programming Team which competes in the ACM ICPC.  I only know C, and a little bit of Assembly.  My first experience with .NET was when I learned how to use Expression Blend, and I have to admit, those WPF apps that I created are very, very basic.  I am glad that I had the opportunity to learn how to develop apps for Windows Phone, which uses Silverlight and XNA.  Today, I am going to share the first three apps I developed for Windows Phone, the challenges I encountered, and lessons that I learned throughout the process.

PassGenPassGen

This application generates passwords in three formats: PIN (numbers), Alphanumeric (letters and numbers), and Strong (letters, numbers, and symbols). Password length can vary from 4 to 16 using the slider.

Challenges and lessons learned:

  • Sliders.  I tried to set in XAML the Minimum and Maximum properties to no avail.  What I did instead was to use a math formula to scale the minimum and maximum values for the slider.  Also, instead of using the Round method, I used Floor so that the bar will not be set to the maximum value if the slider is not set to the rightmost.
  • Application Name.  I tried to remove the title when the app is pinned to Start because it would look redundant if my logo already says the title.  I did this by leaving the Title from the WMAppManifest.xml but unfortunately, you can not leave the field blank.

PassGen screenshot

Considerations for the next version:

  • Storage.  It would have been nice if there is a Password Storage feature.  However, I haven’t really grasped the concept of Isolated Storage.  I know it is easy but I lack experience in Object Oriented Programming that is why I don’t know how to do Isolated Storage.

Storm Tracer

Storm Tracer

This application gets the latest satellite feed from PAGASA. It also gets tweets from PAGASA’s official Twitter account, @dost_pagasa as well as MMDA (@mmda), Philippine Red Cross (@philredcross), and DepEd (@deped_ph).

A list of emergency numbers is also included. These numbers can be called or sent a message by clicking on the corresponding icons.

Challenges and lessons learned:

  • Logo.  One of the Application Submission Requirements is that you can not use a transparent logo.  I think the reason is that it allows the users to distinguish which apps are preinstalled (background is same as phone accent color) and which came from the marketplace.
  • Theme.  When using icons, make sure that they are still visible when the user switches from dark to light background and vice versa.
  • .gif.  PAGASA’s Twitter account uses .gif for its profile image.  Unfortunately, Silverlight does not have native support for .gif.  Instead of using a converter, I used a stored image on the phone.  I had to hard code it instead and it was not an easy task.
  • Network Connection.  The emulator always acts as if it has Internet Connection.  That is why the GetIsNetworkAvailable method always returns true.  Unfortunately, you have to use an actual Windows Phone to simulate how your app will work if it does not have an Internet connection.Storm Tracer screenshot

Considerations for the next version:

  • Webservice.  I only considered the tweets feature because there are no RSS feeds available from PAGASA’s website.  It would have been nice if Storm Tracer can provide the weather forecast for the day as well as storm signals.
  • Storage.  Again, Isolated Storage.  It would be better if I can store the satellite image as well as tweets so that it will be displayed when there is no Internet connection to update both.

Petals Around the Rose

Petals Around the Rose 

Petals Around the Rose (PAtR) is a lateral thinking game played with five dice. There are three rules:

1. The name of the game is “Petals Around the Rose”, and the name of the game is the key to the game.

2. The answer is always zero or an even number.

3. Anyone who knows the game may give the answer to any roll, but they must not disclose the reasoning.

Challenges and lessons learned:

  • Long app names.  The name of the game is Petals Around the Rose.  Yet I can’t use the whole name because when you pin the app to Start, the title will not fit in the tile.  I think this is the reason why the Windows Phone version of Plants vs Zombies is called PvZ.
  • Keyboard.  The game requires the user to input an answer, and if I use a textbox, the software input panel (SIP) will pop up.  Aside from worrying for exceptions, the elements move up to make space for the SIP.  To address this, I used TextBlock as well as Buttons instead, both of which are fixed in position.
  • Markets.  Apparently, there are game certification requirements for Brazil and South Korea, as well new markets China, Indonesia, and Malaysia.  Instead of meeting these certification requirements, I chose not to publish my game to these markets instead.Petals Around the Rose screenshot

Considerations for the next version:

  • UI.  Most games look better in XNA than in Silverlight.  I do not know how to program in XNA, and I think this game is simple enough that I should just stick to Silverlight.  I can polish this more by adding animations, improving the design of the buttons, putting a combo indicator, and customizing the dice appearance depending on the theme.

So there you have it, my first three Windows Phone apps.  I only started to develop apps last October 2011, and I enjoyed the experience.

Want to learn how to develop Windows Phone apps?  Stay tuned as Microsoft Philippines Academic Team is cooking something up for students.  Add them in Facebook so you will be the first to hear about this event.

Advertisements
Posted in: Windows Phone