We propose an accelerometer-based gesture recognition method for smartphone users. In our method, similarities between a new time series accelerometer data and each gesture exemplar are computed with DTW algorithm, and then the best matching gesture is determined based on k-NN algorithm. In order to investigate the performance of our method, we implemented a gesture recognition program working on an Android smartphone and a gesture-based teleoperating robot system. Through a set of user-mixed and user-independent experiments, we showed that the proposed method and implementation have high performance and scalability.