I really need someone help to understand the issue that I am facing. I am trying to get the GPU information from the below lines:
renderer = GLES20.glGetString(GLES20.GL_RENDERER);
vendor = GLES20.glGetString(GLES20.GL_VENDOR);
version = GLES20.glGetString(GLES20.GL_VERSION);
If I execute these lines from "OnCreate" method of an Activity I am receiving the error "E/libEGL(4380): call to OpenGL ES API with no current context (logged once per thread)" in the logcat and empty value is returned.
However If I execute these lines through button Click I am getting results.
Can you someone help to me identify what mistake I am doing or is there any other thing I need to learn on this?
How do I get the result even If I execute from the onCreate Method?