ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage functions / Mobile specific functions / Phone functions
  • Required permissions
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
Triggers the vibrations of the device.
  • AndroidAndroid Widget These vibrations can be stopped at any time by VibrationStop.
  • iPhone/iPad These vibrations last 1 second.
Caution:
  • The device must be equipped with a vibration system.
  • This function has no effect in the simulator or in the emulator.
Example
AndroidAndroid Widget
// Déclenchement des vibrations durant une seconde
VibrationTrigger(1000)

// Déclenchement des vibrations en alternance toutes les 300 millisecondes
tabPeriode is array of int 
tabPeriode = [300,300]
VibrationTrigger(tabPeriode, True)

// Arrêt des vibrations
VibrationStop()
iPhone/iPad
// Déclenchement des vibrations durant une seconde
VibrationTrigger()
Syntax

Triggering vibrations during one second

VibrationTrigger()
AndroidAndroid Widget

Triggering the vibrations during a given period Hide the details

VibrationTrigger(<Duration>)
<Duration>: Integer or Duration
Duration of vibrations in milliseconds. This parameter can correspond to:
  • an integer corresponding to the number of seconds,
  • a Duration variable,
  • the duration in a readable format (e.g., 1 s or 10 ms).
AndroidAndroid Widget

Triggering repeated periods of vibrations Hide the details

VibrationTrigger(<Periods> [, <Recurrence>])
<Periods>: Array of integers
Array of integer describing the alternation of periods for triggering and stopping the phone vibrations:
  • The first value corresponds to the duration before triggering the vibrations.
  • The second value corresponds to the duration of vibrations.
  • The third value corresponds to the duration before the next triggering of vibrations.
And so on.
<Recurrence>: Optional boolean
  • True if the alternation of periods must be repeated indefinitely,
  • False (default) to perform no repetition.
Remarks
AndroidAndroid Widget

Required permissions

This function changes the permissions required by the application.
Permission required: VIBRATE
This permission is used to access the vibration feature.
Component: wd300android.aar
Minimum version required
  • Version 16
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 03/28/2025

Send a report | Local help