call to OpenGL ES API with no current context (logged once per thread) - OpenGL ES
<p>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:</p>

<p>renderer = GLES20.glGetString(GLES20.GL_RENDERER);</p>

<p>vendor = GLES20.glGetString(GLES20.GL_VENDOR);</p>

<p>version = GLES20.glGetString(GLES20.GL_VERSION);</p>

<p>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.</p>

<p>However If I execute these lines through button Click I am getting results.</p>

<p>Can you someone help to me identify what mistake I am doing or is there any other thing I need to learn on this?</p>

<p>How do I get the result even If I execute from the onCreate Method?</p>