Application program sound control implementation method and electronic equipment

文档序号:1904145 发布日期:2021-11-30 浏览:8次 中文

阅读说明:本技术 一种应用程序声音的控制实现方法以及电子设备 (Application program sound control implementation method and electronic equipment ) 是由 耿炳钰 王立 王龙龙 于 2020-05-26 设计创作,主要内容包括:本申请公开了一种应用程序声音的控制实现方法以及电子设备,用以为每个应用程序提供单独的控制声音方式,通过声音控制方式触发对某个应用程序声音控制开关控制,丰富了对应用程序声音控制触发方式,实现在Android系统中的应用声音单独控制方式。该方法包括:在人机交互界面中展示能占用声音输出设备播放声音的应用程序对应的声音按键,其中声音按键用于控制对应的应用程序的声音播放状态,以及用于展示对应的应用程序当前的声音播放状态;响应在人机交互界面的声音按键上触发的指令,确定声音按键对应的应用程序,并根据触发的指令对应用程序的声音播放状态进行控制。(The application discloses a method for controlling application sound and electronic equipment, which are used for providing an independent sound control mode for each application, controlling a certain application sound control switch by triggering through a sound control mode, enriching the application sound control trigger mode and realizing the independent control mode of the application sound in an Android system. The method comprises the following steps: displaying a sound key corresponding to an application program capable of occupying sound output equipment to play sound in a human-computer interaction interface, wherein the sound key is used for controlling the sound playing state of the corresponding application program and displaying the current sound playing state of the corresponding application program; responding to an instruction triggered on a sound key of the man-machine interaction interface, determining an application program corresponding to the sound key, and controlling the sound playing state of the application program according to the triggered instruction.)

1. An electronic device, comprising:

the display screen is configured to display a sound key corresponding to an application program capable of occupying sound output equipment to play sound in a human-computer interaction interface, wherein the sound key is used for controlling the sound playing state of the corresponding application program and displaying the current sound playing state of the corresponding application program;

a processor configured to:

responding to an instruction triggered on a sound key of a human-computer interaction interface, determining an application program corresponding to the sound key, and controlling a sound playing state of the application program according to the triggered instruction;

a sound output device configured to play sound of the application program.

2. The electronic device of claim 1, wherein the human-machine interface is one of the following human-machine interfaces:

the system comprises a negative screen human-computer interaction interface, a notification bar human-computer interaction interface, a background application human-computer interaction interface and a desktop application human-computer interaction interface.

3. The electronic device of claim 1, wherein the processor is specifically configured to:

determining the sound playing state of the application program capable of occupying the sound output equipment to play sound in the sound state information;

and determining and displaying a sound key corresponding to the application program according to the sound playing state, wherein the sound playing state comprises a mute state and a non-mute state.

4. The electronic device of claim 3, wherein the processor is specifically configured to:

determining an application program identifier corresponding to the sound key according to the triggered instruction;

updating the sound playing state corresponding to the application program identification in the sound state information;

and controlling the sound output equipment to play the sound of the application program based on the sound state information.

5. The electronic device of claim 4, wherein the processor is specifically configured to:

if the sound playing state corresponding to the application program identifier contained in the sound state information is a mute state, controlling the sound output device not to play the sound of the application program; or

If the sound playing state corresponding to the application program identifier contained in the sound state information is a non-mute state, controlling the sound output device to play the sound of the application program at a target sound volume, wherein the target sound volume is a preset sound volume or a sound volume contained in the sound state information.

6. An electronic device, comprising:

the display screen is configured to display a sound key corresponding to an application program capable of occupying sound output equipment to play sound in a human-computer interaction interface, and display sound indication information in a display area of the sound key corresponding to the application program, wherein the sound key is used for controlling a sound playing state of the corresponding application program, and the sound indication information is used for displaying a current sound playing state of the corresponding application program;

a processor configured to:

responding to an instruction triggered on a sound key of a human-computer interaction interface, determining an application program corresponding to the sound key, and controlling a sound playing state of the application program according to the triggered instruction;

a sound output device configured to play sound of the application program.

7. A method for realizing control of application program sound is characterized by comprising the following steps:

displaying a sound key corresponding to an application program capable of occupying sound output equipment to play sound in a human-computer interaction interface, wherein the sound key is used for controlling the sound playing state of the corresponding application program and displaying the current sound playing state of the corresponding application program;

responding to an instruction triggered on a sound key of a human-computer interaction interface, determining an application program corresponding to the sound key, and controlling the sound playing state of the application program according to the triggered instruction.

8. The method of claim 7, wherein the human-machine interface is one of the following human-machine interfaces:

the system comprises a negative screen human-computer interaction interface, a notification bar human-computer interaction interface, a background application human-computer interaction interface and a desktop application human-computer interaction interface.

9. The method according to claim 7, wherein the displaying of the sound key corresponding to the application program capable of occupying the sound output device to play the sound in the human-computer interaction interface comprises:

determining the sound playing state of the application program capable of occupying the sound output equipment to play sound in the sound state information;

and determining and displaying a sound key corresponding to the application program according to the sound playing state, wherein the sound playing state comprises a mute state and a non-mute state.

10. A method for realizing control of application program sound is characterized by comprising the following steps:

displaying a sound key corresponding to an application program capable of occupying sound output equipment to play sound in a human-computer interaction interface, and displaying sound indication information in a display area of the sound key corresponding to the application program, wherein the sound key is used for controlling the sound playing state of the corresponding application program, and the sound indication information is used for displaying the current sound playing state of the corresponding application program;

responding to an instruction triggered on a sound key of a human-computer interaction interface, determining an application program corresponding to the sound key, and controlling the sound playing state of the application program according to the triggered instruction.

Technical Field

The present disclosure relates to the field of information technologies, and in particular, to a method for controlling application program sound and an electronic device.

Background

Currently, many applications sound after being opened, such as an opening prompt tone, a message notification prompt tone, and an audio-video sound provided by the application. The existing Android system controls all types of sounds which are the same together. For example, MUSIC, video, web sound, game sound, and custom sound in various applications are generally output in MUSIC (media sound) type. When the user adjusts the volume of the sound, this type of sound is adjusted simultaneously. For example, when a user listens to music through a music player application, the user browses a web page at the same time, and if audio/video sounds which can be played in the web page are automatically played. In this case, when the user wants to close only the web page sound, the user can only adjust the page volume by closing the web page or the control provided in the web page, and if the web service does not provide the corresponding volume control, the user cannot process the web page sound alone on the system side. Similarly, if there is a music player, a game, or other application that wants to turn off sound while playing the sound, the application can only be turned off by the mute control method provided by the music player, the game, or other application, or the operation of the music player, the game, or other application is stopped, and the system cannot control both the application and the sound. Therefore, different application programs in the prior art provide respective sound control triggering modes, but the system has no unified mode for controlling the application sound.

Disclosure of Invention

The application program sound control implementation method and the electronic device are provided in the exemplary embodiment of the application program sound control implementation method, a separate control channel and a separate control sound key are provided for each application program, sound control is performed on a certain application program through sound key triggering, and the application program sound control triggering mode is enriched.

According to a first aspect of the exemplary embodiments, there is provided a method for implementing control of application sound, including:

displaying a sound key corresponding to an application program capable of occupying sound output equipment to play sound in a human-computer interaction interface, wherein the sound key is used for controlling the sound playing state of the corresponding application program and displaying the current sound playing state of the corresponding application program;

responding to an instruction triggered on a sound key of the man-machine interaction interface, determining an application program corresponding to the sound key, and controlling the sound playing state of the application program according to the triggered instruction.

In the above embodiment, an application sound control triggering manner is provided, where a sound key that can occupy a sound playing state of an application that the sound output device plays sound is displayed in the human-computer interaction interface, the sound key can also reflect a current sound playing state of a corresponding application, and a user can trigger an instruction for controlling the sound playing state of an application. The sound of the application program is controlled through the sound key corresponding to the application program, and the sound control efficiency is improved.

In some exemplary embodiments, the human-machine interface is one of the following human-machine interfaces:

the system comprises a negative screen human-computer interaction interface, a notification bar human-computer interaction interface, a background application human-computer interaction interface and a desktop application human-computer interaction interface.

