Capability, that is, capability. Windows Phone 7 has a much stricter security mechanism than the previous Windows Mobile platform. In many casesProgramTo do anything, you must declare it in advance to let the user know. This is capability.
Create a Silverlight for Windows Phone application project. A wmappmanifest. xml file is displayed under the properties directory of the project. It defines some configuration information about the program. Here, you will find a section similar:
The capability of the program is stated here. The content stated here is displayed in the marketplace when the user installs the program (the marketplace in Zune on the PC side and the marketplace on the WP7 mobile phone ). For example, we can see the "The Harvest" information of the Game On WP7 from the marketplace in Zune:
The information in the lower-right corner shows that the program needs to access the network, sensor, media library, and Xbox Live services. If you feel that a function may be potentially dangerous to you, you can refuse to install the software. For example, if you find a "Calculator" software that declares that you want to read your device or your personal identification information, this is obviously against common sense and you can refuse to install it. If the program does not identify a function,CodeIs it true? It is very simple. It will throw an "unauthorizedaccessexception" exception to protect users' rights and interests. Therefore, do not forget to remove the features you do not need to access in your program from the section in the wmappmanifest. xml file. The following capability can be declared in the program: