Should the sub Activity_KeyPress return a Boolean value to indicate if it has handled the key press?
A sub that returns no value does in fact, internally, return a String.
So android expects a Boolean but gets a String - hence the class cast exception.