Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6868053
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T03:23:12+00:00 2026-05-27T03:23:12+00:00

We have an Augmented Reality app that displays either a video or a 3D

  • 0

We have an Augmented Reality app that displays either a video or a 3D model when pointing on a specific marker. This works fine, but as soon as we quit the MediaPlayer activity via the Back-Button, the OpenGL Context seems to get destroyed. The app then just restarts and needs to reload all assets including the 3D model which causes a delay of about 10-15 seconds which we want to prevent.
I read already something about setPreserveEGLContextOnPause(true) and put it in our GLSurfaceView (we have a 3.x tablet), but it doesn’t seem to do anything (do I need to implement something else to make it work? I barely found usable documentation about it).

I’m not sure where in our app the problem could be, I suppose that somewhere our GLSurface gets destroyed and we dont notice it.

Our code from exiting from the MediaPlayer is this:

public boolean onKeyDown(int keyCode, KeyEvent event) {
    if ((keyCode == KeyEvent.KEYCODE_BACK)) {            
        this.finish();

        Intent intent = new Intent(MediaPlayerActivity.this, OpenGLActivity.class);
        intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
        this.startActivity(intent);
    }
    return super.onKeyDown(keyCode, event);
}

Any hints how we can preserve the OpenGL context, or quit the MediaPlayer without trashing our main activity?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T03:23:12+00:00Added an answer on May 27, 2026 at 3:23 am

    To get around that, we have put the MediaPlayer on a SurfaceView layer, that will display over our OpenGL stuff. Depending on the marker, we just show or hide the layer and prevent switching out of context.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a small augmented reality app that I'm developing and would like to
I'm working on an augmented reality app for iPhone that involves a very processor-intensive
In augmented reality app,on Camera view another transparent view will be, On this transparent
I'm making something like an augmented reality app, in which I have an OpenGL
I am trying to get a simple augmented reality app going. I have got
I'm implementing Augmented Reality in my app. Is there anyway to just have a
I am developing an Augmented Reality app based on location. It is working perfectly
I'm developing an iPhone application. I have a UIView used to augmented reality. I
I want to implement the Augmented Reality with layer Example like this:-http://www.youtube.com/watch?v=b64_16K2e08 i had
I'm implementing live video capture through DirectShow for live processing and display. (Augmented Reality

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.