By BroadcastReceiver using the proximity sensors when the android is screened off and on.