In the above embodiment, the sound buttons of the sound playing states of the application programs capable of occupying the sound output device to play the sound are provided for the user in the various types of human-computer interaction interfaces, so that the switching operation times of the user are reduced, and the flexibility of sound control is improved.

In some exemplary embodiments, displaying, in the human-computer interaction interface, a sound key corresponding to an application program capable of occupying a sound output device to play sound includes:

determining the sound playing state of an application program which can occupy the sound output equipment to play sound in the sound state information;

and determining and displaying a sound key corresponding to the application program according to the sound playing state, wherein the sound playing state comprises a mute state and a non-mute state.

In the above embodiment, the sound keys are determined according to the sound playing states of the corresponding application programs, and the sound keys can enable a user to intuitively know the sound playing states of the corresponding application programs, so that the operation times of the user for confirming the sound playing states of the application programs are reduced, and the sound control efficiency is improved.

In some exemplary embodiments, controlling the sound playing state of the application according to the triggered instruction includes:

determining an application program identifier corresponding to the sound key according to the triggered instruction;

updating the sound playing state corresponding to the application program identifier in the sound state information;

and controlling the sound output device to play the sound of the application program based on the sound state information.

In the above embodiment, in response to an instruction triggered by a user, the sound state information of the controlled application program is dynamically updated, and meanwhile, the sound key of the application program also changes along with the change of the sound state information, so that the sound playing state of the application program after the instruction is triggered is accurately fed back to the user, and the control of the sound of the application program through the triggering of the sound key corresponding to the application program is realized without affecting the sound playing state of the sound of other application programs.

In some exemplary embodiments, controlling the sound output device to play the sound of the application program based on the corresponding sound state information of the application program identification includes:

if the sound playing state corresponding to the application program identifier contained in the sound state information is a mute state, controlling the sound output equipment not to play the sound of the application program; or

And if the sound playing state corresponding to the application program identifier contained in the sound state information is a non-mute state, controlling the sound output equipment to play the sound of the application program at the target sound volume, wherein the target sound volume is a preset sound volume or the sound volume contained in the sound state information.

In the above embodiment, the sound playing state of the application program is a mute state, and the sound output device does not play the sound of the application program, so as to achieve the effect of turning off the sound of the application program. The sound playing state of the application program is a non-mute state, the sound output equipment plays the sound with the sound volume of the application program set by a user or plays the sound with the default sound volume, and the sound of the application program is adjusted by triggering the sound key corresponding to the application program without influencing the sound playing state of the sound of other application programs.

In some exemplary embodiments, the method for implementing control of application sound further includes:

determining the sound volume of the application program in the sound state information;

determining and displaying a volume control key corresponding to the application program according to the sound volume;

and updating the sound playing state and the sound volume corresponding to the application program identifier in the sound state information according to the triggered instruction.

In the above embodiment, the sound state information of the application program may further include sound volume, and the volume control key of the application program is displayed according to the sound volume, so that the user may control the sound volume of the application program through the volume control key, thereby further improving the sound control efficiency.

According to a second aspect of the exemplary embodiments, there is provided a method for implementing control of application sound, including:

displaying a sound key corresponding to an application program which can occupy sound output equipment to play sound in a man-machine interaction interface, and displaying sound indication information in a display area of the sound key corresponding to the application program, wherein the sound key is used for controlling the sound playing state of the corresponding application program, and the sound indication information is used for displaying the current sound playing state of the corresponding application program;

responding to an instruction triggered on a sound key of a human-computer interaction interface, determining an application program corresponding to the sound key, and controlling a sound playing state of the application program according to the triggered instruction;

a sound output device configured to play sound of the application program.

In the above embodiment, the sound key capable of controlling the sound playing state of the application program is displayed in the human-computer interaction interface, and an instruction for controlling the sound playing state of the application program through triggering of the sound key is provided for a user, so that the sound playing states of different application programs are independently controlled. In addition, sound indication information reflecting the current sound playing state of the application program is also displayed in the display area of the sound key, so that a user can directly know the current sound playing state of the application program through the displayed sound indication information, and the tedious operation of checking the sound playing state of the application program is reduced.

In some exemplary embodiments, the human-machine interface is one of the following human-machine interfaces:

the system comprises a negative screen human-computer interaction interface, a notification bar human-computer interaction interface, a background application human-computer interaction interface and a desktop application human-computer interaction interface.

In the above embodiment, the sound buttons of the sound playing states of the application programs capable of occupying the sound output device to play the sound are provided for the user in the various types of human-computer interaction interfaces, so that the switching operation times of the user are reduced, and the flexibility of sound control is improved.

In some exemplary embodiments, displaying, in the human-computer interaction interface, a sound key corresponding to an application program capable of occupying a sound output device to play sound includes:

determining the sound playing state of an application program which can occupy the sound output equipment to play sound in the sound state information;

and determining and displaying sound indication information corresponding to the application program according to the sound playing state, wherein the sound playing state comprises a mute state and a non-mute state.

In the above embodiment, the sound indication information is determined according to the sound playing state of the application program corresponding to the sound indication information, and the sound indication information enables a user to visually know the sound playing state of the corresponding application program, so that the operation frequency of the user for determining the sound playing state of the application program is reduced, and the sound control efficiency is improved.

In some exemplary embodiments, controlling the sound playing state of the application according to the triggered instruction includes:

determining an application program identifier corresponding to the sound key according to the triggered instruction;

updating the sound playing state corresponding to the application program identifier in the sound state information;

and controlling the sound output device to play the sound of the application program based on the sound state information.

In the above embodiment, in response to an instruction triggered by a user, the sound state information of the controlled application program is dynamically updated, and meanwhile, the sound indication information of the application program also changes along with the change of the sound state information, so that the sound playing state of the application program after the instruction is triggered is accurately fed back to the user, and the control of the sound of the application program is realized through the triggering of the sound key corresponding to the application program, without affecting the sound playing state of the sound of other application programs.

In some exemplary embodiments, controlling the sound output device to play the sound of the application program based on the corresponding sound state information of the application program identification includes:

if the sound playing state corresponding to the application program identifier contained in the sound state information is a mute state, controlling the sound output equipment not to play the sound of the application program; or

And if the sound playing state corresponding to the application program identifier contained in the sound state information is a non-mute state, controlling the sound output equipment to play the sound of the application program at the target sound volume, wherein the target sound volume is a preset sound volume or the sound volume contained in the sound state information.

In the above embodiment, the sound playing state of the application program is a mute state, and the sound output device does not play the sound of the application program, so as to achieve the effect of turning off the sound of the application program. The sound playing state of the application program is a non-mute state, the sound output equipment plays the sound with the sound volume of the application program set by a user or plays the sound with the default sound volume, and the sound of the application program is adjusted by triggering the sound key corresponding to the application program without influencing the sound playing state of the sound of other application programs.

In some exemplary embodiments, the method for implementing control of application sound further includes:

determining the sound volume of the application program in the sound state information;

determining and displaying a volume control key corresponding to the application program according to the sound volume;

and updating the sound playing state and the sound volume corresponding to the application program identifier in the sound state information according to the triggered instruction.

In the above embodiment, the sound state information of the application program may further include sound volume, and the volume control key of the application program is displayed according to the sound volume, so that the user may control the sound volume of the application program through the volume control key, thereby further improving the sound control efficiency.

According to a third aspect of the exemplary embodiments, there is provided an electronic apparatus comprising:

the display screen is configured to display a sound key corresponding to an application program capable of occupying sound output equipment to play sound in the human-computer interaction interface, wherein the sound key is used for controlling the sound playing state of the corresponding application program and displaying the current sound playing state of the corresponding application program;

a processor configured to:

responding to an instruction triggered on a sound key of a human-computer interaction interface, determining an application program corresponding to the sound key, and controlling a sound playing state of the application program according to the triggered instruction;

a sound output device configured to play sound of the application program.

In some exemplary embodiments, the human-machine interface is one of the following human-machine interfaces:

the system comprises a negative screen human-computer interaction interface, a notification bar human-computer interaction interface, a background application human-computer interaction interface and a desktop application human-computer interaction interface.

In some exemplary embodiments, the processor is specifically configured to:

determining the sound playing state of an application program which can occupy the sound output equipment to play sound in the sound state information;

and determining and displaying a sound key corresponding to the application program according to the sound playing state, wherein the sound playing state comprises a mute state and a non-mute state.

