Before I split it into iOS-similar functions.