Blocking urges I think is almost impossible. They come suddenly and you have to be ready in that case. For example I have some emergency procedures, like calling a friend, go for a walk, playing video games and so on. The point is throw away everything of electronic that you have and distract yourself.
Instead, if you want to try to prevent urges, I found very helpful meditation and planning my day in every single moment, so that I never run out of things to do