In some exemplary embodiments, the processor is specifically configured to:

determining an application program identifier corresponding to the sound key according to the triggered instruction;

updating the sound playing state corresponding to the application program identifier in the sound state information;

and controlling the sound output device to play the sound of the application program based on the sound state information.

In some exemplary embodiments, the processor is specifically configured to:

if the sound playing state corresponding to the application program identifier contained in the sound state information is a mute state, controlling the sound output equipment not to play the sound of the application program; or

And if the sound playing state corresponding to the application program identifier contained in the sound state information is a non-mute state, controlling the sound output equipment to play the sound of the application program at the target sound volume, wherein the target sound volume is a preset sound volume or the sound volume contained in the sound state information.

In some exemplary embodiments, the processor is further configured to:

determining the sound volume of the application program in the sound state information;

determining and displaying a volume control key corresponding to the application program according to the sound volume;

and updating the sound playing state and the sound volume corresponding to the application program identifier in the sound state information according to the triggered instruction.

According to a fourth aspect of the exemplary embodiments, there is provided an electronic device comprising:

the display screen is configured to display a sound key corresponding to an application program which can occupy the sound output equipment to play sound in the human-computer interaction interface, and display sound indication information in a display area of the sound key corresponding to the application program, wherein the sound key is used for controlling the sound playing state of the corresponding application program, and the sound indication information is used for displaying the current sound playing state of the corresponding application program;

a processor configured to:

responding to an instruction triggered on a sound key of a human-computer interaction interface, determining an application program corresponding to the sound key, and controlling a sound playing state of the application program according to the triggered instruction;

a sound output device configured to play sound of the application program.

In some exemplary embodiments, the human-machine interface is one of the following human-machine interfaces:

the system comprises a negative screen human-computer interaction interface, a notification bar human-computer interaction interface, a background application human-computer interaction interface and a desktop application human-computer interaction interface.

In some exemplary embodiments, the processor is specifically configured to:

determining the sound playing state of an application program which can occupy the sound output equipment to play sound in the sound state information;

and determining and displaying sound indication information corresponding to the application program according to the sound playing state, wherein the sound playing state comprises a mute state and a non-mute state.

In some exemplary embodiments, the processor is specifically configured to:

determining an application program identifier corresponding to the sound key according to the triggered instruction;

updating the sound playing state corresponding to the application program identifier in the sound state information;

and controlling the sound output device to play the sound of the application program based on the sound state information.

In some exemplary embodiments, the processor is specifically configured to:

if the sound playing state corresponding to the application program identifier contained in the sound state information is a mute state, controlling the sound output equipment not to play the sound of the application program; or

And if the sound playing state corresponding to the application program identifier contained in the sound state information is a non-mute state, controlling the sound output equipment to play the sound of the application program at the target sound volume, wherein the target sound volume is a preset sound volume or the sound volume contained in the sound state information.

In some exemplary embodiments, the processor is further configured to:

determining the sound volume of the application program in the sound state information;

determining and displaying a volume control key corresponding to the application program according to the sound volume;

and updating the sound playing state and the sound volume corresponding to the application program identifier in the sound state information according to the triggered instruction.

According to a fifth aspect of the exemplary embodiments, there is provided an apparatus for controlling sound of an application, including:

the display unit is used for displaying a sound key corresponding to an application program which can occupy the sound output equipment to play sound in the human-computer interaction interface, wherein the sound key is used for controlling the sound playing state of the corresponding application program and displaying the current sound playing state of the corresponding application program;

the processing unit responds to an instruction triggered on a sound key of the human-computer interaction interface, determines an application program corresponding to the sound key and controls the sound playing state of the application program according to the triggered instruction;

and the playing unit is used for playing the sound of the application program.

In some exemplary embodiments, the human-machine interface is one of the following human-machine interfaces:

the system comprises a negative screen human-computer interaction interface, a notification bar human-computer interaction interface, a background application human-computer interaction interface and a desktop application human-computer interaction interface.

In some exemplary embodiments, the processing unit is specifically configured to:

determining the sound playing state of an application program which can occupy the sound output equipment to play sound in the sound state information;

and determining and displaying a sound key corresponding to the application program according to the sound playing state, wherein the sound playing state comprises a mute state and a non-mute state.

In some exemplary embodiments, the processing unit is specifically configured to:

determining an application program identifier corresponding to the sound key according to the triggered instruction;

updating the sound playing state corresponding to the application program identifier in the sound state information;

and controlling the sound output device to play the sound of the application program based on the sound state information.

In some exemplary embodiments, the processing unit is specifically configured to:

if the sound playing state corresponding to the application program identifier contained in the sound state information is a mute state, controlling the sound output equipment not to play the sound of the application program; or

And if the sound playing state corresponding to the application program identifier contained in the sound state information is a non-mute state, controlling the sound output equipment to play the sound of the application program at the target sound volume, wherein the target sound volume is a preset sound volume or the sound volume contained in the sound state information.

In some exemplary embodiments, the processing unit is specifically configured to:

determining the sound volume of the application program in the sound state information;

determining and displaying a volume control key corresponding to the application program according to the sound volume;

and updating the sound playing state and the sound volume corresponding to the application program identifier in the sound state information according to the triggered instruction.

According to a sixth aspect of the exemplary embodiments, there is provided an apparatus for controlling sound of an application, including:

the display unit is used for displaying a sound key corresponding to an application program which can occupy the sound output equipment to play sound in the human-computer interaction interface and displaying sound indication information in a display area of the sound key corresponding to the application program, wherein the sound key is used for controlling the sound playing state of the corresponding application program, and the sound indication information is used for displaying the current sound playing state of the corresponding application program;

the processing unit responds to an instruction triggered on a sound key of the human-computer interaction interface, determines an application program corresponding to the sound key and controls the sound playing state of the application program according to the triggered instruction;

and the playing unit is used for playing the sound of the application program.

In some exemplary embodiments, the human-machine interface is one of the following human-machine interfaces:

the system comprises a negative screen human-computer interaction interface, a notification bar human-computer interaction interface, a background application human-computer interaction interface and a desktop application human-computer interaction interface.

In some exemplary embodiments, the processing unit is specifically configured to:

determining the sound playing state of an application program which can occupy the sound output equipment to play sound in the sound state information;

and determining and displaying sound indication information corresponding to the application program according to the sound playing state, wherein the sound playing state comprises a mute state and a non-mute state.

In some exemplary embodiments, the processing unit is specifically configured to:

determining an application program identifier corresponding to the sound key according to the triggered instruction;

updating the sound playing state corresponding to the application program identifier in the sound state information;

and controlling the sound output device to play the sound of the application program based on the sound state information.

In some exemplary embodiments, the processing unit is specifically configured to:

if the sound playing state corresponding to the application program identifier contained in the sound state information is a mute state, controlling the sound output equipment not to play the sound of the application program; or

And if the sound playing state corresponding to the application program identifier contained in the sound state information is a non-mute state, controlling the sound output equipment to play the sound of the application program at the target sound volume, wherein the target sound volume is a preset sound volume or the sound volume contained in the sound state information.

In some exemplary embodiments, the processing unit is specifically configured to:

determining the sound volume of the application program in the sound state information;

determining and displaying a volume control key corresponding to the application program according to the sound volume;

and updating the sound playing state and the sound volume corresponding to the application program identifier in the sound state information according to the triggered instruction.

According to a seventh aspect of the exemplary embodiments, a computer-readable storage medium, when instructions in the storage medium are executed by an actuator of an electronic device, enables the electronic device to execute any one of the above-mentioned control implementation methods of application sound.

In addition, for technical effects brought by any one implementation manner of the third to seventh aspects, reference may be made to technical effects brought by different implementation manners of the first and second aspects, and details are not described here. On the basis of the common knowledge in the field, the above preferred conditions can be combined randomly to obtain the preferred embodiments of the application.

Drawings

In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to these drawings without inventive exercise.

Fig. 1 schematically illustrates a structural diagram of an electronic device provided in an embodiment of the present application;

FIG. 2 illustrates a negative screen human-computer interaction interface diagram;

FIG. 3 illustrates a notification bar human-machine interaction interface diagram;

FIG. 4 is a diagram illustrating a background application human-machine interaction interface;

