【翻译】(68)uses-permission元素

【翻译】(68)uses-permission元素

 

see

http://developer.android.com/guide/topics/manifest/uses-permission-element.html

 

原文见

http://developer.android.com/guide/topics/manifest/uses-permission-element.html

 

-------------------------------

 

<uses-permission>

 

uses-permission元素

 

-------------------------------

 

<uses-permission> and filtering on Android Market.

 

<uses-permission>和Android市场上的过滤。

 

In some cases, the permissions that you request through <uses-permission> can affect how your application is filtered by Android Market.

 

在一些情况下,你通过<uses-permission>请求的权限可以影响你的应用程序如何被Android市场过滤。

 

If you request a hardware-related permission — CAMERA, for example — Android Market assumes that your application requires the underlying hardware feature and filters the application from devices that do not offer it.

 

如果你请求一个硬件相关权限——例如,CAMERA——那么Android市场假设你的应用程序请求底层硬件特性并且从不提供它的设备中过滤掉该应用程序。

 

To control filtering, always explicitly declare hardware features in <uses-feature> elements, rather than relying on Android Market to "discover" the requirements in <uses-permission> elements. Then, if you want to disable filtering for a particular feature, you can add a android:required="false" attribute to the <uses-feature> declaration.

 

为了控制过滤,总是显式地在<uses-feature>元素中声明硬件特性,而非依赖Android市场在<uses-permission>元素中“发现”那些要求。然后,如果你希望屏蔽对一个特定特性的过滤,你可以添加android:required="false"属性到<uses-feature>声明。

 

-------------------------------

 

For a list of permissions that imply hardware features, see the documentation for the <uses-feature> element.

 

想获得一个暗示硬件特性的权限列表,参见<uses-feature>元素的文档。

 

-------------------------------

 

-------------------------------

 

* syntax:

 

* 语法:

 

-------------------------------

 

<uses-permission android:name="string" />

 

-------------------------------

 

* contained in:

 

* 被包含在:

 

<manifest>

 

* description:

 

* 描述:

 

Requests a permission that the application must be granted in order for it to operate correctly. Permissions are granted by the user when the application is installed, not while it's running.

 

请求一个应用程序必须被授权的权限,以便让它正确地操作。权限在应用程序被安装时被用户授权,而非在它正在运行的时候。

 

For more information on permissions, see the Permissions section in the introduction and the separate Security and Permissions document. A list of permissions defined by the base platform can be found at android.Manifest.permission.

 

想获得关于权限的更多信息,参见介绍中的权限章节以及单独的安全和权限文档。一个被基础平台定义的权限列表可以在android.Manifest.permission中找到。

 

* attributes:

 

* 属性:

 

* android:name

 

The name of the permission. It can be a permission defined by the application with the <permission> element, a permission defined by another application, or one of the standard system permissions, such as "android.permission.CAMERA" or "android.permission.READ_CONTACTS". As these examples show, a permission name typically includes the package name as a prefix.

 

权限的名称。它可以是一个由该应用程序用<permission>元素定义的权限,或者是被另一个应用程序定义的权限,或者是标准系统权限之一,诸如"android.permission.CAMERA"或"android.permission.READ_CONTACTS"。正如这些示例所示,一个权限名称典型地包含包名作为前缀。

 

* introduced in:

 

* 引入:

 

API Level 1

API级别1

* see also:

 

* 另见:

 

* <permission>

* <uses-feature>

 

Except as noted, this content is licensed under Apache 2.0. For details and restrictions, see the Content License.

 

除特别说明外,本文在Apache 2.0下许可。细节和限制请参考内容许可证。

 

Android 4.0 r1 - 14 Feb 2012 21:12

 

-------------------------------

 

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

 

(此页部分内容基于Android开源项目,以及使用根据创作公共2.5来源许可证描述的条款进行修改)

 

(本人翻译质量欠佳,请以官方最新内容为准,或者参考其它翻译版本:

* ソフトウェア技術ドキュメントを勝手に翻訳

http://www.techdoctranslator.com/android

* Ley's Blog

http://leybreeze.com/blog/

* 农民伯伯

http://www.cnblogs.com/over140/

* Android中文翻译组

http://androidbox.sinaapp.com/


你可能感兴趣的:(Permission)