PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN
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
VolumePhysicalButton (Function)
In french: VolumeBoutonPhysique
Identifies or modifies the sound source associated with the physical buttons used to set the volume of the device.
Remark: This function can be used in the emulator.
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
Name or alias of the window to be used.
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. If an error occurs, the ErrorOccurred variable is set to True. To get the details of the error, use ErrorInfo.
<Window name>: Character string
  • Name or alias of the window to be used.
  • 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.
Component: wd280android.jar
Minimum version required
  • Version 17
Comments
Click [Add] to post a comment