A system for detecting phone distraction events in a moving vehicle, the system comprising: a smartphone of a driver of the moving vehicle; and an Internet of Things, IoT, server communicatively coupled to the smartphone, characterized, in that the smartphone comprises one or more sensors (118, 120) built into the smartphone, wherein sensory data of the one or more sensors (118, 120) are captured by the sensors (118, 120) of the smartphone during a vehicle trip and are transmitted to the Internet of Things, IoT, server, wherein the sensor data comprises one or more chunks of data streams associated with an loT service from the smartphone, and wherein the chunks are of fixed size with a restricted amount of information; in that discrete phone handling events associated with a chunk of the measured data stream of the smartphone during the vehicle trip are generated by treating each chunk individually as an independent block, wherein the chunks are processed for at least one of a device unlock event and a device lock event associated with the smartphone, wherein one or more chunks of the data stream from the accelerometer sensor are processed for a device movement event associated with the smartphone for a phone pick-up event and a phone put-down event, and wherein an acceleration norm signal sensed by the accelerometer sensor are filtered based on a predefined threshold to detect a plurality of device movement candidates by isolating portions of the filtered accelerometer norm signal that are sensed to be above the predefined threshold, each device movement event being characterized by a start time and an end time, in that the Internet of Things, IoT, server comprises means for aggregating the one or more phone handling events associated with the smartphone into one or more macro events; and in that the Internet of Things, IoT, server comprises means for processing the aggregated one or more macro events based on a set of preconfigured rules to determine a phone distraction event, wherein the set of preconfigured rules are based on predefined thresholds to determine the phone distraction event. a smartphone of a driver of the moving vehicle; and an Internet of Things, IoT, server communicatively coupled to the smartphone, characterized, in that the smartphone comprises one or more sensors (118, 120) built into the smartphone, wherein sensory data of the one or more sensors (118, 120) are captured by the sensors (118, 120) of the smartphone during a vehicle trip and are transmitted to the Internet of Things, IoT, server, wherein the sensor data comprises one or more chunks of data streams associated with an loT service from the smartphone, and wherein the chunks are of fixed size with a restricted amount of information; in that discrete phone handling events associated with a chunk of the measured data stream of the smartphone during the vehicle trip are generated by treating each chunk individually as an independent block, wherein the chunks are processed for at least one of a device unlock event and a device lock event associated with the smartphone, wherein one or more chunks of the data stream from the accelerometer sensor are processed for a device movement event associated with the smartphone for a phone pick-up event and a phone put-down event, and wherein an acceleration norm signal sensed by the accelerometer sensor are filtered based on a predefined threshold to detect a plurality of device movement candidates by isolating portions of the filtered accelerometer norm signal that are sensed to be above the predefined threshold, each device movement event being characterized by a start time and an end time, in that the Internet of Things, IoT, server comprises means for aggregating the one or more phone handling events associated with the smartphone into one or more macro events; and in that the Internet of Things, IoT, server comprises means for processing the aggregated one or more macro events based on a set of preconfigured rules to determine a phone distraction event, wherein the set of preconfigured rules are based on predefined thresholds to determine the phone distraction event.