Any hint on how to use vibration Api that runs mobile device iOS/android?

Hi, I’m doing some testing to develop a flow application that uses native features like vibration or NFC, is there anyone who can direct me to the right solution?

I’ve seen tools like RapidClipse, but I have no idea how to use it in Vaadin Flow application.

https://rapidclipse.atlassian.net/wiki/spaces/DOCEN/pages/50659630/XDEV+Mobile+Kit

Thank you

There’s nowadays a JavaScript API for triggering vibration even though it only works in Chromium-based browsers on Android.

Likewise for NFC even though that API is still marked as experimental so there’s a risk it will change or even be removed at any time.

1 Like

That is quite sad, the possibilitì to use a wpa application like native apps is far to be done.

will we have a way to do it in the future?

The Chrome team is quite active with introducing JS APIs for these kinds of features but the other browser vendors are usually more cautious. It’s very difficult to predict how this will develop in the future but I’m still optimistic based on how the field has developed over the past five years.

And for the cases that are not yet directly supported in browsers, there’s still the option of creating a native app that wraps a browser engine with additional native APIs exposed. This is what the RapidClipse feature that you linked to does according to my understanding but I don’t have any practical experience there so I cannot offer any further advice.

1 Like