Preventing devices without a GL extension from downloading app from Google Play

隐身守侯 提交于 2019-12-11 02:19:50

问题


Is it possible to make an app unavailable for devices without a specific OpenGL ES extension on Google Play store?

Since <supports-gl-texture> takes the extension name, not the texture format, can it be exploited for generic GLES extensions?


回答1:


Yes I believe there is, for example:

<uses-feature android:glEsVersion="0x00020000" android:required="true" />

This statement will prevent devices that do not support OpenGL es 2.0 from seeing your app in the playstore.

Try this:

String extensions = javax.microedition.khronos.opengles.GL10.glGetString(
        GL10.GL_EXTENSIONS);

According to the docs, the extensions variable will contain a space-separated list of supported extensions to GL. So I think you can just use .contains("GL_OES_depth24"); or something. You're going to have to check some example content of whats returned to see how to check for it.

I don't know how to stop the app from coming up in google play store but you can just put this check at the beginning of your app that will tell users that you can't use this app or something.



来源:https://stackoverflow.com/questions/24261243/preventing-devices-without-a-gl-extension-from-downloading-app-from-google-play

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!