How to detect that your app is running in Kid’s Corner

In Windows Phone 8, Microsoft introduced the Kid’s Corner feature that lets parents configure a separate Start screen for their children and populate it with only the apps, games, and content that they feel is appropriate. Because some features of the phone are disabled in Kid’s Corner, or because some actions might not make sense for a child to perform, apps are able to detect they are running in a Kid’s Corner session and adjust their behaviour appropriately.

For example, imagine your application allows users to upload photos or location data or other information to a website, or otherwise enables sharing of information with other users. Before enabling those features, you should check whether the application is running in Kid’s Corner or not:

  • If you are not running in Kid’s Corner, show the normal UX
  • If you are running in Kid’s Corner and the parent has chosen to permit the activity (see below), show the normal UX
  • If you are running in Kid’s Corner and the parent has not chosen to permit the activity, disable the feature and consider some UI such as “Please ask your parents to enable photo sharing in ‘Settings’”

You also need to build a ‘Settings’ page (that only shows up when not running in Kid’s Corner) and here parents can set their preferences to allow (or disallow) sharing of photos or other information by their children. Since the application shares the same Isolated Storage when running in Kid’s Corner, once the parent has set their preference it can be easily retrieved when the child runs the app.

So how does your app detect that it is running in Kid’s Corner? Enter the ApplicationProfile class, and its single static Modes property. If the current mode is Alternate, that means your app is running in Kid’s Corner and you should disable any UX that would lead to a dead end (such as in-app purchases) or any other content or experiences that parents may want to control in Kid’s Corner. It’s also a good idea to disable ads when an app is running in Kid’s Corner (or change the type of ads you’re requesting), because if the child clicks on an ad it may take them to the browser experience, which is not fully regulated by Kid’s Corner.

One might ask why the API has such a non-intuitive name – why not call it IsKidsCornerMode or something similar – and the answer is that we try our best to avoid using brand terms in our APIs since those are subject to change over time. In particular, the name of this feature changed during Windows Phone 8 development, and so even if we had chosen the “friendly name” it would have been wrong (and look rather silly) by the time we shipped.

There have been cases in the past where we did put a brand term in our API, and it ended up causing problems: case in point, the map-related tasks. In a previous release, we added the BingMapsTask and BingMapsDirectionsTask classes so apps could display maps and directions using our built-in mapping experience. In Windows Phone 8, our map service is now provided by Nokia Maps, so we added the new un-branded MapsTask and MapsDirectionsTask classes which do exactly the same thing as the old ones (and of course we keep the previous class around for the purposes of backwards compatibility).