Some changes to the heartbeat logic for Unity-iOS and Unity-Android