Updated support to handling keys on Android, and a few improvements