Q:

Can't get OnTouchListner to work

I am trying to create my first android game (in eclipse) and I cannot seem to get OnTouchListner to work, mostly because I don't know how or where to create it. I am trying to figure out where someone taps the screen. Can someone please tell me how and where to create the OnTouchListner!
Activity class:
package com.gregsapps.fallingbird;

import android.app.Activity;
import android.os.Bundle;
import android.view.MotionEvent;
import android.view.View;
import android.view.View.OnTouchListener;

public class Game extends Activity implements OnTouchListener{

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(new GameView(this));
    }
    @Override
    public boolean onTouch(View v, MotionEvent event) {
        // TODO Auto-generated method stub
        if(event.getAction() == MotionEvent.){
            System.out.println("TOUCH");
        }
        return false;
    }

}

View class:
package com.gregsapps.fallingbird;

import android.R;
import android.annotation.SuppressLint;
import android.content.Context;
import android.graphics.Canvas;
import android.view.MotionEvent;
import android.view.View;

public class GameView extends View{

    private Bird bird;
    private boolean runOnce = false;
    private Context context;

    public GameView(Context context) {
        super(context);
        this.context = context;
        this.setDrawingCacheEnabled(true);
        // TODO add setup code
    }

    protected void onDraw(Canvas canvas){
        update(canvas);
        //TODO add drawing code
        this.buildDrawingCache();
        //bird.canvasImage = this.getDrawingCache(true);
        canvas.drawBitmap(bird.image, bird.x, bird.y, null);
        System.out.println("drawing");
        invalidate();
    }

    private void update(Canvas canvas){
        //TODO add code to update stuff
        if(runOnce == false){
            bird = new Bird(canvas, com.gregsapps.fallingbird.R.drawable.bird, context);
            runOnce = true;
        }
        bird.move();
    }

}

A:

Implement it like this :-
public class Game extends Activity implements OnTouchListener{
    GameView gv;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        gv = new GameView(this);
        setContentView(gv);

        gv.setOnTouchListener(this);
    }
    @Override
    public boolean onTouch(View v, MotionEvent event) {
        // TODO Auto-generated method stub
        if(event.getAction() == MotionEvent.ACTION_DOWN){
            int x = event.getX();
            int y = event.getY();
            System.out.println("Touched view at X: " + X + " Y: " + Y );
        }
        return false;
    }

}

