Trigger Haptic Engine from UI Interaction on Web App

Hey gang,

Is there a way to trigger the haptic engine on an iOS or Android device from a Xojo Web App? I have a custom canvas that acts similar to a push button that I would like to generate a haptic click when pressed. I know there’s some sort of hook into the haptic engine as when you have a WebPopupMenu in Safari on iOS you get the haptic click as you scroll through selections in the list. But that might be triggered by the browser framework as opposed to Xojo.

Is there a declare that could be done? A plugin?

Thanks,

Jon

I didn’t think it was possible for a website to even use the haptic feedback system. I Google’d and found this library: http://hapticsjs.org but in testing it does not work on my iPhone.

I don’t think you can at this time. This is another one of those things I would love to be proven wrong about!

It probably is an iOS limitation. The website lists every browser but Safari. I tried it in Chrome on my iPhone but it didn’t work in Chrome either.

I hope you are proven wrong too! :smiley:

On iOS, all browsers are Safari in disguise. And indeed, Safari is severely limited as to what code can do without user interaction. It maybe possible to tap into the haptic engine in the Action event of a button for instance.