Code example for ActivityManager

Methods: getDeviceConfigurationInfo

0
        super.onCreate(savedInstanceState);
        mSurfaceView = new GLSurfaceView(this);
         
        ActivityManager am = (ActivityManager)getSystemService(Context.ACTIVITY_SERVICE);
        if(checkOpenGLVersion) {
        	ConfigurationInfo info = am.getDeviceConfigurationInfo();
        	if(info.reqGlEsVersion < 0x20000)
        		throw new Error("OpenGL ES 2.0 is not supported by this device");
        } 
        mSurfaceView.setEGLContextClientVersion(2);
        mLayout = new FrameLayout(this);
        mLayout.addView(mSurfaceView);
         
        if(mMultisamplingEnabled)
        	createMultisampleConfig(); 
         
        setContentView(mLayout);
    } 
     
    protected void createMultisampleConfig() { 
    	final int EGL_COVERAGE_BUFFERS_NV = 0x30E0;