Taking the technology advances of bio-monitoring sensor, wireless sensor network (WSN), pervasive Internet and prevalent smartphone, we design a ubiquitous personal health surveillance and management system called UPHSM. Our system cost-effectively integrates health-related sensory devices with the application-layer gateway (ALG) implemented on an open-source smartphone (i.e. Google Android phone). It can aid senior citizens and patients who need long-term attention to their illness, like chronic diseases, with ubiquitous surveillance and remote management of the recorded health data. The proposed smartphone ALG (SmartALG) between WSN and Internet can multiplex different health/environment sensory data in both reliability and security. Through the smartphone's Internet connection over 2.5G/3.5G/WiFi, SmartALG delivers the multiplexed sensory data with user's location to remote server to enable the ubiquitous health surveillance and management. Not only the medical expertise can remotely browse the stored sensory data for diagnosing, but also, while the remote sever detects abnormality in sensory data, a short message with concise information will be immediately sent to user's relatives and healthcare professionals to provide proper treatment for personalized and timely care.