ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Mobile specific functions / Phone functions
  • Required permissions
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Triggers the vibrations of the device.
  • Universal Windows 10 AppAndroidAndroid 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
Universal Windows 10 AppAndroidAndroid Widget
// Trigger the vibrations during one second
VibrationTrigger(1000)
 
// Trigger the vibrations alternatively every 300 milliseconds
arrPeriod is array of int
arrPeriod = [300,300]
VibrationTrigger(arrPeriod, True)
 
// Stop the vibrations
VibrationStop()
iPhone/iPad
// Trigger the vibrations during one second
VibrationTrigger()
Syntax

Triggering vibrations during one second

VibrationTrigger()
WINDEVUniversal Windows 10 AppAndroidAndroid Widget

Triggering the vibrations during a given period Hide the details

VibrationTrigger(<Duration>)
<Duration>: Integer ou 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).
WINDEVUniversal Windows 10 AppAndroidAndroid 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 value) to perform no repetition.
Remarks
AndroidAndroid Widget

Required permissions

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

Last update: 05/26/2022

Send a report | Local help