How to detect if an app is running in Kid’s Corner
This article explains how to programmatically detect whether an application is running in Kids mode on Windows Phone 8.
Windows Phone 8 introduces Kid's Corner, a device mode where children can only access games, apps, videos and music that the owner approves - without risk to other important content like the address book.
Apps can make themselves more "Kid's Corner Friendly" by configuring available content, features and functionality when running in this mode. For example, this could include changing graphics, hiding menu options for in-app purchase and selecting appropriate advertisements.
This article shows how you can detect that the app is running in Alternate mode (Kids Corner).
This property returns an enum ApplicationProfileModes value. This enum has two members :
- Default : application is running normally.
- Alternate : application is running in Kid’s Corner mode.
To test the running mode, you can use this simple function :
using Windows.Phone.ApplicationModel; //required namespace
return ApplicationProfile.Modes == ApplicationProfileModes.Alternate;
A code example/test code can be downloaded from here: Media:TestKidsCorner.zip
The example app simply uses the previous function to display the text “Run in Normal mode” or “Run in kid's corner mode”.
- How to detect that your app is running in Kid’s Corner (Windows Phone Developer Blog)
- Windows.Phone.ApplicationModel.ApplicationProfile (Dev Center)
- enum ApplicationProfileModes (Dev Center)