39
Views
2
Comments
Three finger slide in mobile application
Application Type
Mobile

While working on a mobile application, I need to trigger an event while user made 3 finger slide (usually in most of the devices , action is used to take screenshots) on the screen. I have tried with touch events and swipe events for the same ,but it doesn't work properly.

looking for an suggestion how can we achieve it? any plugins available for it?

Thanks in advance

regards,

Boobalan


2024-07-05 14-16-55
Daniël Kuhlmann
 
MVP

Hi,

You should be able to handle this with some javascript.

https://developer.mozilla.org/en-US/docs/Web/API/Touch_events/Multi-touch_interaction

You should be able to utilize the TouchEvents widget for Mobile and Reactive apps.

Check the touchStart event targetTouches it contains the number of simultaneous touches a user makes. Watch out. The browser (also on mobile) will fire a seperate touchsrat event for each touch point. So with 3 finders, the first time the event will have targetTouches.length === 1, the second time equal === 2 and the third time === 3. 

There is also a Forge Component that users hammer.js to handle this, with a nice demo (but not a demo for a 3 finger slide).

https://www.outsystems.com/forge/component-overview/3374/custom-touch-events

Regards,

Daniel

2024-05-20 06-58-07
Boobalan S

Hi Daniel,

As you suggested ,I have achieved the same using targetTouches.length and changedTouches.identifier with simple JS.

Thanks for your response.

regards,

Boobalan


Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.