The only way I know how to determine whether a user is running or walking is by measuring their actual speed.
You can see that there are problems with this already, if you're hoping to swap running speed with walking speed. I think it may be doable, but it will be fishy. If I have some time I'll give it a try...