The answer is in Android OpenGLES docs . Essentially, try creating a 3.0 EGLContext , and if that fails, you know that 3.0 is not supported.
The page also shows an alternative approach: create a context for a lower level (1.x or 2.x) and use it to call glGetString(GL_VERSION) . If the version line indicates that 3.x is supported, you must destroy this context and create a new one.
Update: this approach can be seen in the Grafika EglCore class. Follow what happens when FLAG_TRY_GLES3 is passed to the constructor.
source share