FIG. 5 illustrates a desktop application human-machine interaction interface diagram;

FIG. 6 illustrates a schematic view of a volume control key;

fig. 7 is a block diagram exemplarily showing a hardware configuration of an electronic device;

fig. 8 illustrates a block diagram of a software structure of an electronic device.

FIG. 9 is a schematic flow chart diagram illustrating a method for implementing control of application sound;

FIG. 10 is a schematic flow chart diagram illustrating another method for implementing control of application sound;

FIG. 11 is a schematic diagram illustrating an apparatus for implementing control of application sound;

fig. 12 is a schematic diagram illustrating another control implementation device for application sound.

Detailed Description

The technical solution in the embodiments of the present application will be described in detail and removed with reference to the accompanying drawings. In the description of the embodiments herein, "/" means "or" unless otherwise specified, for example, a/B may mean a or B; "and/or" in the text is only an association relationship describing an associated object, and means that three relationships may exist, for example, a and/or B may mean: three cases of a alone, a and B both, and B alone exist, and in addition, "a plurality" means two or more than two in the description of the embodiments of the present application.

In the following, the terms "first", "second" are used for descriptive purposes only and are not to be understood as implying or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature, and in the description of embodiments of the application, unless stated otherwise, "plurality" means two or more.

Currently, in the Android SYSTEM, streaming management is adopted for VOICE control, and the VOICEs played by the Android SYSTEM are classified into several categories, such as VOICE-CALL, SYSTEM VOICE, RING, ALARM, NOTIFICATION VOICE, BLUETOOTH input VOICE, SYSTEM-initiated VOICE, DTMF, TTS (text to speech) stream, and the like. In the prior art, a user turns off sound through a mute key provided by a system, and in the process of controlling sound of an application program, sound of other application programs belonging to the same type as the sound of the application program is also controlled in the same way. In order to solve the problem, the application provides sound keys of application programs which can occupy sound output equipment to play sound, and the sound keys are used for triggering and controlling sound playing of a single application program, and provides a method for controlling and realizing sound of the application program.

The electronic device in the embodiment of the application can be a mobile phone, a tablet computer, a notebook computer, a television and the like. The sound output device in the embodiment of the present application may be a speaker in a mobile phone, a tablet computer, a notebook computer, and a television. Or the sound output device can be connected with the electronic device in a wireless connection mode or a wired connection mode, such as an earphone, a sound box and the like. The sound output device with the sound playing function can also be connected with the electronic device in a wireless connection mode or a wired connection mode, such as an intelligent screen projection device, an augmented reality device or a virtual reality device.

In one example, the electronic device provided by the present application is a user device such as a mobile phone, a tablet computer, and a notebook computer, and the sound output device is a speaker in the mobile phone or the tablet computer. Fig. 1 is a block diagram illustrating a hardware configuration of an electronic device that can implement the application sound control implementation method of the present application. As shown in fig. 1, the electronic device 10 includes: a Radio Frequency (RF) circuit 110, a memory 120, a display unit 130, a camera 140, an audio circuit 150, a Wireless Fidelity (Wi-Fi) module 160, a processor 170, and a power supply 180.

The RF circuit 110 may be used for receiving and transmitting signals during information transmission and reception or during a call, and may receive downlink data of a base station and then send the downlink data to the processor 170 for processing; the uplink data may be transmitted to the base station. Typically, the RF circuitry includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, and the like.

The memory 120 may be used to store software programs and data. The processor 170 executes various functions of the electronic device 10 and data processing by executing software programs or data stored in the memory 120. The memory 120 may include high speed random access memory and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device. The memory 120 stores an operating system that enables the electronic device 10 to operate. In the present application, the memory 120 may store an operating system and various application programs, and may also store a code for executing a sound key corresponding to an application program that displays a plurality of applications capable of occupying a speaker to play sound in the human-computer interaction interface in the above embodiments of the present application, and a code for executing an instruction triggered on the sound key of the human-computer interaction interface, determining the application program corresponding to the sound key, and controlling a sound playing state of the application program according to the triggered instruction.

The display unit 130 may be used to receive input numeric or character information and generate signal input related to user settings and function control of the electronic device 10, and specifically, the display unit 130 may include a touch screen 131 disposed on the front of the electronic device 10 and capable of collecting touch operations of a user thereon or nearby, such as clicking a button, dragging a scroll box, and the like.

The display unit 130 may also be used to display information input by or provided to the user and a Graphical User Interface (GUI) of various menus of the electronic device 10. Specifically, the display unit 130 may include a display screen 132 disposed on a front surface of the electronic device 10. The display screen 132 may be configured in the form of a liquid crystal display, a light emitting diode, or the like. In the present application, the display unit 130 may display an application program and a corresponding sound key.

The touch screen 131 may cover the display screen 132, or the touch screen 131 and the display screen 132 may be integrated to implement the input and output functions of the electronic device 10, and after the integration, the touch screen may be referred to as a touch display screen for short. The user can issue an instruction to control the sound of the application program through the touch screen 131.

The camera 140 may be used to capture still images or video. The object generates an optical image through the lens and projects the optical image to the photosensitive element. The photosensitive element may be a Charge Coupled Device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The light sensing elements convert the light signals into electrical signals which are then passed to the processor 170 for conversion into digital image signals. The camera 140 may collect gestures or motions of the sound of the user controlling the application program, and recognize commands of the sound of the control application program sent by the user through an image recognition technology.

The audio circuitry 150, speaker 151, and microphone 152 may provide an audio interface between a user and the electronic device 10. The audio circuit 150 may transmit the electrical signal converted from the received audio data to the speaker 151, and the audio signal is converted by the speaker 151 to be output, so as to realize playing the sound of the application program.

The electronic device 10 may also be configured with a volume button for adjusting the volume of the sound signal. On the other hand, the microphone 152 converts the collected sound signal into an electrical signal, converts the electrical signal into audio data after being received by the audio circuit 150, and outputs the audio data to the RF circuit 110 to be transmitted to, for example, another terminal or outputs the audio data to the memory 120 for further processing. In the present application, the microphone 152 may capture voice commands of the user controlling the sound of the application.

Wi-Fi is a short-range wireless transmission technology, and the electronic device 10 may help a user send and receive e-mails, browse web pages, access streaming media, etc. through the Wi-Fi module 160, which provides wireless broadband internet access for the user.

The processor 170 is a control center of the electronic device 10, connects various parts of the entire device using various interfaces and lines, and performs various functions of the electronic device 10 and processes data by running or executing software programs stored in the memory 120 and calling data stored in the memory 120.

In some embodiments, processor 170 may include one or more processing units; the processor 170 may also integrate an application processor, which mainly handles operating systems, user interfaces, applications, etc., and a baseband processor, which mainly handles wireless communications. It will be appreciated that the baseband processor described above may not be integrated into the processor 170. In the present application, the processor 170 may run an operating system, an application program, a user interface display, a touch response, and a sound control method of the application program according to the embodiment of the present application. Further, the processor 170 is coupled with the display unit 130.

The electronic device 10 also includes a power source 180 (such as a battery) for powering the various components. The power supply may be logically coupled to the processor 170 through a power management system to manage charging, discharging, and power consumption through the power management system. The electronic device 10 may also be configured with power buttons for powering the terminal on and off, and for locking the screen.

Fig. 2 is a block diagram of a software configuration of the electronic device 10 according to the embodiment of the present application. The layered architecture divides the software into several layers, each layer having a clear role and division of labor. The layers communicate with each other through a software interface. In some embodiments, the Android system is divided into four layers, an application layer, an application framework layer, an Android runtime (Android runtime) and system library, and a kernel layer from top to bottom.

The application layer may include a series of application packages. As shown in fig. 2, the application package may include applications such as camera, gallery, calendar, phone call, map, navigation, WLAN, bluetooth, music, video, short message, etc.

The application framework layer provides an Application Programming Interface (API) and a programming framework for the application program of the application layer. The application framework layer includes a number of predefined functions.

As shown in FIG. 2, the application framework layers may include a window manager, content provider, view system, phone manager, resource manager, notification manager, and the like.

The window manager is used for managing window programs. The window manager can obtain the size of the display screen, judge whether a status bar exists, lock the screen, intercept the screen and the like.

