Vibration QML Type

Enables vibration functionality. More...

Import Statement: import ArcGIS.AppFramework.Notifications 1.0

Properties

Methods

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

[read-only] supported : bool

Returns true if the device supports vibration. Otherwise, returns false.


Method Documentation

vibrate()

Initiates vibration on the client device from the app. The vibration will continue for system default vibration settings, or until the app is closed.


Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.