Human activity recognition is now a well-known field of Human Computer Interaction (HCI) because of its capability to provide personalized support using different applications. For the purpose of recognizing human activities, we selected three activities (running, walking, and steady state, e.g., sitting and lying). We used the Dynamic Time Warping (DTW) algorithm as a classifier to learn and detect activities. Due to its inherent nature, DTW can provide satisfactory accuracy even with very few training samples. Using smartphone's gyroscope and accelerometer sensors, we recorded user data during various activities. To encounter personal traits, we made sure the users were of different age, height and gender. With the help of DTW as a real time classifier, we then identify the activities against matching templates. The obtained results showed sufficient accuracy, showing the effectiveness of the approach.