How to judge if the device is in vehicle

This code shows how to recognize the activity that the Tizen device is in vehicle.