The routine daily activities that tend to be sedentary and repetitive may cause severe health problems. This issue has encouraged researchers to design a system to detect and record people activities in real time and thus encourage them to do more physical exercise. By utilizing sensors embedded in a smartphone, many research studies have been conducted to try to recognize user activity. The most common sensors used for this purpose are accelerometers and gyroscopes; however, we found out that a gravity sensor has significant potential to be utilized as well. In this paper, we propose a novel method to recognize activities using the combination of an accelerometer and gravity sensor. We design a simple hierarchical system with the purpose of developing a more energy efficient application to be implemented in smartphones. We achieved an average of 95% for the activity recognition accuracy, and we also succeed at proving that our work is more energy efficient compared to other works.