I have a class an activity class as follows:
public class MyActivity extends Activity implements OnTouchListener {}
The whole class is significantly long that have some good depth of views(mainly webview). I am trying to implement a global keyevent logger for this class. I tried to set keylistener for main view but cannot set it because I think I have not extended the OnKeyListener Class? The error I get is
The method is the type view is not applicable for MyActivity
I also have overridden OnKeyDown Method which does not collect any data:
@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
Log.i("Key Pressed: ", keyCode+" = number");
}
So, what way should I go to grab all keyevent happening inside my activity? I am pretty much clueless at the moment. I really appreciate your help.
EDIT: I am looking for all soft keyboard events only. (Sorry I forgot to mention that...)