Tuesday, May 03, 2011

Shapes4Kids - Helping kids learn various shapes

Alphabets4Kids was not our first app. There was another app we developed (Shapes4Kids), but failed the certification. We had sound added in that app, for each shape. My 7 year old daughter, Parvathy, helped us in recording the sounds. We have promised her a Happy Meal from McDonalds!:)

Our app failed the certification for two reasons:

1. Our app would stop any existing background audio.

2. We did not have any control over our on media, for example the volume.


While I started working on developing a Settings page, Rajeev Venkitaraman had completed the Alphabets app. So we got that app uploaded, without any audio. It passed the certification.

We have completed the work on the Shapes app and have submitted the same.

Here's how we solved the two issues.

1. Controlling the background audio.
There is no inherent methods in Silverlight to check whether a background audio is being played. So, we take help from XNA framework. For that we need to refer the following assembly:

Microsoft.Xna.Framework

The following property would help us identify whether a background audio is being played:

Media.MediaPlayer.GameHasControl

If it returns false, then it means the background music is being played. Do not forget to call FrameworkDispatcher.Update() before accessing the Xna property.

2.Controlling our own audio
We created a separate Settings page for controlling our audio. The IsolatedStorage ApplicationSettings came very handy in this case. We created a separate AppSettings class and accessed this as a resource in both the MainPage.xaml (in which we rendered the Shapes) and Settings xaml page.



The testing is in progress.
(Cross fingers!) :)

UPDATE
The Shapes4Kids app has passed the certification and is available for download.

No comments:

Post a Comment

Cookies, anyone?

  Our application started having integration issues early March this year. Did I say that was intermittent? To add to our confusion, we coul...