Additional documentation for Haptics to make it properly work on-device

Initially when trying to use the haptics it mysteriously wasn't working. I resolved the issue using #2023, the examples were updated but the above file was not.
pull/2393/head
Dominic Moser 6 months ago
parent 5369898db7
commit 5683a82234
No known key found for this signature in database
GPG Key ID: 87FD06643B0B1C4C

@ -69,6 +69,18 @@ fn main() {
}
```
Second, add the required permissions in the project:
`src-tauri/capabilities/default.json`
```rust
"permissions": [
+"haptics:allow-impact-feedback",
+"haptics:allow-notification-feedback",
+"haptics:allow-selection-feedback",
+"haptics:allow-vibrate"
]```
Afterwards all the plugin's APIs are available through the JavaScript guest bindings:
```javascript

Loading…
Cancel
Save