PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
VolumePhysicalButton (Function)
In French: VolumeBoutonPhysique
Identifies or modifies the sound source associated with the physical buttons used to set the volume of the device.
Note: This function can be used in the emulator.
Versions 18 and later
Android Widget This function is now available in Android Widget mode.
New in version 18
Android Widget This function is now available in Android Widget mode.
Android Widget This function is now available in Android Widget mode.
Example
// Modify the sound source associated with the buttons used to set the volume
// in a window containing a multimedia control:
VolumePhysicalButton(MyWindow, volumeMusic)
Syntax

Retrieving the sound source associated with the physical buttons used to set the volume (for a window) Hide the details

<Result> = VolumePhysicalButton([<Window Name>])
<Result>: Integer
Sound source associated with the buttons used to set the volume:
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.
<Window Name>: Optional character string (with or without quotes)
Name or alias of window to use.
If this parameter is not specified or if it corresponds to an empty string (""), the current window will be used.

Modifying the sound source associated with the physical buttons used to set the volume (for a window) Hide the details

<Result> = VolumePhysicalButton(<Window Name> , <Source>)
<Result>: Boolean
  • True if the modification was performed. This modification is taken into account for the specified window and it is not applied anymore when this window is closed.
  • False otherwise. The ErrorOccurred variable is set to True if an error occurs. To find out the error details, use ErrorInfo.
<Window Name>: Character string (with or without quotes)
  • Name or alias of window to use.
  • Empty string ("") to handle the current window.
<Source>: Integer constant
Sound source that must be assigned to the buttons used to set the volume:
volumeAlarmVolume of the alarme.
volumeCallVolume of calls.
volumeDefaultRestore the default source, configured on the phone.
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.
Remarks
  • In some cases, the buttons used to set the volume can act on a sound source other than the one assigned by VolumePhysicalButton (if a call is in progress for example).
  • To modify the setting of the volume for a sound source, use VolumeModify.
  • To find out the value of the current setting for the volume of a sound source, use VolumeGet.
Components
Android wd230android.jar
Minimum required version
  • Version 17
Comments
Click [Add] to post a comment