sendNotification should be in callback of register