Android开发-API指南-<supports-gl-texture>
<supports-gl-texture>
英文原文:http://developer.android.com/guide/topics/manifest/supports-gl-texture-element.html
采集(更新)日期:2014-7-3
搬迁自原博客:http://blog.sina.com.cn/s/blog_48d491300100zmvg.html

Google Play 过滤机制
Google Play 根据应用程序支持的纹理压缩格式来对其进行过滤,以确保该应用程序只能在能够正确处理其纹理的设备上安装。
通过纹理压缩过滤机制,可以根据 GPU 平台来指定目标设备的类型。
关于 Google Play 如何利用
<supports-gl-texture>
元素作为过滤条件的详情,请参阅下文 Google Play 和纹理压缩过滤机制。
- 语法:
-
- <supports-gl-texture
- android:name="string" />
- <supports-gl-texture
- 包含于:
<manifest>
- 说明:
- 声明本应用程序支持的一种 GL 纹理压缩格式。
所谓应用程序“支持”的 GL 纹理压缩格式,是指该应用程序安装到某设备之后就能够提供以这种格式压缩的纹理数据。 应用程序可以由
.apk
文件提供本地的压缩数据,也可以在运行时从服务器下载数据。每个
<supports-gl-texture>
元素只能声明一种所支持的纹理压缩格式, 这通过android:name
属性值进行指定。 如果应用程序支持多种纹理压缩格式,可以声明多个<supports-gl-texture>
元素。例如:- <supports-gl-texture android:name="GL_OES_compressed_ETC1_RGB8_texture" />
- <supports-gl-texture android:name="GL_OES_compressed_paletted_texture" />
<supports-gl-texture>
元素的声明仅仅是一种声明而已, 这意味着 Android 系统本身在安装程序时不会检查这些元素来确保设备是否符合要求。 不过某些其他的服务(比如 Google Play )或应用程序可以在处理本程序或与本程序交互时检查<supports-gl-texture>
声明。 因此,对本程序能够支持的所有纹理压缩格式(列表见下文)进行声明是十分重要的。通常,应用程序和设备通过一组公认的字符串(如下所列)来声明所支持的 GL 纹理压缩格式。 根据需要,这种格式字符串可能会不断地增加。 因为是采用字符串的形式,应用程序也可以根据需要自由声明其它格式。
请确保应用程序是用 r3 以上版本的 SDK 工具进行编译的,基于
<supports-gl-texture>
元素的过滤机制适用于所有 API 级别 的版本。 - <supports-gl-texture android:name="GL_OES_compressed_ETC1_RGB8_texture" />
- 属性:
-
android:name
- 用描述符定义一个应用程序支持的 GL 纹理压缩格式。 常见的描述符列表如下:
纹理压缩格式描述符 说明 GL_OES_compressed_ETC1_RGB8_texture
Ericsson 纹理压缩。在 OpenGL ES 2.0 中定义,适用于所有支持 OpenGL ES 2.0 的 Android 平台设备。 GL_OES_compressed_paletted_texture
通用的带调色板的纹理压缩。 GL_AMD_compressed_3DC_texture
ATI 3Dc 纹理压缩。 GL_AMD_compressed_ATC_texture
ATI 纹理压缩。适用于运行 Adreno GPU 的设备,包括 HTC Nexus One、Droid Incredible、EVO 等等。 为了保证最大的兼容性,设备还可以用 GL_ATI_texture_compression_atitc
描述符来声明<supports-gl-texture>
元素。GL_EXT_texture_compression_latc
Luminance alpha 纹理压缩。 GL_EXT_texture_compression_dxt1
S3 DXT1 纹理压缩。适用于 Nvidia Tegra2 平台的设备,包括 Motorala Xoom、Motorola Atrix、Droid Bionic 等等。 GL_EXT_texture_compression_s3tc
S3 纹理压缩,但不支持 DXT 变体。 适用于 Nvidia Tegra2 平台的设备,包括Motorala Xoom、Motorola Atrix、Droid Bionic 等等。 如果应用程序需要 DXT 变体,请换用上一条描述符进行声明。 GL_IMG_texture_compression_pvrtc
PowerVR 纹理压缩。 适用于带有 PowerVR SGX530/540 GPU 的设备,比如 Motorola DROID 系列;Samsung Galaxy S、Nexus S 和 Galaxy Tab 等等。
- API Level
- 参阅:
introduced in:
-->
Google Play 和 纹理压缩过滤机制
Google Play 会对用户所能看见的应用程序进行过滤,这样用户只能看见并下载那些与自己设备兼容的应用程序。 其中一种方式是根据纹理压缩能力进行过滤,以便根据 GPU 的处理能力来控制应用程序对设备的适用范围。
为了确定应用程序的纹理压缩方式是否与给定的用户设备相兼容,Google Play 将对比以下两项内容:
- 应用程序支持的纹理压缩格式 — 应用程序在 Manifest 文件的
<supports-gl-texture>
元素里声明的其支持的纹理压缩格式。
与 - 设备的 GPU 所支持的纹理压缩格式 — 设备以系统只读属性的方式给出的格式。
每次向 Google Play Developer Console 上传应用程序时, Google Play 都会扫描程序的 Manifest 文件并查找
<supports-gl-texture>
元素。
从该元素中解析出格式描述符,并作为与程序 .apk 及版本相关联的基础元数据保存起来。
当用户在 Google Play 上搜索或浏览应用程序时,后台服务会把应用程序支持的纹理压缩格式与用户设备所支持的格式进行比较。
比较是根据格式描述符进行的,对字符串进行精确匹配。
只要应用程序支持的纹理压缩格式中有一种是设备支持的, Google Play 就允许用户看见该应用程序并提供下载。
反之,如果设备对应用程序列出的格式都不支持, Google Play 就会滤除这个应用,也不会提供下载。
如果应用程序没有声明任何
<supports-gl-texture>
元素, Google Play 将不会根据 GL 纹理压缩格式进行过滤。
Android开发-API指南-<supports-gl-texture>的更多相关文章
- Android开发-API指南-<permission>
<permission> 英文原文:http://developer.android.com/guide/topics/manifest/permission-element.html 采 ...
- Android开发-API指南-<provider>
<provider> 英文原文:http://developer.android.com/guide/topics/manifest/provider-element.html 采集(更新 ...
- Android开发-API指南-应用程序开发基础
Application Fundamentals 英文原文:http://developer.android.com/guide/components/fundamentals.html 采集(更新) ...
- Android开发-API指南-Intent和Intent过滤器
Intents and Intent Filters 英文原文:http://developer.android.com/guide/components/intents-filters.html 采 ...
- Android开发-API指南-Android简介
Introduction to Android 英文原文:http://developer.android.com/intl/zh-cn/guide/index.html 采集日期:2014-4-16 ...
- Android开发-API指南-设备兼容性
Device Compatibility 英文原文:http://developer.android.com/guide/practices/compatibility.html 采集日期:2014- ...
- Android开发-API指南-任务和回退栈
Task and Back Stack 英文原文: http://developer.android.com/guide/components/tasks-and-back-stack.html 采集 ...
- 【最后一篇API译文】Android开发-API指南- Contacts Provider
Contacts Provider 今年加入了某字幕组,加之杂事颇多,许久未添新文了,惭愧之极. 在听闻 Google 即将重返中国后,近日忽又发现官方网站正在放出 API 中文版,比如本文.当然不是 ...
- Android开发-API指南-创建 Content Provider
Creating a Content Provider 英文原文:http://developer.android.com/guide/topics/providers/content-provide ...
- Android开发-API指南-Content Provider基础
Content Provider Basics 英文原文:http://developer.android.com/guide/topics/providers/content-provider-ba ...
随机推荐
- LintCode "Binary Representation"
Not hard to think of a solution. But the key is all details. class Solution { public: /** *@param n: ...
- LinearLayout属性baselineAligned的作用及baseline
相信大家对LinearLayout已经相当熟悉,但你们是否了解它的属性baselineAligned呢? Android官方文档是这么描述的:
- String、StringBuffer、StringBuilder之间的区别
String 字符串常量 StringBuffer 字符串变量(线程安全) StringBuilder 字符串变量(非线程安全) ...
- 已跳过 'cache' -- 节点处于冲突状态
svn resolved ./cache ./cache 为冲突文件路径“cache”的冲突状态已解决
- 75. Sort Colors
Given an array with n objects colored red, white or blue, sort them so that objects of the same colo ...
- storm概念学习及流处理与批处理的区别
在过去10 年中,随着互联网应用的高速发展,企业积累的数据量越来越大,越来越多.随着Google MapReduce.Hadoop 等相关技术的出现,处理大规模数据变得简单起来,但是这些数据处理技术都 ...
- nginx重写规则报nginx: [emerg] directive "rewrite" is not terminated by ";"
对于下面的重写规则 rewrite ^/gongying/([\d]{8})_([\d]+).html$ /index.php?app=support&act=view&pts=$1& ...
- Android_ _开发技巧总结
=== 1 1.对于过多的控件,功能类似,数量又多的,可以用include方法.在实现应用中,可以把控件放入List集合中. private void initView() { // TODO ...
- jQuery-ajax: 取消关注|关注
ylbtech-jQuery-ajax: 取消关注|关注 1.A,jQuery-效果图返回顶部 1.B,jQuery-Source Code(源代码)返回顶部 <script src=&qu ...
- Python深入02 上下文管理器
作者:Vamei 出处:http://www.cnblogs.com/vamei 欢迎转载,也请保留这段声明.谢谢! 上下文管理器(context manager)是Python2.5开始支持的一种语 ...