The content provider is used to store and retrieve data and make it accessible to applications. The data may include video, images, audio, calls made and received, browsing history and bookmarks, phone books, etc.

The view system includes visual controls such as controls to display text, controls to display pictures, and the like. The view system may be used to build applications. The display interface may be composed of one or more views. For example, the display interface including the short message notification icon may include a view for displaying text and a view for displaying pictures.

The phone manager is used to provide communication functions for the electronic device 10. Such as management of call status (including on, off, etc.).

The resource manager provides various resources for the application, such as localized strings, icons, pictures, layout files, video files, and the like.

The notification manager enables the application to display notification information in the status bar, can be used to convey notification-type messages, can disappear automatically after a short dwell, and does not require user interaction. Such as a notification manager used to inform download completion, message alerts, etc. The notification manager may also be a notification that appears in the form of a chart or scroll bar text at the top status bar of the system, such as a notification of a background running application, or a notification that appears on the screen in the form of a dialog window. For example, prompting text information in the status bar, sounding a prompt tone, vibrating the electronic device, flashing an indicator light, etc.

The Android Runtime comprises a core library and a virtual machine. The Android runtime is responsible for scheduling and managing an Android system.

The core library comprises two parts: one part is a function which needs to be called by java language, and the other part is a core library of android.

The application layer and the application framework layer run in a virtual machine. And executing java files of the application program layer and the application program framework layer into a binary file by the virtual machine. The virtual machine is used for performing the functions of object life cycle management, stack management, thread management, safety and exception management, garbage collection and the like.

The system library may include a plurality of functional modules. For example: surface managers (surface managers), Media Libraries (Media Libraries), three-dimensional graphics processing Libraries (e.g., OpenGL ES), 2D graphics engines (e.g., SGL), and the like.

The surface manager is used to manage the display subsystem and provide fusion of 2D and 3D layers for multiple applications.

The media library supports a variety of commonly used audio, video format playback and recording, and still image files, among others. The media library may support a variety of audio-video encoding formats, such as MPEG4, h.264, MP3, AAC, AMR, JPG, PNG, and the like.

The three-dimensional graphic processing library is used for realizing three-dimensional graphic drawing, image rendering, synthesis, layer processing and the like.

The 2D graphics engine is a drawing engine for 2D drawing.

The kernel layer is a layer between hardware and software. The inner core layer at least comprises a display driver, a camera driver, an audio driver and a sensor driver.

The following describes exemplary work flows of software and hardware of the electronic device 10 in connection with a sound control scenario of an application. The user may perform voice control of the application by touching the touch screen of the electronic device 10.

When the touch screen 131 receives a touch operation, a corresponding hardware interrupt is issued to the kernel layer. The kernel layer processes the touch operation into an original input event (including touch coordinates, a time stamp of the touch operation, and other information). The raw input events are stored at the kernel layer. And the application program framework layer acquires the original input event from the kernel layer and identifies the control corresponding to the input event. Taking the touch operation as a touch click operation, taking a control corresponding to the click operation as a sound key control of a target application program as an example, calling an IMediaPlaybackmonitor interface of an application framework layer, modifying a data structure MediaPlaybackInfo recording sound state information, transmitting an application program identifier and a sound playing state to a view system through a setMute (Boolean mute) function in the IMediaPlaybackmonitor interface, notifying a manager to display a sound key of the application program in a man-machine interaction interface, transmitting an audio playing inlet to start audio driving through calling an inner core layer, and playing the sound of the application program or playing the sound of the application program in a mute way through a loudspeaker 151.

Fig. 3 schematically shows a structural diagram of another electronic device, and the electronic device 10 includes a display 301, a processor 302 and a sound output device 303. The following describes an embodiment specifically by taking the electronic device 10 as an example. It should be understood that the electronic device 10 shown in fig. 3 is merely an example, and that the electronic device 10 may have more or fewer components than shown in fig. 3, may combine two or more components, or may have a different configuration of components.

In a practical application scenario, a user may interact with the electronic device through hand touch operation. The user may also interact with the electronic device through a secondary control device, such as a stylus, mouse, etc., that is wired or wirelessly connected to the electronic device. If the microphone is arranged in the electronic equipment, the user can interact with the electronic equipment through voice control. If the camera device is arranged in the electronic equipment, the user can interact with the electronic equipment through gesture control.

In order to control the sound of the application program in a targeted manner, the display screen 301 is configured to display, in the human-computer interaction interface, a sound key corresponding to the application program that can occupy the sound output device 303 to play the sound, where the sound key is used to control the sound playing state of the corresponding application program and to display the current sound playing state of the corresponding application program.

The method aims to reduce the operation times of frequently switching the interface in the process of carrying out voice control by a user. The sound keys of the application can be displayed in various human-computer interaction interfaces, such as a negative screen human-computer interaction interface, a notification bar human-computer interaction interface, a background application human-computer interaction interface and a desktop application human-computer interaction interface. The user can switch to various human-computer interaction interfaces according to preset interaction operation, and the specific way for switching to the human-computer interaction interface through which interaction operation is performed by the user is not limited in the application.

Fig. 4 shows a negative screen human-computer interaction interface, and an application display area 401 and other content display areas 402 can be included in the negative screen human-computer interaction interface 40. The application program display area 401 may display a name 403 of the application program and a sound key for displaying a current sound playing state of the application program, for example, when the current sound playing state of the application program is silent playing, the sound key corresponding to the application program is the sound key 404 shown in fig. 4, and when the current sound playing state of the application program is non-silent playing, the sound key corresponding to the application program is the sound key 405 shown in fig. 4. In addition, the sound key of the application provided by the application can also be displayed above the icon of the application, for example, the sound key 407 corresponding to the webpage APP is displayed on the webpage APP icon 406, and since the user can intuitively determine the application according to the application icon 406, the name 403 of the application may not be displayed when the application icon 406 is displayed. Note that an icon of an application program that cannot occupy the sound output device 303 to play sound may be displayed in the application program display area 401.

Fig. 5 shows a notification bar man-machine interface, when the user switches to the notification bar man-machine interface 50 through a preset operation, a preset area in the notification bar man-machine interface 50 can display a sound key in the application program display area 401 in the negative screen man-machine interface 40 scene as described above in the same manner.

In one possible approach, in the application sound key display area 501 of the notification bar human-machine interface 50, an application name 502, a sound key for displaying the current sound playing status of the application, such as a close sound key 503 and an open sound key 504, may be displayed. If the current sound playing status of the application is a mute status, the sound-off button 505 may be highlighted to prompt the user that the current sound playing status of the application is a mute status. If the current sound playing state of the application program is the non-silent state, the sound button can be highlighted to prompt the user that the current sound playing state of the application program is the non-silent state.

In a possible manner, the sound key may be only used to control the sound playing state of the corresponding application program, and the sound indication information is used to show the current sound playing state of the corresponding application program, where the sound indication information is in the display area of the sound key corresponding to the application program.

In an actual application scenario, the sound indication information may be an icon, a character, or the like, and if the sound indication information is a character, for example, in the application sound key display area 506 of the notification bar human-computer interaction interface 50, the name of the application program occupying the sound output device and the character 507 of the sound indication information "playing in a mute state" may be displayed, and the user is prompted by the character that the current sound playing state of the application program is in a mute state, or certainly, the user is prompted by the character of the sound indication information "playing in a non-mute state" that the current sound playing state of the application program is in a non-mute state.

If the sound indication information is an icon, for example, in the application sound key display area 506 of the notification bar human-computer interaction interface 50, an application name occupying the sound output device and an icon 508 of the sound indication information "horn graphic with X mark" are displayed, and the user is prompted by the icon that the current sound playing state of the application is a mute state, and of course, the user may also be prompted by the icon of the sound indication information "horn graphic without X mark" that the current sound playing state of the application is a non-mute playing.

The audio instruction information may be an icon in which a graphic and a character are combined, or may be an icon with a pattern such as a graphic frame. The display of the voice indication information is not limited in the notification bar man-machine interaction interface, and can also be implemented in other man-machine interaction interfaces.

In a possible manner, if the sound playing status of any application program currently occupying the sound output device 303 to play sound is non-silent playing, the sound button 405 corresponding to the non-silent playing status of the sound playing status may be displayed in a status bar in any human-computer interaction interface, so as to prompt the user that an application program currently occupying the non-silent playing exists.

