Refactor Android and iOS adaptors for testing