需要了解在Android使用特征? [英] Need to know about uses-feature in android?

查看:147
本文介绍了需要了解在Android使用特征?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用特征的在下列方式使用:

'uses-feature' is used in following way:

  <uses-feature
  android:name="string"
  android:required=["true" | "false"]
  android:glEsVersion="integer" />

什么是使用的Andr​​oid版本:需要'的'机器人:glEsVersion

推荐答案

要求是用来表明该应用程序使用该功能的应用是必不可少的;没有该功能的应用程序将是无用的或者是行不通的。如果应用程序使用全球定位系统,例如,作为一个的不错的到了的功能,但它不是绝对必要,你可以设置要求。通过这种方式,与设备的用户不具有与GPS设备仍然可以播放下载的应用程序商店,他们,否则不能。

required is used to show that the feature the app uses is essential to the application; without that feature the app would be useless or wouldn't work. If your app uses gps, for example, as a nice-to-have feature but it isn't absolutely necessary, you could set required to false. This way, users with devices that don't have devices with gps can still download your app from the Play Store—which they otherwise couldn't.

glEsVersion 是必要的只有功能需要的OpenGL ES。在这种情况下,您可能希望至少指定一个版本在上下文中使用。

glEsVersion is necessary only if the feature requires OpenGL ES. In that case you might want to specify at least one version to be used in the context.

或以开发者指南状态:

要求元素提供了必需的属性,让您指定应用程序是否需要和不申报的功能不能发挥作用,还是prefers有功能,但没有它可以发挥作用。的 Android开发准则

required The element offers a required attribute that lets you specify whether your application requires and cannot function without the declared feature, or whether it prefers to have the feature but can function without it. (Android Dev Guidelines)

glEsVersion 对于某些功能,有可能存在一个特定的属性,它允许你定义一个版本的功能,如版本的Open GL的使用(声明的glEsVersion)。 [...]一个应用程序应该最多只有一个机器人注明:在其清单glEsVersion属性。如果指定了多个,在android:glEsVersion用最大的数值是用来和任何其他值都被忽略。如果应用程序没有指定一个机器人:glEsVersion属性,则假定应用程序只需要的OpenGL ES 1.0,这是所有Android设备的支持。的 Android开发准则

glEsVersion For some features, there may exist a specific attribute that allows you to define a version of the feature, such as the version of Open GL used (declared with glEsVersion). […] An application should specify at most one android:glEsVersion attribute in its manifest. If it specifies more than one, the android:glEsVersion with the numerically highest value is used and any other values are ignored. If an application does not specify an android:glEsVersion attribute, then it is assumed that the application requires only OpenGL ES 1.0, which is supported by all Android-powered devices. (Android Dev Guidelines)

您可以阅读更多关于&LT;使用特征&GT; 中的 Android开发者准则

You can read more about <uses-feature> in the Android Developer Guidelines

这篇关于需要了解在Android使用特征?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