Fig. 6 shows a background application human-computer interaction interface, when a user switches to the background application human-computer interaction interface 60 through a preset operation, generally, an application name 601 and a corresponding background interface 602 are shown in the background application human-computer interaction interface 60, a first sound key 603 may be shown on the background interface 602 corresponding to the application in a floating manner or an embedded manner, the sound key 603 may reflect that a current sound playing state of a web page APP is a silent playing, and a second sound key 604 may reflect that a current sound playing state of a music APP is an un-silent playing.

Fig. 7 shows a desktop application human-computer interaction interface, a user switches to the desktop application human-computer interaction interface 70 for displaying all applications through a preset operation, for example, a default home screen interface of a system, or one or more home screen interfaces set by the user, an icon 701 of an application and an identifier of the application are usually displayed in the desktop application human-computer interaction interface 70, a sound key 702 of the application may be displayed on the icon 701 corresponding to the application in a floating manner, or in response to an operation of pressing a certain application icon 701 by a long time, a sound key 702 of the application is displayed, and the sound key 702 may reflect a current sound playing state of the application. It should be noted that the application program (for example, the short message) that cannot occupy the sound output device 303 to play the sound may not display the sound key, or display the sound key corresponding to the sound playing state being the mute state.

It should be noted that, when the electronic device 10 determines that the sound key corresponding to the application program is displayed in the human-computer interaction interface, a situation that all applications cannot be displayed may occur in the human-computer interaction interface. For example, the desktop application man-machine interaction interface in fig. 7 includes a first screen and a second screen, and a user may switch the desktop application man-machine interaction interface displaying the first screen or the second screen by a sliding gesture or a switching operation between the first screen and the second screen, and display a sound key of an application program along with the switching.

For another example, in a scene where an application program in a folder needs to be viewed through a folder opening operation when the application program is set in the folder, a sound key corresponding to the application program in the folder may be displayed after the folder opening operation is triggered. For another example, when the sound keys corresponding to all the application programs cannot be directly displayed due to the limitation of the size of the human-computer interaction interface, the sound keys corresponding to the application programs can be displayed in response to the sliding operation after the sliding viewing operation is triggered.

Further improving the efficiency of controlling the sound of the application program by the user, fig. 8 shows a volume control key, and the current sound volume 802 of the application program may also be displayed on the sound key 801 corresponding to the sound playing state being the non-mute state. Or a volume control key 803 is presented, the volume control key 803 may reflect the current sound volume of the application. When the volume control key 803 is activated, a button or a slider for adjusting the volume may be displayed, and when the volume is adjusted to the minimum volume, it may be determined that the sound playing state is switched to the mute playing.

Through the sound keys corresponding to the application programs in the man-machine interaction interface, a user can control the sound of the application program corresponding to the sound keys through the triggering of the sound keys in a targeted manner. The processor 302 may respond to an instruction triggered by a user on a sound key of the human-computer interaction interface, determine an application program corresponding to the sound key, and control a sound playing state of the application program according to the triggered instruction. To control the sound output device 303 to play the sound of the application program or to close the sound of the application program.

For example, when the current sound playing state of the application program is mute playing, the user clicks the sound button 404 of the application program to trigger an instruction to switch the current sound playing state of the application program to non-mute playing, and after clicking, the icon of the sound button of the application program changes to the sound button 405 corresponding to the non-mute playing state. Meanwhile, the processor 302 controls the sound output device 303 to play the sound of the application program, wherein the sound of the application program may be an application program starting sound, an application program prompt sound, an application program providing audio/video sound, and the like.

For another example, when the current sound playing state of the application program is non-silent playing, the user clicks the sound key 801 of the application program, which may trigger an instruction to switch the sound playing state of the application program to silent playing, and after clicking, the sound key of the application program changes to a sound key corresponding to the silent playing state.

In the process of determining that the sound key corresponding to the application program capable of occupying the sound output device to play sound is displayed in the man-machine interaction interface, the electronic device 10 may obtain sound state information for recording the application program identifier occupying the sound output device 303 to play sound from a memory in the processor 302 or connected to the processor 302, so as to obtain the corresponding sound playing state of each identifier.

In the process of responding to the instruction triggered on the sound key of the human-computer interaction interface, the electronic device 10 determines the application program corresponding to the sound key, and controls the sound playing state of the application program according to the triggered instruction. The processor 302 may determine the application program triggered and controlled by the user according to the application program identifier corresponding to the sound key, and identify a triggered instruction, for example, when the user clicks the sound key, a command for switching the sound playing state is triggered, and for example, when the user clicks the "close" sound key, a command for adjusting the sound playing state to the mute playing state is triggered.

The electronic device 10 may update the sound playing state corresponding to the application identifier in the sound state information through the processor 302 according to the application identifier corresponding to the sound key and the triggered instruction. And displaying the sound key of the application program in a man-machine interaction interface based on the application program identification and the updated sound playing state.

Specifically, the processor 302 sends the application identification and the updated sound playback state to the AudioTrack interface for controlling the sound output device 303 to play the sound. In the instantiation process of the AudioTrack interface, based on the application program identifier and the sound playing state, the sound volume of the sound of the application program corresponding to the application program identifier played by the sound output device 303 is adjusted.

The sound state information is generated based on the information such as the identifier of the application program and the sound playing state acquired by the pre-configured sound control service interface when the application program is instantiated through the audio playing inlet, for example, the sound control service interface may be configured as an imediataybackmonitor interface.

The voice control service interfaces are respectively inserted into the audio playing inlets of the android system, such as MediaPlayer, AudioTrack, OpenSL ES, VideoView. When any audio output device 303 audio playing inlet works, a corresponding function in the sound control service interface is called. The following shows a voice control service interface, functions in the interface, and functions corresponding to the functions:

interface IMediaPlaybackMonitor{

public void onStart (); v/callback when playing starts;

public void onStop (); v/callback when playing stops;

public void onPause (); v/callback when playing is suspended;

public void onResume (); v/callback when playback resumes;

public void onClose (); v/callback on exit;

public void oneerror (); // callback on error;

public void setMute (Boolean Mute); // set to mute;

}

when the audio playback portal is instantiated, the audio playback of the application program occupying the audio output device 303 to play the audio is registered in the AudioPlaybackService class, and the audio status information such as the identifier of the application program and the audio playback status is recorded. In other words, if the processor 302 determines that the application is registered in the AudioPlaybackService class, that is, determines that the application occupies the audio output device 303 to play audio.

When the start () is called in the instantiation process of the audio playing entry to play the sound of the application program, the play start onStart () function in the audio playing entry is called, and the sound state information corresponding to the application program and correspondingly recorded in the AudioPlaybackService service class is changed, so that the sound state information of the application program is updated.

The following shows a data structure of sound status information, such as MediaPlaybackInfo class, which contains application id, sound playing status and other information:

class MediaPlaybackInfo{

public PackageInfo pkg; v/application package name information;

public int StreamType; // playback stream type;

public int state; // current state, such as play, stop, pause, etc.;

public int pid; // process number;

public int uid; // use UID;

public boilean isMuted; // whether or not muted (sound playing state);

}

based on the AudioPlaybackService service class, the audio playing status of all the applications occupying the audio output device 303 to play audio is managed. When a user triggers and controls the sound playing state of an application program through a sound key, the audio playing inlet can call a corresponding function in the sound control service interface according to a triggered instruction, and meanwhile, the sound state information corresponding to the application program in the AudioPlaybackService service class is changed. For example, the sound playing state changes.

The application name (such as application package name information), the sound key and the playing state can be transmitted through a Notification interface of the android system, so that the sound key of the application in the man-machine interaction interface can be updated. Generally, a speaker identifier indicates that the sound playing state is non-mute playing, and a speaker identifier with a dashed line indicates that the sound playing state is mute playing.

