How to get the Address of the function call dynamically from the process
I am looking for a way to get the address of the function call programatically: public abstract void onKey (int primaryCode, int keyCodes) from KeyboardView.OnKeyboardActionListener interface.
Are the address of these functions static? i.e is it loaded always in the same memory.
I'm trying to achieve tamper protection from key loggers.
Your question fundamentally doesn't make sense, because you are asking how to take a function pointer when, in fact, Java does not have the equivalent of function pointers (you only see references to functions in dynamic dispatch through an object).
Addresses of functions may be static or may not exist at all, but this is all transparent to you, as the code is run in the virtual machine. If you are instead asking at the NDK level, you can surely take the address of the function using a simple & in C. However, at the Java level this is not possible.
You do not clarify, however, why this would help you prevent keyloggers.