This paper presents SmartCough, an M-health app for Android smartphones that monitors cough trends in patients with respiratory diseases. The app is designed to be battery-efficient, fast, and robust against noise. It relies on efficiently-implemented machine learning algorithms that have been validated in laboratory conditions. Since these conditions are rarely met in a real situation where the user carries the phone inside their pocket or bag, the app features a self-training module that allows easy adaptation to new environments. In this paper, we have evaluated the app with real patients in an outdoor setting to test the performance in real environments that are hostile to cough detection. Our results show that the average sensitivity obtained in laboratory conditions drops significantly (down to 60%) when the baseline configuration is employed. By activating the built-in self-training module, the median sensitivity raises to 85.87% after a small training step, with a bounded false positive rate. The achieved performance is analogous to the one obtained in laboratory conditions, making the app suitable for use in real life scenarios.