Smartphones are widely available commercial devices and using them as a basis to creates the possibility of future widespread usage and potential applications. This paper utilizes the embedded sensors in a smartphone to recognise a number of common human actions and postures. We group the range of all possible human actions into five basic action classes, namely walking, standing, sitting, crouching and lying. We also consider the postures pertaining to three of the above actions, including standing postures (backward, straight, forward and bend), sitting postures (lean, upright, slouch and rest) and lying postures (back, side and stomach). Training data was collected through a number of people performing a sequence of these actions and postures with a smartphone in their shirt pockets. We analysed and compared three classification algorithms, namely k Nearest Neighbour (kNN), Decision Tree Learning (DTL) and Linear Discriminant Analysis (LDA) in terms of classification accuracy and efficiency (training time as well as classification time). kNN performed the best overall compared to the other two and is believed to be the most appropriate classification algorithm to use for this task. The developed system is in the form of an Android app. Our system can real-time accesses the motion data from the three sensors and on-line classifies a particular action or posture using the kNN algorithm. It successfully recognizes the specified actions and postures with very high precision and recall values of generally above 96%.