I\'ve got some OpenGL ES code that has been rendering to a GLSurfaceView, and I\'m currently modifying it to work with either SurfaceView and
GLSurfaceView
SurfaceView
What you need to do in API 16+ is create a Surface object, passing the SurfaceTexture as an argument to the constructor (which was introduced in API 14). Pass that Surface to ANativeWindow_fromSurface() as usual.
ANativeWindow_fromSurface()