When the user controls the sound playing state by clicking the sound key, the processor 302 determines the identifier of the application program corresponding to the sound key, and switches the sound playing state by triggering. And sending the identifier of the application program and the triggered switching sound playing state to the AudioPlaybackService service class. The processor 302 queries the application id in the AudioPlaybackService service class, and updates the sound playing status in the sound status information corresponding to the application id. The processor 302 queries the process information corresponding to the application program identifier, calls the setMute () function through the process corresponding to the process information, sends the parameter (true or false) corresponding to the sound playing state to the corresponding AudioTrack interface in the audioFlinger service, instantiates the AudioTrack interface in combination with the sound playing state, and realizes the opening and closing of the sound. Wherein, the parameter in the setMute () function is true, which represents that the application program corresponding to the application program identifier is mute to be turned on, and the sound output device 303 mutes to play the sound of the application program, so as to implement soundless sound. The parameter is false, which indicates that the application corresponding to the application identifier is muted off, and the sound output device 303 unmutes to play the sound of the application, for example, to play the sound of the application at the default sound volume of the current system, or to play the sound of the application at the sound volume that is triggered and adjusted by the user, so as to implement sound on.

If the man-machine interaction interface is a background application man-machine interaction interface, when a user switches from any interface to the background application man-machine interaction interface through preset interaction operation, the voice playing state corresponding to the application program identifier running in the background is inquired in the voice state information of the AudioPlaybackService service class by calling the getAudioPlaybackInfo method. If the sound playing state corresponding to the application program identifier is found in the sound state information, the sound playing state is returned, and if the sound playing state is not found, null is returned (the application program does not occupy the sound output device 303). If the sound playing state is non-silent playing, a horn mark is displayed in a corresponding application program display area of the background application human-computer interaction interface to indicate that the sound of the application program is played. If the sound playing state is mute playing, the marked horn mark is displayed to indicate that the application program has no sound to play.

In an actual application scene, besides a sound key for providing sound control for a user through a human-computer interaction interface, the user can be prompted to set a sound playing state of the application program when the application program is installed.

The present application further provides a method for storing application sound state information, which can be applied to an implementation process of controlling application sound, and is used to store application sound state information, for example, to store sound state information corresponding to each application in the AudioPlaybackService service class in the foregoing embodiment. The method can also be applied to a scene that a user controls through self-defining application program sound, and sound state information of each application program set by the user is stored.

When the electronic device is started for the first time and starts to provide services for the user, the audioplaybackservice class is started, and a database or a data table for storing sound state information is initialized, wherein the sound state information comprises an application program identifier (such as application package name information of an application program) and a sound playing state. For example, the data table app _ vol _ state includes the application identifier pkg and the sound playing state volstate, and may also include packageInfo information corresponding to the application identifier, such as information of the application package name, the version number, the version name, the first installation time, the last coverage installation time, and the like.

When the application is installed, a display interface may be displayed to remind the user to set the sound playing state of the application, for example, a button for setting to play the sound of the application in a non-silent manner, and a button for setting to play the sound of the application in a silent manner. And adds the application id pkg and the corresponding sound playing status volstate in the data table app _ vol _ state. And the sound playing state set by the user is stored as the sound playing state volstate corresponding to the application program identifier pkg. When the application is installed, the application may be in a started state or in an un-started state.

In addition, the user may modify the sound playing state recorded in the data table app _ vol _ state corresponding to the controlled application program identifier while controlling the sound playing state of the application program by any one of the control implementation methods of the application program sound provided in the above embodiments. Or when the sound playing state corresponding to the controlled application program identification is determined to be changed, modifying the sound playing state corresponding to the controlled application program identification recorded in the data table app _ vol _ state.

For example, if the application program is not running, in response to an operation of a user pressing an application program icon in a desktop application program man-machine interaction interface for a long time, a sound key for controlling the application program is displayed for the user, the user can set a sound playing state of the application program through the provided sound key, and the operation of the sound key triggered by the user is responded. For example, when the application program is already running, the user may also control the sound of the application program through the sound buttons provided in the negative screen human-computer interaction interface, the notification bar human-computer interaction interface, and the background application human-computer interaction interface in the above embodiments. The method includes the steps that a modification interface of an AudioPlaybackService service class is called in response to an operation of a sound key for controlling an application program triggered by a user, sound state information corresponding to the application program is recorded, if no record of the application program exists in a data table app _ vol _ state, an application program identifier and corresponding sound state information of the application program are added in the data table app _ vol _ state, and if the record of the application program exists in the data table app _ vol _ state, a sound playing state of the application program is modified.

In a possible embodiment, whether the sound playing state is muted or not may be set to true or false, where true represents that the sound playing state is mute playing and false represents that the sound playing state is non-mute playing.

When the android system is started, in the process of instantiating the AudioPlaybackService, the data table app _ vol _ state storing the sound state information of the application program is read first, and records in the data table app _ vol _ state are loaded into the system. And if the application program plays the sound through the sound output equipment, controlling the sound playing of the application program according to the sound state information recorded in the AudioPlaybackService. That is, the sound playing of the application program is controlled according to the sound playing state of the application program which is set by the user last time. The user is not required to reset the sound playing state of the application sound every time the android system is started.

In a possible manner, a user may control an application program of the electronic device 10 through a voice control function, if the application program is an application program capable of occupying a sound output device, the user controls sound of the application program through the voice control function, that is, sets or modifies a sound playing state of the application program, for example, calls a modification interface of an AudioPlaybackService service class, records sound state information corresponding to the application program, if there is no record of the application program in the data table app _ vol _ state, adds an application program identifier of the application program and corresponding sound state information in the data table app _ vol _ state, and if there is a record of the application program in the data table app _ vol _ state, modifies the sound playing state of the application program.

Fig. 9 is a schematic flowchart illustrating a method for implementing control of application sound, and as shown in fig. 9, the method includes the following steps:

s901, displaying a sound key corresponding to an application program capable of occupying sound output equipment to play sound in a human-computer interaction interface, wherein the sound key is used for controlling the sound playing state of the corresponding application program and displaying the current sound playing state of the corresponding application program.

In specific implementation, the sound keys corresponding to the application programs capable of occupying the sound output equipment to play sound can be displayed in human-computer interaction interfaces such as a negative screen human-computer interaction interface, a notification bar human-computer interaction interface, a background application human-computer interaction interface, a desktop application human-computer interaction interface and the like. The sound playing state when the application program occupies the sound output device to play the sound can be mute playing or non-mute playing.

When the sound playing state of the application program is mute playing, the sound output device does not play the sound of the application program or plays the sound with the minimum sound volume (mute), and the sound of the application program is closed. When the sound playing state of the application program is non-mute playing, the sound output device plays the sound of the application program with the corresponding sound volume (default volume or adjusted sound volume) to realize the starting of the sound of the application program.

When an audio playing inlet in the Android system is instantiated, the application program can be registered in the AudioPlaybackService service class, and information such as an application program identifier and a sound playing state is recorded in the sound state information. Therefore, the sound state information corresponding to the application program capable of occupying the sound output equipment to play the sound can be determined according to the application program identification contained in the sound state information. The specific process is the same as the process of determining, by the electronic device 10, the application program occupying the sound output device to play the sound and determining the sound status information in the above embodiment, and details are not repeated here.

And according to the sound playing state contained in the determined sound state information, determining and displaying a sound key corresponding to an application program capable of occupying sound output equipment to play sound in the prestored sound key and the icon of the application program, wherein the sound playing state comprises a mute state and a non-mute state.

In specific implementation, the pre-stored sound keys include a sound key corresponding to a sound playing state being a mute state and a sound key corresponding to a sound playing state being a non-mute state. And displaying in the man-machine interaction interface according to the determined application program identification and the sound key corresponding to the application program. The display can be performed in the display manner shown in fig. 4 to 8 in the above embodiment, and the description is omitted.

S902, responding to an instruction triggered on a sound key of the man-machine interaction interface, determining an application program corresponding to the sound key, and controlling the sound playing state of the application program according to the triggered instruction.

In specific implementation, when a user triggers an instruction on a sound key of a human-computer interaction interface, the instruction is responded, and an application program identifier corresponding to the sound key is determined. And then updating the sound playing state corresponding to the application program identifier recorded in the sound state information to the sound playing state switched by the user.

And updating the sound key corresponding to the application program displayed in the man-machine interaction interface simultaneously as the sound state information changes. It is also desirable to control the sound output device to play the sound of the application based on the sound status information. And if the sound state information is updated, controlling the sound output equipment to play the sound of the application program based on the updated sound state information.

