code optimized, added support for proximity sensor and working is fine on MOTO e for all sensors.changed code for shake