Motion detection

hi, I am starting a project to detect motion in smart bands like mi band, and save the motion data. I need to detect the motion and display it. is it possible in Ionic app. Can someone help me to do it. I need a start to do it.