Saving Instance State
<p>This is my activity:</p>

<pre><code>package com.workspace.pockethero;

import android.app.Activity;
import android.content.pm.ActivityInfo;
import android.os.Bundle;
import android.util.Log;
import android.view.Display;
import android.view.KeyEvent;
import android.view.Window;
import android.view.WindowManager;

public class PocketHero extends Activity {
    /** Called when the activity is first created. */

    private static final String TAG = PocketHero.class.getSimpleName();
    static int centreX;
    static int centreY;
    static int bottomA;

    @Override
    public void onCreate(Bundle savedInstanceState) {
        getWindow().setFlags(
        WindowManager.LayoutParams.FLAG_FULLSCREEN,
        WindowManager.LayoutParams.FLAG_FULLSCREEN);//fullscreen
        setRequestedOrientation(
        ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);//landscape mode
        getWindow().setFlags(
        WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON,
        WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);//keep screen on
        requestWindowFeature(Window.FEATURE_NO_TITLE);//no title

        super.onCreate(savedInstanceState);
        Display display = getWindowManager().getDefaultDisplay(); 
        centreX = display.getWidth()/2;
        centreY = display.getHeight()/2;
        bottomA = display.getHeight();
        // requesting to turn the title OFF
        // making it full screen
        // set our MainGamePanel as the View
        setContentView(new MainGamePanel(this));
        Log.d(TAG, "View added");
    }

    @Override
    public void onSaveInstanceState(Bundle savedInstanceState) {
      super.onSaveInstanceState(savedInstanceState);
    }

    @Override
    public void onRestoreInstanceState(Bundle savedInstanceState) {
      super.onRestoreInstanceState(savedInstanceState);
    }

    @Override  
    public boolean onKeyDown(int keyCode, KeyEvent event)  
    {  
        //replaces the default 'Back' button action  
        if(keyCode==KeyEvent.KEYCODE_HOME)  
        {
        }
        return true;  
    } 

    @Override
    protected void onDestroy() {
        Log.d(TAG, "Destroying...");
        super.onDestroy();
    }

    @Override
    protected void onStop() {
        Log.d(TAG, "Stopping...");
        super.onStop();
    }

/** Called when the activity is first created. */
}
</code></pre>

<p>This activity is a real mess. I want my activity to save itself when minimized the game, and restore itself, when i launch it again. What should i add or remove in this activity? I'm new at android developing, so i don't know what else is needed in this activity...</p>
