A smartphone device could help millions of people avoid drinking water contaminated by arsenic.