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

  • Home
  • SEARCH
  • 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 7516889
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T01:16:37+00:00 2026-05-30T01:16:37+00:00

I programmed game, which is supposed to use .startActivity on activity which should display

  • 0

I programmed game, which is supposed to use .startActivity on activity which should display score, the problem is, that instead of properly displaying the activity, i’m getting “Deprecated Thread methods are not supported”. I googled this error and i removed all Thread.stop() in my application, but it did not helped. Could there be any other reason why i’m getting this type of error?

public class GameFrame extends Activity implements OnTouchListener, OnLossListener {
Panel game;
@Override
public void onCreate(Bundle savedInstanceState) {
    Display d=getWindowManager().getDefaultDisplay();
    super.onCreate(savedInstanceState);
    this.requestWindowFeature(Window.FEATURE_NO_TITLE);
    Point p=new Point(d.getWidth(),d.getHeight());
    game=new Panel(this,p);
    setContentView(game);
    game.setOnTouchListener(this);
    game.setOnLossListener(this);
}
public boolean onKeyDown (int kc,KeyEvent ke){
    if (kc==23){
        game.shoot();
    }
    return true;
}
public void onPause(){
    super.onPause();
    game.thread.setState(false);
    game.mech.setState(false);
    this.finish();
}
@Override
public boolean onTouch(View v, MotionEvent me) {
    if (v.equals(game)){
        game.setPosOfPlane((int)me.getX());
    }
    return true;
}
@Override
public void lost(int score) {
    Intent i=new Intent (this,EndGame.class);
    i.putExtra("score",score+"");
    startActivity (i);
}

}

  • 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-30T01:16:39+00:00Added an answer on May 30, 2026 at 1:16 am

    I can’t tell you what exactly is the problem, but I can give you some hints.

    First of all you usually create a thread when starting your application and let it run until you want to exit your game (user pressed BACK). Other than that you only pause your game thread, e.g. when you’re displaying another activity or your app is temporarily suspended (user pressed HOME).

    If you want to end your game thread, just let it die naturally. Usually such thread runs in some sort of a loop, so you just exit this loop and the thread will terminate on its own. You usually call join() on the game thread from the main thread to block it until the game thread dies.

    You should never manipulate thread’s state directly.

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

Sidebar

Related Questions

There is a multiplayer card game which I had first programmed as a non-forking
I have programmed a plugin in Lua for a game that sends player information
I wrote a server programe which is planed to use in multi player game.
I am working on an authentication system for an online game programmed using PHP
I'm designing a game where players are programmed bots competing in a programming contest.
I am working on a problem with my 2D arcade game programed with Python
I am trying to figure out which C/C++ compiler to use. I found this
I've never programmed a game, but have about a dozen years programming interfaces. After
I've never programmed a game, but have about a dozen years programming interfaces. After
For Ludum Dare 22, Notch programmed a game in 48 hours called Minicraft. It's

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.