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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T02:23:25+00:00 2026-05-24T02:23:25+00:00

I am making a very simple game (in the hope of learning a bit

  • 0

I am making a very simple game (in the hope of learning a bit mor of Android programming as well as doing something functional) and will be locking the screen so its always in landscape mode to play the game.

I have around 5 background threads running (timers, game playing time, level time etc) via asyncTask.

According to my book i still have to have something like task=(RotationAwareTask)getLastNonConfigurationInstance();

and

public Object onRetainNonConfigurationInstance() { 
    task.detach(); 

    return(task); 
  }

to save the state in case for example a phone call comes in…
and a child static class (RotationAwareTask)

This is pretty confusing in the book, is there a simple example that any of you guys are aware of (link to some site)? Or some set of “standard” code that you guys keep reusing that is easier to understand? Just as an example…

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-05-24T02:23:25+00:00Added an answer on May 24, 2026 at 2:23 am

    The easiest way to do this is set android:screenOrientation attribute in your manifest element instead.

    How is application orientation (landscape or portrait) locked?

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

Sidebar

Related Questions

I am new to programming and I'm making a very simple blackjack game with
Having trouble with something is very straight forward. I'm making a simple game (using
I'm making a simple 2d game for the android platform, which works perfectly from
I'm making simple game with very simple thread (1 sec delay) got problem with
What I am doing is very simple. I have a simple 2d Maze game
I'm making a very simple game application. The main form (Form1) has a single
I'm making a very simple turn based battle game using ActionScript 2.0. I'm VERY
I'm making a very simple fishing game. the user has to buy pots, easy
I am making a very simple game, but I cannot decide on how to
I'm making a simple RTS game. I want it to run very fast because

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.