Non-Store Windows Phone Apps: Integrate With the Settings Hub

Let’s say you are developing an application that needs to integrate in the Settings Hub. For most applications, this is not at all necessary – if you are not altering the behavior of the device (e.g. through global settings that go beyond the application), you do not need to do this. However, for experimentation purposes, it is, in fact, possible to integrate your app in there.

NOTE: I’ve already talked about this in my StackOverflow answer, but putting together this blog post for documentation purposes.

First step, create a new Windows Phone application. There is no difference in the type of the application that you are creating, but since this is a simple demo, I am going to go ahead and create a blank app:

image

Without making any changes to the app, run it on a device or the emulator. Notice that by default, the application is listed along with all other applications, so nothing out of the ordinary at this point.

wp_ss_20140316_0002

If you are already working with Windows Phone, you should know that the application placement in terms of launch location is determined in the application manifest file (WMAppManifest.xml). By default, and if you are using the latest Visual Studio + Windows Phone SDK couple, you will get the ‘visual designer’ for the manifest.

image

Not exactly what’s needed for the purpose of this post, because we don’t have a way to modify the target launch ‘hub’. Instead, right-click on the manifest file in Solution Explorer and select View Code:

image

What I need here is a HubType attribute, that is not listed by default:

image

So just adding it in there, with the target value of 268435456 will do the trick. However, be aware that since you already deployed the application as a ‘normal app’ (belonging to the standard launch hub), you need to make sure that you uninstall the app first, and then re-deploy it, for it to appear in the Settings hub. Notice the change:

wp_ss_20140316_0003

There is no simple way to uninstall the app from the Settings Hub, however, because there is no ‘tap-and-hold’ way to pick the ‘Uninstall’ option. The way to do it would be to re-deploy another app, with the same ProductID (from WMAppManifest.xml). Even if you use the same application with HubType removed, you will need to create a different one to replace it.

2 Comments

  1. Pingback: Non-Store Windows Phone Apps: Integrate With the Settings Hub

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>