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 7900067
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T08:52:23+00:00 2026-06-03T08:52:23+00:00

I am developing a game using Cocos2d FrameWork in Android. I encountered a problem

  • 0

I am developing a game using Cocos2d FrameWork in Android.

I encountered a problem while testing on Motorola Xoom.

What I want to do :

  • When User pressed Volume up and Volume down Button. All the Animation should play with sound .

But What actually Happened:

  • When I pressed volume up down button on Motorola Xoom than My Game Lost Focus and all Animation Paused but sound is playing according to the volume button settings.

This is only when I test my Application in Honey Comb OS.

I am using onWindowFocusChanged method to Resume Game Play.

Anyone having encounter this type of problem ?
Please let me know if anyone have solution for this .

Thanks.

  • 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-06-03T08:52:24+00:00Added an answer on June 3, 2026 at 8:52 am

    i found answer myself ..

    Here is the solution of this issue ..

    public void onWindowFocusChanged(boolean hasFocus) 
    {
        synchronized(sGLThreadManager) {
        //mHasFocus = hasFocus;
        mHasFocus = true;
        sGLThreadManager.notifyAll();
        }
        if (LOG_SURFACE) 
        {
            Log.i("Main thread", "Focus " + (mHasFocus ? "gained" : "lost"));
        }
    }
    

    just change mHasFocus = true in GLSurfaceView class of Cocos2d android …

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

Sidebar

Related Questions

Im developing a game for Android using AndEngine. As of now, I want to
I am developing a game using libgdx framework. I want to raise a dialogue
I'm developing a game using cocos2d. What is the best location to authenticate user
I'm developing a game using Cocos2d-x to Android and iPhone. At the beggining, I
I'm developing a game using cocos2d v2.0 beta2. Since i worked with iOS5.0 all
I am currently developing a card game for the iphone using cocos2d. I am
I'm developing chess game for Android ( androidchess.appspot.com ). If I want to add
I'm developing an Asynchronous Game Server using .Net Socket Asynchronous Model( BeginAccept/EndAccept...etc.) The problem
I am developing a 2D game for android using lots of sprites. I am
I am developing a simple game using Java swing. I want to know whether

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.