Android examples for Hardware:Device Feature
Use this method to check if the device supports OpenGL ES 2.0.
//package com.java2s; import android.app.ActivityManager; import android.content.Context; import android.content.pm.ConfigurationInfo; public class Main { /**/* www .j a va 2 s.c o m*/ * Use this method to check if the device supports OpenGL ES 2.0. * * @param context * @return */ public static boolean supportsOpenGLES20(Context context) { final ActivityManager manager = (ActivityManager) context .getSystemService(Context.ACTIVITY_SERVICE); final ConfigurationInfo info = manager.getDeviceConfigurationInfo(); return info.reqGlEsVersion >= 0x20000; } }