DZone
Mobile Zone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
  • Refcardz
  • Trend Reports
  • Webinars
  • Zones
  • |
    • Agile
    • AI
    • Big Data
    • Cloud
    • Database
    • DevOps
    • Integration
    • IoT
    • Java
    • Microservices
    • Open Source
    • Performance
    • Security
    • Web Dev
DZone > Mobile Zone > Detecting Kid’s Corner in Windows Phone 8

Detecting Kid’s Corner in Windows Phone 8

Adam Benoit user avatar by
Adam Benoit
·
Dec. 17, 12 · Mobile Zone · Interview
Like (0)
Save
Tweet
3.73K Views

Join the DZone community and get the full member experience.

Join For Free

The other day I had an idea. My daughter loves kittens. And really, what kid doesn’t? I realized that if I created an app that only showed picture of kittens, she would be distracted when necessary.

The problem is I have created a monster! Once I hand over my phone, she doesn’t want to give it up. Turns out, this was a really great app idea. Once I added some live tiles with a secondary tile, I was set to release.

During my testing, I encountered a problem when using my app in the Windows Phone 8 emulator. Turns out, secondary tiles can not pinned to the Kid’s Corner interface. Trying to pin it caused a message bot to appear that said “When you’re in Kid’s corner, you can’t change what’s pinned to start.”. This would be a bad thing for a child to encounter when using my app.

After looking through the documentation, I could not find any answers myself so I posed the question on Stack Overflow and Twitter looking for answers. After a few hours, I was given the answer I was hoping for by Matthijs Hoekstra, a Developer Evangelist at Microsoft Netherlands.

His answer is as simple as it useful:

In the Windows.Phone.ApplicationModel Namespace, there is a class called ApplicationProfile that contains a static property called “Modes”. Querying this property will return one of the 2 following a ApplicationProfileModes enum objects:

  1. Default
    1. The App is running in the normal area of the phone
  2. Alternate
    1. The App is running in Kid’s Corner

So back to my Kittens For Kids app. I could easily have hidden the secondary tile menu item from view when running in Kid’s Corner but decided that hiding the menu entirely would be a better option so I used the following code:

if (ApplicationProfile.Modes == ApplicationProfileModes.Default)
{
    CreateApplicationBar();
}

Now the menu only appears to the parent and not the kid. I see this opening up the possibility for writing apps that contain settings and options that the parent can set, that the kid cannot change.

Because of this newly found ability, I foresee me writing apps that cater specifically to kids in the kids zone. In my opinion, this looks to be a huge untapped market for apps made specifically for kids in the Kid’s Corner.

Windows Phone app

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • Practice on Pushing Messages to Devices of Different Manufacturers
  • Applying Domain-Driven Design Principles to Microservice Architectures
  • No Code Expectations vs Reality
  • Data Statistics and Analysis With Java and Python

Comments

Mobile Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • MVB Program
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends:

DZone.com is powered by 

AnswerHub logo