WP7 Capabilities

I’ve seen some posts around on the interwebs regarding problems with networking code in XNA apps for WP7 and one of the reasons for this might be missing capability definition in WMAppManifest.xml.

When you create a new Silverlight for Windows Phone 7  or Windows Phone Game project, these capabilities are set up for you (as long as you’re using the latest SDK refresh, at least).
Otherwise you’ll need to add a <Capabilities/> section in WMAppManifest.xml. This section defines what your application is capable of – so if you haven’t specified ID_CAP_NETWORKING, your application won’t be allowed to connect to the network.

The default capabilities are:

  • ID_CAP_NETWORKING
  • ID_CAP_LOCATION
  • ID_CAP_SENSORS
  • ID_CAP_MICROPHONE
  • ID_CAP_MEDIALIB
  • ID_CAP_GAMERSERVICES
  • ID_CAP_PHONEDIALER
  • ID_CAP_PUSH_NOTIFICATION
  • ID_CAP_WEBBROWSERCOMPONENT

A sample of this might look like so:

<Capabilities>
    <Capability Name=”ID_CAP_NETWORKING”/>
</Capabilities>

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: