Enables vibration functionality. More...
Import Statement: | import ArcGIS.AppFramework.Notifications 1.0 |
Properties
- supported : bool
Methods
- vibrate()
Detailed Description
The Vibration plugin allows developers to enable vibration within an app, providing a non-visual feedback or alert.
There is currently no way to provide a duration for vibration. On an Android device all vibrations are for one second, while iOS uses the system default.
Be aware that Vibration is a singleton, meaning you do not instantiate it. This code sample adds a vibration to any notification scheduled by the app.
LocalNotification { id: notification onTriggered: { console.log("Triggered ID: ", id) if(Vibration.supported) { Vibration.vibrate() } else{ console.log("This would vibrate if it could.") } } }
Property Documentation
Returns true if the device supports vibration. Otherwise, returns false.
Method Documentation
Initiates vibration on the client device from the app. The vibration will continue for system default vibration settings, or until the app is closed.