With this application when you receive a Text Message (SMS), SmartSMSVibrate will check if you have your phone in your pocket/holster. If your phone is in a closed environment (in your pocket/holster), then the phone will vibrate. If your phone is in a open environment (on the table), then the phone wont vibrate.
This is done using the proximity sensor.
Try it out, its free on the Market - "SmartSMSVibrate"
More info can be found on my website: