Smartphones are loaded with sensors and components that power the surface-level features you use every day. Some of them you might know about — like the ambient light sensor used to handle automatic ...
Why would you want to detect metal? Oh, I don't know … maybe you want to find some gold in the ground. You could dig up ALL the dirt, or you could find the location that has the gold before you dig.