I’m trying to figure out the best way to play a tutorial video in my Opengl android application.
I tried this and it works fine.
Now my problem is how to merge this with an opengl application. If I just launch another activity I will destroy my opengl context and would have to recreate it. My best idea at the moment is to add to my existing xml layout an VideoView component and use a relative layout to overlap it on top of the opengl view.
I would like to know if this is a good option or is there a better solution.
As far as I remember your context isn’t destroyed when the GLSurfaceView isn’t being used, you could just swap it for a VideoView till the video’s done playing then switch back.
The only problem with the RelativeLayout idea is if the GLSurfaceView could have a lot on it at the time, it might be a bit much for lower end devices to have them both active.