  In this work, we address a fundamental and critical task of detecting the
behavior of driving and texting using smartphones carried by users. We propose,
design, and implement TEXIVE that leverages various sensors integrated in the
smartphone and realizes our goal of distinguishing drivers and passengers and
detecting texting using rich user micro-movements and irregularities that can
be detected by sensors in the phone before and during driving and texting.
Without relying on external infrastructure, TEXIVE has an advantage of being
readily implemented and adopted, while at the same time raising a number of
challenges that need to be carefully addressed for achieving a successful
detection with good sensitivity, specificity, accuracy, and precision. Our
system distinguishes the driver and passengers by detecting whether a user is
entering a vehicle or not, inferring which side of the vehicle s/he is
entering, reasoning whether the user is siting in front or rear seats, and
discovering if a user is texting by fusing multiple evidences collected from
accelerometer, magnetometer, and gyroscope sensors. To validate our approach,
we conduct extensive experiments with several users on various vehicles and
smartphones. Our evaluation results show that TEXIVE has a classification
accuracy of 87.18%, and precision of 96.67%.
