A shaking and retreating dog could be frightened or in pain.
Sniffing.
It is called shaking or drying off!
Hyperventilating - Tami Chynn song - was created in 2007.
They could begin to get sick...When your dog or cat coughs up mucous; this means they have been "hyperventilating; hyperventilating is during hot weather the animal "breathes with the tongue hanging out...what happens is: when your dog "hyperventilates...mucous begins to collect @ the back of the dog's throat; so your dog "coughs up this mucous; if your dog or cat cannot cough up the mucus; then open the dog's mouth and scrape the mucous out of the dog's mouth with your fingers; then wash your hands...
He is probably just tired just let him rest and give him water. Or it could be the results of your dog having cardiac arrest ( the shaking )
He is cold, possibly?!?!?
He might be sad or really cold.
Flogging
Shaking the dog won't do any good. The American Red Cross offers pet first aid classes which will help you to deal with an emergency for a dog.
Because your dog urgently needs to see a vet.
It's either scared, cold, or very sick.