AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Ayuda / WLanguage / Funciones WLanguage / Funciones específicas para móviles / Funciones de teléfono
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
VolumeModify (Function)
In french: VolumeModifie
Modifies the setting of the volume for a sound source.
Remark: This function can be used in the emulator.
Example
// Cuts the phone ring and enables the vibrator mode
VolumeModify(0, volumeRing, volumeVibratorOn)
Syntax
<Result> = VolumeModify(<Volume> [, <Source> [, <Options>]])
<Result>: Integer
  • Value of the volume for the specified source after modification,
  • -1 if an error occurred. In this case, the ErrorOccurred variable is set to True. To get more details on the error, use ErrorInfo.
<Volume>: Integer or Integer constant
New value for the volume:
  • Value included between 0 (mute) and 100 (maximum volume).
  • Constant used to change the current volume:
    volumeMinusDecrements the value of the volume by one level.
    volumePlusIncrements the value of volume by one level.
<Source>: Optional Integer constant
Sound source to use:
volumeAlarmVolume of the alarme.
volumeCallVolume of calls.
volumeDefaultVolume of default source. This source depends on the phone configuration.
volumeMusicVolume used when playing an audio or video file.
volumeNotificationVolume of the sound emitted during a new notification.
volumeRingVolume of phone ring.
volumeSystemVolume of system sounds.
<Options>: Optional Integer constant (or combination of constants)
Available options:
volumeToastTriggers the display of a toast indicating the new value of the volume for the specified sound source.
volumeVibratorIfSilentEnables the vibrator of the device when receiving a notification or a call if the corresponding sound source is silent. This option is taken into account only if the specified sound source corresponds to the volumeRing constant or to the volumeNotification constant.
volumeVibratorOffDisables the vibrator of the device when receiving a notification or a call. This option is taken into account only if the specified sound source corresponds to the volumeRing constant or to the volumeNotification constant.
volumeVibratorOnEnables the vibrator of the device when receiving a notification or a call. This option is taken into account only if the specified sound source corresponds to the volumeRing constant or to the volumeNotification constant.
Remarks
To modify the sound source associated with the physical button used to set the volume of the device, call VolumePhysicalButton.
Related Examples:
WM System Cross-platform examples (WINDEV Mobile): WM System
[ + ] This application is an example of some of the features of WINDEV Mobile available for Android/iOS.
The following system functions are used:
- NFC
- Multimedia control
- Brightness
- Volume
- Wi-Fi
- Bluetooth
- Toast
- Compass
- Accelerometer
- Camera control
- LED
- Vibration
- Notifications
- Drawing functions
- Internet
Component: wd290android.jar
Versión mínima requerida
  • Versión 17
Comentarios
Haga clic en [Agregar] para publicar un comentario

Última modificación: 22/06/2023

Señalar un error o enviar una sugerencia | Ayuda local