This should be before you send the SMS, otherwise you have a race condition and this could fail if the notification pops up quickly.