And if the sound playing state corresponding to the application program identifier contained in the sound state information is a mute state, controlling the sound output equipment not to play the sound of the application program, and realizing the sound mute or silence of the application program.

And if the sound playing state corresponding to the application program identifier contained in the sound state information is in a non-mute state, controlling the sound output equipment to play the sound of the application program at the target sound volume, wherein the target sound volume is the preset sound volume or the sound volume contained in the sound state information, and realizing sound playing of the sound program.

In one possible embodiment, the user may be provided with control buttons that control the volume of the sound of the respective application. Determining and displaying a volume control key corresponding to an application program which can occupy the sound output equipment to play sound according to the sound volume contained in the determined sound state information;

and updating the sound playing state and the sound volume corresponding to the application program identifier in the sound state information according to the triggered instruction.

In specific implementation, the sound state information of the application program may further include sound volume, and the icon of the volume control key of the application program is displayed according to the sound volume, so that a user may further improve the sound control efficiency by using the volume control key to control the sound volume of the application program.

Fig. 10 is a schematic flow chart of another implementation method for controlling application program sound, and the method comprises the following steps:

step S1001, displaying a sound key corresponding to an application program capable of occupying sound output equipment to play sound in a human-computer interaction interface, and displaying sound indication information in a display area of the sound key corresponding to the application program, wherein the sound key is used for controlling a sound playing state of the corresponding application program, and the sound indication information is used for displaying a current sound playing state of the corresponding application program.

During specific implementation, the sound keys corresponding to the application programs capable of occupying the sound output equipment to play sound can be displayed in the human-computer interaction interfaces such as the negative screen human-computer interaction interface, the notification bar human-computer interaction interface, the background application human-computer interaction interface, the desktop application human-computer interaction interface and the like. And displaying the sound indication information in the display area of the sound key. In an actual application scenario, the sound indication information may be presented in the form of an icon, a text, an icon combining a graphic and a text, or an icon with a pattern such as a graphic frame. The user can know the sound playing state of the application program through the displayed sound indicating information, convenience is provided for the user, and the frequent switching process of confirming the sound playing state of the application program by the user is reduced.

Step S1002, responding to an instruction triggered on a sound key of the human-computer interaction interface, determining an application program corresponding to the sound key, and controlling the sound playing state of the application program according to the triggered instruction.

In specific implementation, when a user triggers an instruction on a sound key of a human-computer interaction interface, the instruction is responded, and an application program identifier corresponding to the sound key is determined. And then updating the sound playing state corresponding to the application program identifier recorded in the sound state information to the sound playing state switched by the user.

And updating the sound indication information corresponding to the application program displayed in the man-machine interaction interface at the same time as the sound state information is changed. It is also desirable to control the sound output device to play the sound of the application based on the sound status information. And if the sound state information is updated, controlling the sound output equipment to play the sound of the application program based on the updated sound state information.

And if the sound playing state corresponding to the application program identifier contained in the sound state information is a mute state, controlling the sound output equipment not to play the sound of the application program, and realizing the sound mute or silence of the application program.

And if the sound playing state corresponding to the application program identifier contained in the sound state information is in a non-mute state, controlling the sound output equipment to play the sound of the application program at the target sound volume, wherein the target sound volume is the preset sound volume or the sound volume contained in the sound state information, and realizing sound playing of the sound program.

In one possible embodiment, the user may be provided with control buttons that control the volume of the sound of the respective application. Determining and displaying a volume control key corresponding to an application program which can occupy the sound output equipment to play sound according to the sound volume contained in the determined sound state information;

and updating the sound playing state and the sound volume corresponding to the application program identifier in the sound state information according to the triggered instruction.

In specific implementation, the sound state information of the application program may further include sound volume, and the icon of the volume control key of the application program is displayed according to the sound volume, so that a user may further improve the sound control efficiency by using the volume control key to control the sound volume of the application program.

Fig. 11 exemplarily shows a schematic structural diagram of a device for implementing control of application sound, which includes a presentation unit 1101 and a processing unit 1102.

The display unit 1101 is configured to display, in the human-computer interaction interface, a sound key corresponding to an application program that can occupy the sound output device to play sound, where the sound key is used to control a sound playing state of the corresponding application program and to display a current sound playing state of the corresponding application program;

the processing unit 1102 is configured to determine an application program corresponding to a sound key in response to a command triggered by the sound key on the human-computer interaction interface, and control a sound playing state of the application program according to the triggered command.

In one possible implementation, the human-machine interface is one of the following human-machine interfaces:

the system comprises a negative screen human-computer interaction interface, a notification bar human-computer interaction interface, a background application human-computer interaction interface and a desktop application human-computer interaction interface.

In some exemplary embodiments, the processing unit 1102 is specifically configured to:

determining the sound playing state of an application program which can occupy the sound output equipment to play sound in the sound state information;

and determining and displaying a sound key corresponding to the application program according to the sound playing state, wherein the sound playing state comprises a mute state and a non-mute state.

In a possible implementation, the processing unit 1102 is specifically configured to:

determining an application program identifier corresponding to the sound key according to the triggered instruction;

updating the sound playing state corresponding to the application program identifier in the sound state information;

and controlling the sound output device to play the sound of the application program based on the sound state information.

In a possible implementation, the processing unit 1102 is specifically configured to:

if the sound playing state corresponding to the application program identifier contained in the sound state information is a mute state, controlling the sound output equipment not to play the sound of the application program; or

And if the sound playing state corresponding to the application program identifier contained in the sound state information is a non-mute state, controlling the sound output equipment to play the sound of the application program at the target sound volume, wherein the target sound volume is a preset sound volume or the sound volume contained in the sound state information.

In a possible implementation, the processing unit 1102 is specifically configured to:

determining the sound volume of the application program in the sound state information;

determining and displaying a volume control key corresponding to the application program according to the sound volume;

and updating the sound playing state and the sound volume corresponding to the application program identifier in the sound state information according to the triggered instruction.

Fig. 12 schematically illustrates another structure of a device for implementing control of application sound, which includes a presentation unit 1201 and a processing unit 1202.

The display unit 1201 is configured to display, in the human-computer interaction interface, a sound key corresponding to an application program that can occupy the sound output device to play sound, and display sound indication information in a display area of the sound key corresponding to the application program, where the sound key is used to control a sound playing state of the corresponding application program, and the sound indication information is used to display a current sound playing state of the corresponding application program;

the processing unit 1202 is configured to respond to an instruction triggered on a sound key of the human-computer interaction interface, determine an application program corresponding to the sound key, and control a sound playing state of the application program according to the triggered instruction.

In one possible implementation, the human-machine interface is one of the following human-machine interfaces:

the system comprises a negative screen human-computer interaction interface, a notification bar human-computer interaction interface, a background application human-computer interaction interface and a desktop application human-computer interaction interface.

In some exemplary embodiments, the processing unit 1202 is specifically configured to:

determining the sound playing state of an application program which can occupy the sound output equipment to play sound in the sound state information;

and determining and displaying sound indication information corresponding to the application program according to the sound playing state, wherein the sound playing state comprises a mute state and a non-mute state.

In a possible implementation, the processing unit 1202 is specifically configured to:

determining an application program identifier corresponding to the sound key according to the triggered instruction;

updating the sound playing state corresponding to the application program identifier in the sound state information;

and controlling the sound output device to play the sound of the application program based on the sound state information.

In a possible implementation, the processing unit 1202 is specifically configured to:

if the sound playing state corresponding to the application program identifier contained in the sound state information is a mute state, controlling the sound output equipment not to play the sound of the application program; or

And if the sound playing state corresponding to the application program identifier contained in the sound state information is a non-mute state, controlling the sound output equipment to play the sound of the application program at the target sound volume, wherein the target sound volume is a preset sound volume or the sound volume contained in the sound state information.

In a possible implementation, the processing unit 1202 is specifically configured to:

determining the sound volume of the application program in the sound state information;

determining and displaying a volume control key corresponding to the application program according to the sound volume;

and updating the sound playing state and the sound volume corresponding to the application program identifier in the sound state information according to the triggered instruction.

As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.

The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.

These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.

These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.

It will be apparent to those skilled in the art that various changes and modifications may be made in the present application without departing from the spirit and scope of the application. Thus, if such modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is intended to include such modifications and variations as well.

33页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:声音输出控制方法及装置

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类