How to make app respond to signals

Is there a way to app to get signals from Android Box. remote ??

Homework : I already tested with the key events extension but failed to make it work

Do any one has any other way ???