How to get a "shake" callback or how to catch the UIEventSubtypeMotionShake in Unity

This may be a dumb question, but I just cant see it in the Unity documentation. I really just want to have a function triggered when the user shakes the phone (iPhone and Android devices). I'm sure there must be a way to do this in Unity.

Thanks

Is this thread of any use to you?

http://forum.unity3d.com/viewtopic.php?p=210587