Typecast events for android java