This code detects a pour gesture using the accelerometer of the device.