Swipe Controls in C++

Hey, I was writing a code for my Game’s First Person Perspective Camera to rotate with swipe in touch like in other 3D Android games, but I was not able to figure out how to check if the touch is swiping, I wrote a code using pressed and released input binding but when I moved the touch it rotated but if I kept touching the screen as where it was the camera did not stopped it kept rotating 360 Degrees until I removed my finger form the touch, can anyone please help me out?