Gravar-mail: Activity recognition using a single accelerometer placed at the wrist or ankle