how to detect a metal using magnetic sensor in android phone?
问题 I want to detect a metal using magnetic sensor values. i am getting values continuously like x=30.00 ,y=-20.00 ,z=-13.00 now i want to know how to use these values for detecting any metal(mathameticalcalu,formulas) code is sensorManager = (SensorManager) getSystemService(SENSOR_SERVICE); // get compass sensor (ie magnetic field) myCompassSensor = sensorManager.getDefaultSensor(Sensor.TYPE_MAGNETIC_FIELD); float azimuth = Math.round(event.values[0]); float pitch = Math.round(event.values[1]);