Bardram recently introduced a new concept of activity-based computing as a way of thinking about supporting human activities in ubiquitous environments. In such environments where users are using a multitude of heterogeneous computing devices, the need for supporting users at the activity level becomes essential. However, without considering basic security issues, it could be rife with vulnerabilities. Security services, like authentication and access control, have to not only guarantee security, privacy, and confidentiality for ubiquitous computing resources, but also support user activities equipped with various devices. In this paper, we present an activity-based security scheme. The proposed scheme aims to enhance security services on mobile devices and facilitate user activities. We also integrate off-the-shell security services like MD5, TEA, Diffie-Hellman key agreement protocol so that it makes the scheme more robust and practically usable. The implementation and sample scenario have shown the requirement satisfactory of the scheme.