WO2020097927A1 - 通话控制方法和装置、计算机可读存储介质、电子设备 - Google Patents
通话控制方法和装置、计算机可读存储介质、电子设备 Download PDFInfo
- Publication number
- WO2020097927A1 WO2020097927A1 PCT/CN2018/115984 CN2018115984W WO2020097927A1 WO 2020097927 A1 WO2020097927 A1 WO 2020097927A1 CN 2018115984 W CN2018115984 W CN 2018115984W WO 2020097927 A1 WO2020097927 A1 WO 2020097927A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- channel
- target application
- audio transmission
- transmission channel
- function
- Prior art date
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04M—TELEPHONIC COMMUNICATION
- H04M1/00—Substation equipment, e.g. for use by subscribers
- H04M1/72—Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
- H04M1/725—Cordless telephones
Definitions
- the present application relates to the technical field of electronic equipment, in particular to a call control method and device, electronic equipment, and computer-readable storage medium.
- the audio output channel of the current call will be changed, for example, from the receiver to the speaker, or from the speaker to the receiver, etc., affecting the user's call Experience.
- the embodiments of the present application provide a call control method and apparatus, a computer-readable storage medium, and an electronic device, which can prohibit other applications from changing the audio transmission channel during a call during a call state to provide a user's call experience.
- a call control method applied to electronic equipment with multiple audio transmission channels including:
- the target application When the target application is running in the background and the operation is generated, the target application is prohibited from opening the second audio transmission channel to maintain the first audio transmission channel for calling.
- a call control device applied to electronic equipment with multiple audio transmission channels including:
- An obtaining module configured to obtain the first audio transmission channel where the electronic device is in a call state
- a monitoring module configured to monitor whether the target application program generates an operation for setting a second audio transmission channel in the call state
- the processing module is configured to, when the target application is running in the background and generating the operation, prohibit the target application from opening the second audio transmission channel to maintain the first audio transmission channel for calling.
- An electronic device includes a memory and a processor.
- Computer-readable instructions are stored in the memory.
- the processor is caused to execute the call control method according to the claims.
- the above call control method and apparatus, computer readable storage medium, and electronic device can acquire the first audio transmission channel where the electronic device is in a call state; monitor whether the target application program generates the second audio in the call state Operation of the transmission channel; when the target application is running in the background and the operation is generated, the target application is prohibited from turning on the second audio transmission channel to maintain the first audio transmission channel for calling to maintain
- the current call voice is still the first audio transmission channel, which can prevent the audio output channel from being changed during the call and improve the user's call experience.
- FIG. 1 is a schematic diagram of the internal structure of an electronic device in an embodiment
- FIG. 2 is a schematic diagram of a part of the architecture of an Android audio system in an embodiment
- FIG. 3 is a schematic flowchart of a call control method in an embodiment
- FIG. 5 is a schematic flowchart of a call control method in another embodiment
- FIG. 6 is a schematic flow chart of allowing the target application to enable the second audio transmission channel in one embodiment, so that the target application can perform audio transmission through the second audio transmission channel;
- FIG. 7 is a schematic diagram of a call control device in an embodiment
- FIG. 8 is a block diagram of a partial structure of a mobile phone related to an electronic device provided by an embodiment of the present application.
- first, second, etc. used in the present invention may be used herein to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish the first element from another element.
- the first audio transmission channel may be referred to as the second audio transmission channel, and similarly, the second audio transmission channel may be referred to as the first audio transmission channel.
- Both the first audio transmission channel and the second audio transmission channel are audio transmission channels, but they are not the same audio transmission channel.
- FIG. 1 a schematic diagram of an internal structure of an electronic device is provided.
- the electronic device includes a processor, memory, and display screen connected by a system bus.
- the processor is used to provide computing and control capabilities to support the operation of the entire electronic device.
- the memory is used to store data, programs, and / or instruction codes, etc. At least one computer program is stored on the memory, and the computer program can be executed by the processor to implement the call control method for electronic devices provided in the embodiments of the present application.
- the memory may include a non-volatile storage medium such as a magnetic disk, an optical disk, a read-only memory (Read-Only Memory, ROM), or a random-access memory (Random-Access-Memory, RAM).
- the memory includes a non-volatile storage medium and internal memory.
- the non-volatile storage medium stores the operating system, database, and computer program.
- the database stores data related to a call control method provided by the above embodiments, for example, information such as the name of each process or application may be stored.
- the computer program can be executed by the processor to implement a call control method provided by various embodiments of the present application.
- the internal memory provides a cached operating environment for operating systems, databases, and computer programs in non-volatile storage media.
- the display screen may be a touch screen, such as a capacitive screen or an electronic screen, which is used to display interface information of applications corresponding to the foreground process, and may also be used to detect a touch operation acting on the display screen, and generate corresponding instructions, such as performing front and background Application switching instructions, etc.
- the structure shown in FIG. 1 is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the electronic device to which the solution of the present application is applied.
- the specific electronic device may It includes more or fewer components than shown in the figure, or some components are combined, or have a different component arrangement.
- the electronic device further includes a network interface connected through a system bus.
- the network interface may be an Ethernet card or a wireless network card, etc., and is used to communicate with external electronic devices, for example, it may be used to communicate with a server.
- a partial architecture diagram of an Android audio system is provided.
- the architecture system of the Android audio system includes a kernel space layer 210, a local layer 220, a framework layer 230, and a client layer 240.
- the Kernel space layer 210 may include an Audio driver module 211, where the Audio driver module interacts with the hardware and implements the local layer interface for the upper layer to call normally.
- ALSA, OSS, and a custom audio driver can be selected.
- the local layer 220 includes an AtlasService_Jni module 221, an AtlasService Interface module 223, and an AtlasService module 225.
- the framework layer 230 includes an AtlasManager module 231 and an AtlasService module 233. Among them, the AtlasManager module 231 is provided with a conventional interface and a registration callback interface.
- the AtlasService module 225 in the local layer 220 and the AtlasService module 233 in the framework layer 230 are used for event reception and processing, information collection, abnormal feedback, and log collection, where the information collection may include the collection of display information and the collection of audio information.
- the audio information includes playback information, recording information, audio mode setting information, and so on. Because the AtlasService module is set up in the system-level framework layer, it can facilitate interaction with other system services, and at the same time, there is no need to worry about permissions during system calls. Through the above-mentioned architecture, the call control method in each embodiment of the present application can be implemented.
- a call control method is provided.
- the call control method is applied to an electronic device having multiple audio transmission channels.
- the electronic device may include a mobile phone, a tablet computer, a laptop computer, a palmtop computer, a mobile Internet device (Mobile Internet Device (MID), a wearable device (such as a smart watch, smart bracelet, pedometer, etc.) Or other electronic devices with voice call function and speakers.
- MID Mobile Internet Device
- a wearable device such as a smart watch, smart bracelet, pedometer, etc.
- the audio transmission channel includes an earpiece channel, a speaker channel, and a headphone channel; it may also include a microphone channel.
- the word audio transmission channel may be an earphone channel, a speaker channel, and a headphone channel, where the headphone channel may include a wired headphone channel And Bluetooth headset channel.
- the call control method includes steps 302-306.
- Step 302 Obtain the first audio transmission channel where the electronic device is in a call state.
- the electronic device When the electronic device is in a call state, it can acquire the first audio transmission channel occupied by the current call state. For example, based on the Android operating system built in the electronic device, a new Java class can be created to monitor whether the electronic device is in a call state. Specifically, it can be monitored through the overload of BroadcastReceiver.
- the electronic device can obtain the first audio transmission channel in the current call state.
- the first audio transmission channel includes an earphone channel, a speaker channel, a wired headset channel, and a Bluetooth headset channel. If the first audio transmission channel is a receiver channel, it means that the voice of the electronic device is output from the receiver; if the first audio transmission channel is a speaker channel, it indicates that the voice of the electronic device is output from the speaker; if the first audio transmission channel When it is the earphone channel, it means that the voice of the electronic device is output from the earphone.
- the system function AudioModeProvider.getAudioMode can be called to obtain the first audio transmission channel occupied by the current call state.
- Step 304 Monitor whether the target application generates an operation for setting the second audio transmission channel in the call state.
- the target application program may be understood as an application program capable of outputting and / or outputting audio signals, and the number of target application programs may be 1, 2, 3 or more.
- the target application may include applications such as instant messaging, audio playback, video playback, sound control, and voice input.
- the electronic device may preset to construct a list or database including all target applications, for storing identification information of the target applications, and the like.
- the electronic device can monitor the audio behavior of the target application through the built-in monitoring function.
- the audio behavior includes playback behavior, recording behavior, and audio mode settings.
- the audio mode setting may be understood as an operation for setting the second audio transmission channel.
- a system-level monitoring module can be created at the system framework layer (native / framework layer), and the audio behavior of the target application program can be monitored through the monitoring module. For example, you can set up a listener module in the framework layer and run it in the system service program (system_server). Since the listener module is established in the system-level service framework layer, you can easily interact with other system services without worrying about system calls. Permissions issue.
- the electronic device can also create an independent monitoring process, set up and call a separate monitoring function in the process, which can be set to start automatically after power-on, and monitor the audio mode setting behavior of any other target application in real time.
- Step 306 When the target application runs in the background and generates an operation, the target application is prohibited from opening the second audio transmission channel to maintain the first audio transmission channel for calling.
- the electronic device may obtain the running state of the target application, and the running state may include foreground operation or background operation.
- the electronic device can monitor the process information of the target application program and determine the running state of the target application program according to the process information.
- the electronic device can also monitor whether the target application is running in the background based on the use of ActivityLifecycleCallbacks. According to the life cycle of the Activity, onStart () indicates that an Activity is in the foreground and onStop () indicates that the Activity is not visible in the background.
- the electronic device can also obtain the running state of the target application through getRunningTasks, and can also obtain the running state of the target application through the combination of getRunningTasks and RunningAppProcessInfo.
- there is no further limitation on how the electronic device obtains the running state of the target application program nor is it limited to the above example.
- the electronic device may prohibit the target application from turning on the second audio transmission channel to Maintain the first audio transmission channel to talk. That is, although the target application sets the second audio transmission channel in the background, the setting action will not be performed, that is, the target application will not turn on the second audio output transmission channel to maintain the current call status of the first An audio transmission channel.
- the second audio transmission channel may also include a receiver channel, a speaker channel, a wired headset channel and a Bluetooth headset channel. The first audio transmission channel is different from the second audio transmission channel.
- the target application when the first audio transmission channel in the call state is a receiver channel, and the target application is running in the background, and a second audio transmission channel is set, wherein the second audio transmission channel is a speaker channel or a headphone channel, that is, the target
- the purpose of the application setting the second audio transmission channel is to call the speaker channel or the headphone channel. If the target application opens the second audio transmission channel, the call voice of its electronic device is output from the speaker or headset channel.
- the electronic device can prevent the target application from opening the second audio transmission channel to maintain the first audio transmission channel for the call, that is, the current call voice is still output through the first audio transmission channel, which can avoid audio output during the call Channel changes occur.
- the above call control method can obtain the first audio transmission channel where the electronic device is in a call state; monitor whether the target application generates an operation for setting a second audio transmission channel in the call state; when the target application When running in the background and generating the operation, prohibit the target application from opening the second audio transmission channel to maintain the first audio transmission channel for the call to maintain the current call voice or the first audio transmission channel, The situation that the audio output channel is changed during a call can be avoided, and the user experience can be improved.
- the call control method includes steps 402-410. among them,
- Step 402 Obtain the first audio transmission channel where the electronic device is in a call state.
- Step 404 Monitor whether the target application program calls the preset interface function in the call state.
- the electronic device may monitor whether the target application program calls the preset interface function in the call state, where the preset interface function is used to set a second audio transmission channel for transmitting audio.
- the target application can open the second audio transmission channel, and when the function of the preset interface function is invalid, then The target application can call but does not turn on the second audio transmission channel.
- the electronic device can determine the validity or invalidity of the preset interface function by setting the preset interface function.
- the preset interface functions include at least the setSpeakerphoneOn () interface function, setMode (AudioManager.MODE_IN_CALL) interface function, isWiredHeadsetOn () interface function or other interface functions for setting the earphone channel and the headphone channel, etc.
- the electronic device can set the speaker channel by calling the interface function setSpeakerphoneOn () in the AudioManager, that is, the speaker channel can be turned on or off.
- the electronic device can set the earpiece channel by calling the function setMode (AudioManager.MODE_IN_CALL) in AudioManager or the construction parameter streamType (STREAM_VOICE_CALL); the electronic device can set and detect the earpiece channel by calling the function isWiredHeadsetOn () in AudioManager.
- the preset interface functions are not limited to the above examples, and different forms of preset interface functions can also be set according to actual needs.
- the electronic device can monitor whether the target application program calls the preset interface function to apply to the audio device state manager to use the audio transmission channel. If an application is sent to the audio device status manager, it indicates that the target application program has called a preset interface function, that is, the target application program has generated an operation for setting a second audio transmission channel.
- Step 406 Determine whether the target application is running in the background.
- the electronic device can obtain the running state of the target application, and the running state can include foreground running or background running, and then can determine whether the target application is running in the background.
- the electronic device can monitor the process information of the target application program and determine the running state of the target application program according to the process information.
- the electronic device may obtain the running process information of the target application based on ActivityManager.RunningAppProcessInfo.
- the process information includes constant type information and variable type information, and according to the acquired process information, it can be determined whether the target application program is running in the background.
- the electronic device can also monitor whether the target application is running in the background based on ActivityLifecycleCallbacks. According to the life cycle of the Activity, onStart () indicates that an Activity is in the foreground, and onStop () indicates that the Activity is not visible in the background.
- the electronic device can also obtain the running state of the target application through getRunningTasks, and can also obtain the running state of the target application through a combination of getRunningTasks and RunningAppProcessInfo.
- Step 408 When the target application is running in the background and generating an operation, the target application is allowed to call the preset interface function, and the function of the preset interface function is disabled, so as to maintain the first audio transmission channel for calling.
- the target application program if the target application program generates an operation for setting the second audio transmission channel while running in the background, it allows the target application program to call the preset interface function, and the function of the preset interface function is invalid, To maintain the first audio transmission channel for talking.
- the target application when the first audio channel in the call state is the earpiece channel, the target application is allowed to call the second preset function, and the second preset function is disabled to maintain the earphone channel for the call, where the second The preset function is used to set the speaker channel, or, the second preset function is also used to set the headphone channel.
- the electronic device may be that the function of the preset interface function is invalid, still Maintain the output of the receiver channel of the current call voice, so that the call voice can be output from the receiver channel, and avoid changing the output channel of the call voice.
- the target application when the first audio channel is a speaker channel, the target application is allowed to call the second preset function, and the function of the second preset function is disabled to maintain the speaker channel for calling; wherein, the second preset function It is used to set the earpiece channel and also used to set the earphone channel.
- the electronic device when the call voice is output from the speaker channel, when the target application running in the background calls the preset function function for setting the earphone channel or the headphone channel, the electronic device may be that the function of the preset interface function is invalid and still Maintain the speaker channel output of the current call voice, so that the call voice can be output from the speaker channel, and avoid changing the output channel of the call voice.
- the target application When the first audio channel is a headphone channel, the target application is allowed to call the second preset function, and the function of the second preset function is disabled to maintain the earphone channel for calling, wherein the second preset function is used to set the earphone channel, It is also used to set up speaker channels.
- the electronic device may be that the function of the preset interface function is invalid, and still Maintain the current channel output of the voice of the call, so that the voice of the call can be output from the headset channel, and avoid changing the output channel of the voice of the call.
- the target application running in the background can call the preset interface function for setting the second audio transmission channel, it can control the function of the called preset interface function Disabled to maintain the first audio transmission channel of the current call voice, can make the state of the first audio transmission channel and related parameters normal, thereby avoiding the situation of changing the output channel of the call voice, and improving the user's experience during the call.
- the call control method includes steps 502-506:
- Step 502 Obtain the first audio transmission channel where the terminal is in a call state.
- Step 504 Monitor whether the target application generates an operation for setting the second audio transmission channel in the call state.
- step 502 and step 504 correspond to step 302 and step 304 in the foregoing embodiment one by one, and will not be repeated here.
- Step 506 When the target application runs in the foreground and the set second transmission channel meets the preset condition, the target application is allowed to enable the second audio transmission channel, so that the target application performs audio transmission through the second audio transmission channel.
- the electronic device can monitor whether the target application is running in the foreground based on ActivityLifecycleCallbacks. At the same time, the electronic device can monitor whether the target application running in the foreground calls the preset interface function in the call state, where the preset interface function is used to set a second audio transmission channel for transmitting audio.
- the target application running in the foreground calls the preset interface function during the call state, that is, when the target application generates an operation for setting the second audio transmission channel while running in the foreground
- the set second transmission channel can be judged Whether it meets the preset conditions.
- the preset condition includes that the second audio transmission channel is inconsistent with the first audio transmission channel. That is, when the target application is running in the foreground and the set second transmission channel is inconsistent with the first audio transmission channel, the target application is allowed to enable the second audio transmission channel to enable the target application to perform audio through the second audio transmission channel transmission.
- the second transmission channel set by the target application running in the foreground is the speaker channel.
- the target application is allowed to enable the speaker Channel to enable the target application to transmit audio through the speaker channel.
- the target application is allowed to play the voice to be played by the target application when the speaker channel is enabled.
- the preset condition includes that the second audio transmission channel is consistent with the first audio transmission channel and that the usage priority of the target application is higher than the usage priority of the call. That is, when the target application is running in the foreground and the set second transmission channel is consistent with the first audio transmission channel and the use priority of the target application is higher than the use priority of the call, the target application is allowed to enable the second audio transmission Channel, so that the target application performs audio transmission through the second audio transmission channel.
- the use priority can be understood as the priority level that can be used when both the call and the target application need to use the same audio transmission channel.
- the usage priority of the target application is higher than the usage priority of the call
- the usage priority is the priority when using the receiver channel. That is, when the target application and the call use the receiver channel at the same time, under certain circumstances, when the use priority of the target application is higher than the use priority of the call, the target application can be allowed to use the receiver channel first, so that The target application transmits audio through the earpiece channel.
- the target application is an instant messaging application, and the contact A currently in communication in the target application is more important than the current call contact B, the target application can be considered to have a high priority Use priority for calls.
- allowing the target application to enable the second audio transmission channel to enable the target application to perform audio transmission through the second audio transmission channel includes steps 602-604. among them,
- Step 602 Detect the idle time period of the call state.
- the electronic device may detect the idle period of the call state during the call state.
- the time period during which no input or output voice signal is detected within a preset time period is referred to as an idle time period.
- the time period in which the input and output voice signals exceed the vocal range within a preset time period is called an idle time period.
- the vocal range can be understood as the frequency range of sound waves is 20HZ-20KHZ, where the voice range of human speech only occupies a narrow part of the sound range that humans can hear, generally within 100HZ-8KHZ, and 200- 4000HZ is called the fundamental frequency of human voice, and the frequency of most people speaking is within this range.
- the time period is considered as an idle time period.
- Step 604 Allow the target application to enable the second audio transmission channel during the idle period, so that the target application can perform audio transmission through the second audio transmission channel.
- the electronic device can allow the target application to enable the second audio transmission channel during the idle time period, so that the target application can perform audio transmission through the second audio transmission channel. That is, the first audio transmission channel of the communication state of the electronic device will not change, and at the same time, the target application is allowed to enable the second audio transmission channel during the idle time period, so that the target application performs audio transmission through the second audio transmission channel.
- the first audio transmission channel can be used to restore the current call state, and the first audio transmission channel state and related parameters will not be changed, which improves the user's call process.
- Experience and flexibility in using the target application can allow the target application to enable the second audio transmission channel during the idle time period, so that the target application can perform audio transmission through the second audio transmission channel. That is, the first audio transmission channel of the communication state of the electronic device will not change, and at the same time, the target application is allowed to enable the second audio transmission channel during the idle time period, so that the target application performs audio transmission through the second audio transmission channel.
- steps in the flowcharts of FIGS. 3-6 are displayed in order according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless clearly stated in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least some of the steps in FIGS. 3-6 may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but may be executed at different times. These sub-steps or stages The execution order of is not necessarily sequential, but may be executed in turn or alternately with at least a part of other steps or sub-steps or stages of other steps.
- the present application also provides a call control device, including: an obtaining module 710, a listening module 720, and a processing module 730. among them,
- the obtaining module 710 is used to obtain the first audio transmission channel where the terminal is in a call state
- the monitoring module 720 is configured to monitor whether the target application program generates an operation for setting a second audio transmission channel in a call state
- the processing module 730 is configured to prohibit the target application from opening the second audio transmission channel when the target application is running in the background and generates an operation, so as to maintain the first audio transmission channel for calling.
- the above call control device can acquire the first audio transmission channel where the electronic device is in a call state; monitor whether the target application generates an operation for setting a second audio transmission channel in the call state; when the target application When running in the background and generating the operation, prohibit the target application from opening the second audio transmission channel to maintain the first audio transmission channel for the call to maintain the current call voice or the first audio transmission channel, The situation that the audio output channel is changed during a call can be avoided, and the user experience can be improved.
- the monitoring module 720 includes:
- a monitoring unit configured to monitor whether the target application program calls a preset interface function in a call state, wherein the preset interface function is used to set a second audio transmission channel for transmitting audio;
- the generating unit is used for generating an operation when the preset interface function is called.
- the monitoring unit is further configured to monitor whether the target application program calls the preset interface function to apply to the audio device state manager to use the audio transmission channel.
- the processing module is further configured to allow the target application to call the preset interface function, and the function of the preset interface function is invalid, so as to maintain the first audio transmission channel for calling.
- the first audio transmission channel includes an earpiece channel, a speaker channel, and a headphone channel;
- the target application is allowed to call the second preset function, and the second preset function is disabled to maintain the earphone channel for calling, wherein the second preset function is used to set the speaker channel, It is also used to set the earphone channel;
- the target application is allowed to call the second preset function, and the function of the second preset function is disabled to maintain the speaker channel for calling; wherein, the second preset function is used to set the receiver channel, It is also used to set the earphone channel;
- the target application is allowed to call the second preset function, and the function of the second preset function is disabled to maintain the earphone channel for calling, wherein the second preset function is used to set the earphone channel, It is also used to set up speaker channels.
- the target application running in the background can call the preset interface function for setting the second audio transmission channel, it can control the function of the called preset interface function Disabled to maintain the first audio transmission channel of the current call voice, can make the state of the first audio transmission channel and related parameters normal, thereby avoiding the situation of changing the output channel of the call voice, and improving the user's experience during the call.
- the call control device further includes:
- the running module is used to obtain the process information of the target application and determine whether the target application is running in the background according to the process information.
- the processing module 730 is further configured to allow the target application to enable the second audio transmission channel when the target application is running in the foreground and the set second transmission channel meets the preset condition, so that the target application can pass The second audio transmission channel performs audio transmission.
- the preset condition is that the second audio transmission channel is inconsistent with the first audio transmission channel, or,
- the preset condition includes that the second audio transmission channel is consistent with the first audio transmission channel and the use priority of the target application is higher than the use priority of the call.
- the processing module 730 includes:
- the detection unit is used to detect the idle time period of the call state
- the processing unit is configured to allow the target application to enable the second audio transmission channel during the idle time period, so that the target application can perform audio transmission through the second audio transmission channel.
- the call control device in this embodiment may allow the target application to enable the second audio transmission channel during the idle period, so that the target application performs audio transmission through the second audio transmission channel. That is, the first audio transmission channel of the communication state of the electronic device will not change, and at the same time, the target application is allowed to enable the second audio transmission channel during the idle time period, so that the target application performs audio transmission through the second audio transmission channel.
- the first audio transmission channel can be used to restore the current call state, and the first audio transmission channel state and related parameters will not be changed, which improves the user's call process. Experience and flexibility in using the target application.
- each module in the above call control device is for illustration only. In other embodiments, the call control device may be divided into different modules as needed to complete all or part of the functions of the above call control device.
- Each module in the above call control device may be implemented in whole or in part by software, hardware, or a combination thereof.
- the above modules may be embedded in the hardware or independent of the processor in the electronic device, or may be stored in the memory in the electronic device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
- the embodiments of the present application also provide a computer-readable storage medium.
- One or more non-volatile computer-readable storage media containing computer-executable instructions when the computer-executable instructions are executed by one or more processors, cause the processor to perform the steps of the following call control method:
- the target application runs in the background and generates an operation, the target application is prohibited from turning on the second audio transmission channel to maintain the first audio transmission channel for calling.
- one or more non-volatile computer-readable storage media containing computer-executable instructions when the computer-executable instructions are executed by one or more processors, may also cause the processor to perform any of the foregoing implementations Example call control method.
- a computer program product containing instructions that, when run on a computer, causes the computer to perform the steps of the call control method:
- the target application runs in the background and generates an operation, the target application is prohibited from turning on the second audio transmission channel to maintain the first audio transmission channel for calling.
- a computer program product containing instructions when run on a computer, causes the computer to execute the call control method in any of the above embodiments.
- An embodiment of the present application also provides an electronic device. As shown in FIG. 8, for ease of description, only parts related to the embodiments of the present application are shown, and specific technical details are not disclosed, please refer to the method part of the embodiments of the present application.
- the electronic device may be any terminal device including a mobile phone, tablet computer, PDA (Personal Digital Assistant), POS (Point of Sales), in-vehicle computer, wearable device, etc. that has a voice call function and has a speaker , Taking an electronic device as a mobile phone as an example:
- the mobile phone includes: a radio frequency (Radio Frequency) circuit 810, a memory 820, an input unit 830, a display unit 840, a sensor 850, an audio circuit 860, a wireless fidelity (WiFi) module 870, and a processor 880 , And power supply 890 and other components.
- Radio Frequency Radio Frequency
- a memory 820 for storing data
- a sensor 850 for detecting and a wireless fidelity
- WiFi wireless fidelity
- processor 880 a processor 880
- power supply 890 and other components.
- the structure of the mobile phone shown in FIG. 8 does not constitute a limitation on the mobile phone, and may include more or fewer components than those shown in the figure, or a combination of certain components, or a different component arrangement.
- the RF circuit 810 can be used to receive and send signals during the sending and receiving of information or during a call. It can receive the downlink information of the base station and process it to the processor 880; it can also send the uplink data to the base station.
- RF circuits include but are not limited to antennas, at least one amplifier, transceiver, coupler, low noise amplifier (Low Noise Amplifier, LNA), duplexer, and so on.
- the RF circuit 810 can also communicate with other devices through a wireless communication network.
- the above wireless communication can use any communication standard or protocol, including but not limited to Global System of Mobile (GSM), General Packet Radio Service (GPRS), and Code Division Multiple Access (Code Division) Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), e-mail, Short Message Service (SMS), etc.
- GSM Global System of Mobile
- GPRS General Packet Radio Service
- CDMA Code Division Multiple Access
- WCDMA Wideband Code Division Multiple Access
- LTE Long Term Evolution
- SMS Short Message Service
- the memory 820 may be used to store software programs and modules.
- the processor 880 executes various functional applications and data processing of the mobile phone by running the software programs and modules stored in the memory 820.
- the memory 820 may mainly include a program storage area and a data storage area, where the program storage area may store an operating system and at least one function-required application program (such as a sound playback function application program, an image playback function application program, etc.), etc.
- the data storage area can store data (such as audio data, address book, etc.) created according to the use of the mobile phone.
- the memory 820 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other volatile solid-state storage devices.
- the input unit 830 may be used to receive input numeric or character information, and generate key signal input related to user settings and function control of the mobile phone 800.
- the input unit 830 may include a touch panel 831 and other input devices 832.
- the touch panel 831 also known as a touch screen, can collect user's touch operations on or near it (such as the user using any finger, stylus, or any other suitable object or accessory on or near the touch panel 831 Operation), and drive the corresponding connection device according to the preset program.
- the touch panel 831 may include a touch detection device and a touch controller.
- the touch detection device detects the user's touch orientation, and detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives touch information from the touch detection device and converts it into contact coordinates, and then sends To the processor 880, and can receive the command sent by the processor 880 and execute it.
- the touch panel 831 may be implemented in various types such as resistive, capacitive, infrared, and surface acoustic waves.
- the input unit 830 may also include other input devices 832.
- other input devices 832 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), and the like.
- the display unit 840 may be used to display information input by the user or information provided to the user and various menus of the mobile phone.
- the display unit 840 may include a display panel 841.
- the display panel 841 may be configured in the form of a liquid crystal display (Liquid Crystal) (LCD), an organic light emitting diode (Organic Light-Emitting Diode, OLED), or the like.
- the touch panel 831 may cover the display panel 841, and when the touch panel 831 detects a touch operation on or near it, it is transmitted to the processor 880 to determine the type of touch event, and then the processor 880 according to The type of touch event provides a corresponding visual output on the display panel 841.
- the touch panel 831 and the display panel 841 are implemented as two independent components to realize the input and input functions of the mobile phone, in some embodiments, the touch panel 831 and the display panel 841 may be integrated and Realize the input and output functions of the mobile phone.
- the mobile phone 800 may further include at least one sensor 850, such as a light sensor, a motion sensor, and other sensors.
- the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display panel 841 according to the brightness of the ambient light, and the proximity sensor may close the display panel 841 and / or when the mobile phone moves to the ear Or backlight.
- the motion sensor may include an acceleration sensor, which can detect the magnitude of acceleration in various directions through the acceleration sensor, and can detect the magnitude and direction of gravity when at rest, and can be used for applications that recognize mobile phone gestures (such as horizontal and vertical screen switching), and vibration recognition-related functions (such as Pedometer, percussion), etc.
- the mobile phone can also be equipped with other sensors such as gyroscope, barometer, hygrometer, thermometer, infrared sensor and so on.
- the audio circuit 860, the speaker 861, and the microphone 862 may provide an audio interface between the user and the mobile phone.
- the audio circuit 860 can transmit the converted electrical signal of the received audio data to the speaker 861, which converts the speaker 861 into a sound signal output; on the other hand, the microphone 862 converts the collected sound signal into an electrical signal, which After receiving, it is converted into audio data, and then processed by the audio data output processor 880, and then sent to another mobile phone via the RF circuit 810, or the audio data is output to the memory 820 for subsequent processing.
- WiFi is a short-range wireless transmission technology.
- the mobile phone can help users send and receive e-mails, browse web pages, and access streaming media through the WiFi module 870. It provides users with wireless broadband Internet access.
- FIG. 8 shows the WiFi module 870, it can be understood that it is not a necessary component of the mobile phone 800, and may be omitted as needed.
- the processor 880 is the control center of the mobile phone, and uses various interfaces and lines to connect the various parts of the entire mobile phone. Various functions and processing data of the mobile phone, so as to monitor the mobile phone as a whole.
- the processor 880 may include one or more processing units.
- the processor 880 may integrate an application processor and a modem processor, where the application processor mainly processes an operating system, user interface, application programs, etc .; the modem processor mainly processes wireless communication. It can be understood that the above-mentioned modem processor may not be integrated into the processor 880.
- the mobile phone 800 further includes a power supply 890 (such as a battery) for powering various components.
- a power supply 890 (such as a battery) for powering various components.
- the power supply can be logically connected to the processor 880 through the power management system, so as to realize functions such as charging, discharging, and power management through the power management system.
- the mobile phone 800 may further include a camera, a Bluetooth module, and the like.
- the processor 880 included in the electronic device implements the following steps when executing the computer program stored on the memory:
- the target application When the target application is running in the background and the operation is generated, the target application is prohibited from opening the second audio transmission channel to maintain the first audio transmission channel for calling.
- Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory.
- Volatile memory can include random access memory (RAM), which acts as external cache memory.
- RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR) SDRAM, enhanced SDRAM (ESDRAM), synchronous Link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
- SRAM static RAM
- DRAM dynamic RAM
- SDRAM synchronous DRAM
- DDR double data rate SDRAM
- ESDRAM enhanced SDRAM
- SLDRAM synchronous Link (Synchlink) DRAM
- Rambus direct RAM
- DRAM direct memory bus dynamic RAM
- RDRAM memory bus dynamic RAM
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Telephone Function (AREA)
Abstract
Description
Claims (23)
- 一种通话控制方法,应用于具有多个音频传输通道的电子设备,包括:获取所述电子设备处于通话状态的第一音频传输通道;监听目标应用程序在所述通话状态中是否产生用于设置第二音频传输通道的操作;当所述目标应用程序在后台运行且产生所述操作时,禁止所述目标应用程序开启所述第二音频传输通道,以维持所述第一音频传输通道进行通话。
- 根据权利要求1所述的方法,其中,所述监听目标应用程序在所述通话状态中是否产生用于设置第二音频传输通道的操作,包括:监听所述目标应用程序在所述通话状态中是否调用预设接口函数,其中,所述预设接口函数用于设置传输音频的所述第二音频传输通道;当调用所述预设接口函数时,则产生所述操作。
- 根据权利要求2所述的方法,其中,所述监听所述目标应用程序在所述通话状态中是否调用所述预设接口函数,包括:监听所述目标应用程序调用所述预设接口函数是否向音频设备状态管理器申请使用所述音频传输通道。
- 根据权利要求2所述的方法,其中,所述禁止所述目标应用程序开启所述第二音频传输通道,以维持所述第一音频传输通道进行通话,包括:允许所述目标应用程序调用所述预设接口函数,且所述预设接口函数的功能失效,以维持所述第一音频传输通道进行通话。
- 根据权利要求4所述的方法,其中,所述第一音频传输通道包括听筒通道、扬声器通道、耳机通道;当所述第一音频通道为听筒通道时,允许所述目标应用程序调用第二预设函数,且所述第二预设函数功能失效,以维持听筒通道进行通话,其中,所述第二预设函数用于设置所述扬声器通道,或,用于设置所述耳机通道。
- 根据权利要求5所述的方法,其中,当所述第一音频通道为扬声器通道时,允许所述目标应用程序调用第二预设函数,且所述第二预设函数功能失效,以维持扬声器通道进行通话;其中,所述第二预设函数用于设置所述听筒通道,或,用于设置所述耳机通道。
- 根据权利要求5所述的方法,其中,当所述第一音频通道为耳机通道时,允许所述目标应用程序调用第二预设函数,且所述第二预设函数功能失效,以维持耳机道进行通话,其中,所述第二预设函数用于设置所述听筒通道,或,用于设置所述扬声器通道。
- 根据权利要求1所述的方法,其中,所述方法进一步包括:获取所述目标应用程序的进程信息;根据所述进程信息判断所述目标应用程序是否在后台运行。
- 根据权利要求1所述的方法,其中,所述方法进一步包括:当所述目标应用程序在前台运行且设置的所述第二传输通道符合预设条件时,允许所述目标应用程序启用所述第二音频传输通道,以使所述目标应用程序通过所述第二音频传输通道进行音频传输。
- 根据权利要求9所述的方法,其中,所述预设条件包括所述第二音频传输通道与所述第一音频传输通道不一致。
- 根据权利要求9所述的方法,其中,预设条件包括所述第二音频传输通道与所述第一音频传输通道一致且所述目标应用程序的使用优先级高于所述通话的使用优先级。
- 根据权利要求9所述的方法,其中,所述允许所述目标应用程序启用所述第二音频传输通道,以使所述目标应用程序通过所述第二音频传输通道进行音频传输,包括:检测所述通话状态的闲置时间段;在所述闲置时间段允许所述目标应用程序启用所述第二音频传输通道,以使所述目标应用程序通过所述第二音频传输通道进行音频传输。
- 一种通话控制装置,应用于具有多个音频传输通道的电子设备,包括:获取模块,用于获取所述电子设备处于通话状态的第一音频传输通道;监听模块,用于监听目标应用程序在所述通话状态中是否产生用于设置第二音频传输通道的操作;处理模块,用于当所述目标应用程序在后台运行且产生所述操作时,禁止所述目标应用程序开启所述第二音频传输通道,以维持所述第一音频传输通道进行通话。
- 根据权利要求13所述的装置,其中,所述监听模块,包括:监听单元,用于监听所述目标应用程序在所述通话状态中是否调用预设接口函数,其中,所述预设接口函数用于设置传输音频的所述第二音频传输通道;产生单元,用于当调用所述预设接口函数时,则产生所述操作。
- 根据权利要求14所述的装置,其中,所述监听单元还用于监听所述目标应用程序调用所述预设接口函数是否向音频设备状态管理器申请使用所述音频传输通道。
- 根据权利要求14所述的装置,其中,所述处理模块还用于允许所述目 标应用程序调用所述预设接口函数,且所述预设接口函数的功能失效,以维持所述第一音频传输通道进行通话。
- 根据权利要求16所述的装置,其中,所述第一音频传输通道包括听筒通道、扬声器通道、耳机通道;当所述第一音频通道为听筒通道时,允许所述目标应用程序调用第二预设函数,且所述第二预设函数功能失效,以维持听筒通道进行通话,其中,所述第二预设函数用于设置所述扬声器通道,还用于设置所述耳机通道;当所述第一音频通道为扬声器通道时,允许所述目标应用程序调用第二预设函数,且所述第二预设函数功能失效,以维持扬声器通道进行通话;其中,所述第二预设函数用于设置所述听筒通道,还用于设置所述耳机通道;当所述第一音频通道为耳机通道时,允许所述目标应用程序调用第二预设函数,且所述第二预设函数功能失效,以维持耳机道进行通话,其中,所述第二预设函数用于设置所述听筒通道,还用于设置所述扬声器通道。
- 根据权利要求13所述的装置,其中,进一步包括:运行模块,用于获取所述目标应用程序的进程信息并根据所述进程信息判断所述目标应用程序是否在后台运行。
- 根据权利要求13所述的装置,其中,所述处理模块,还用于当所述目标应用程序在前台运行且设置的所述第二传输通道符合预设条件时,允许所述目标应用程序启用所述第二音频传输通道,以使所述目标应用程序通过所述第二音频传输通道进行音频传输。
- 根据权利要求19所述的装置,其中,所述预设条件为所述第二音频传输通道与所述第一音频传输通道不一致,或,预设条件包括所述第二音频传输通道与所述第一音频传输通道一致且所述目标应用程序的使用优先级高于所述通话的使用优先级。
- 根据权利要求19所述的装置,其中,所述处理模块包括:检测单元,用于检测所述通话状态的闲置时间段;处理单元,用于在所述闲置时间段允许所述目标应用程序启用所述第二音频传输通道,以使所述目标应用程序通过所述第二音频传输通道进行音频传输。
- 一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现如权利要求1至12中任一项所述的通话控制方法的步骤。
- 一种电子设备,包括存储器及处理器,所述存储器中储存有计算机可读指令,所述指令被所述处理器执行时,使得所述处理器执行如权利要求1至12中任一项所述的通话控制方法。
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201880097707.5A CN112805988B (zh) | 2018-11-16 | 2018-11-16 | 通话控制方法和装置、计算机可读存储介质、电子设备 |
PCT/CN2018/115984 WO2020097927A1 (zh) | 2018-11-16 | 2018-11-16 | 通话控制方法和装置、计算机可读存储介质、电子设备 |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
PCT/CN2018/115984 WO2020097927A1 (zh) | 2018-11-16 | 2018-11-16 | 通话控制方法和装置、计算机可读存储介质、电子设备 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2020097927A1 true WO2020097927A1 (zh) | 2020-05-22 |
Family
ID=70730396
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2018/115984 WO2020097927A1 (zh) | 2018-11-16 | 2018-11-16 | 通话控制方法和装置、计算机可读存储介质、电子设备 |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN112805988B (zh) |
WO (1) | WO2020097927A1 (zh) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112286856A (zh) * | 2020-10-29 | 2021-01-29 | 维沃移动通信有限公司 | 控制方法和电子设备 |
CN113852780A (zh) * | 2021-09-18 | 2021-12-28 | 联想(北京)有限公司 | 一种音频数据处理方法及电子设备 |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113535113A (zh) * | 2021-07-19 | 2021-10-22 | 上海月猫科技有限公司 | 一种音频共享方法、系统及存储介质 |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20090177965A1 (en) * | 2008-01-04 | 2009-07-09 | International Business Machines Corporation | Automatic manipulation of conflicting media presentations |
CN103596641A (zh) * | 2012-10-18 | 2014-02-19 | 华为终端有限公司 | 一种音频管理方法及装置 |
CN105843466A (zh) * | 2016-03-14 | 2016-08-10 | 广州趣丸网络科技有限公司 | 一种实时语音的方法及装置 |
CN106528735A (zh) * | 2016-10-27 | 2017-03-22 | 北京小米移动软件有限公司 | 控制浏览器播放媒体资源的方法及装置 |
CN107707728A (zh) * | 2017-07-25 | 2018-02-16 | 努比亚技术有限公司 | 一种音频传输切换方法、终端和计算机可读存储介质 |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9716957B2 (en) * | 2013-04-28 | 2017-07-25 | Innovation Sound Technology Co., Ltd. | Headset capable of converting sound channels |
CN107229448A (zh) * | 2017-06-30 | 2017-10-03 | 联想(北京)有限公司 | 音频播放方法及电子设备 |
CN108769431A (zh) * | 2018-07-03 | 2018-11-06 | Oppo(重庆)智能科技有限公司 | 音频播放控制方法、装置、存储介质及移动终端 |
-
2018
- 2018-11-16 WO PCT/CN2018/115984 patent/WO2020097927A1/zh active Application Filing
- 2018-11-16 CN CN201880097707.5A patent/CN112805988B/zh active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20090177965A1 (en) * | 2008-01-04 | 2009-07-09 | International Business Machines Corporation | Automatic manipulation of conflicting media presentations |
CN103596641A (zh) * | 2012-10-18 | 2014-02-19 | 华为终端有限公司 | 一种音频管理方法及装置 |
CN105843466A (zh) * | 2016-03-14 | 2016-08-10 | 广州趣丸网络科技有限公司 | 一种实时语音的方法及装置 |
CN106528735A (zh) * | 2016-10-27 | 2017-03-22 | 北京小米移动软件有限公司 | 控制浏览器播放媒体资源的方法及装置 |
CN107707728A (zh) * | 2017-07-25 | 2018-02-16 | 努比亚技术有限公司 | 一种音频传输切换方法、终端和计算机可读存储介质 |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112286856A (zh) * | 2020-10-29 | 2021-01-29 | 维沃移动通信有限公司 | 控制方法和电子设备 |
CN113852780A (zh) * | 2021-09-18 | 2021-12-28 | 联想(北京)有限公司 | 一种音频数据处理方法及电子设备 |
CN113852780B (zh) * | 2021-09-18 | 2023-03-21 | 联想(北京)有限公司 | 一种音频数据处理方法及电子设备 |
Also Published As
Publication number | Publication date |
---|---|
CN112805988A (zh) | 2021-05-14 |
CN112805988B (zh) | 2022-04-12 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11102697B2 (en) | Method for controlling earphone switching and earphone | |
CN112997470B (zh) | 音频输出控制方法和装置、计算机可读存储介质、电子设备 | |
CN108391205B (zh) | 左右声道切换方法和装置、可读存储介质、终端 | |
WO2021036711A1 (zh) | 网络控制方法及相关产品 | |
WO2020118496A1 (zh) | 音频通路切换方法和装置、可读存储介质、电子设备 | |
CN113039516B (zh) | 一种对应用程序进行处理的方法、装置和电子设备 | |
US11800431B2 (en) | Access control method, message broadcasting method, and related devices | |
WO2018049934A1 (zh) | 一种数据迁移的方法及终端 | |
CN108958695B (zh) | 音频输出方法、装置及计算机可读存储介质 | |
CN109067965B (zh) | 翻译方法、翻译装置、可穿戴装置及存储介质 | |
WO2020097927A1 (zh) | 通话控制方法和装置、计算机可读存储介质、电子设备 | |
JP2021508989A (ja) | サービス処理方法及び移動通信端末 | |
CN113039518B (zh) | 播放控制方法和装置、计算机可读存储介质、电子设备 | |
WO2020103045A1 (zh) | 一种对应用程序进行处理的方法、装置和电子设备 | |
CN108668018B (zh) | 移动终端、音量控制方法及相关产品 | |
WO2020124541A1 (zh) | 音频处理方法和装置、计算机可读存储介质、电子设备 | |
WO2020107177A1 (zh) | 一种音频资源调用的方法、装置及电子设备 | |
US20210286588A1 (en) | Method and apparatus for playing alarm and electronic device | |
WO2020103073A1 (zh) | 音频资源处理方法和装置、计算机可读存储介质、电子设备 | |
WO2019084757A1 (zh) | 控制应用程序使用时间的方法和装置 | |
JP7379714B2 (ja) | マルチキャストサービス処理方法、マルチキャストサービス構成方法、端末及びネットワーク機器 | |
WO2018166089A1 (zh) | 一种控制声音的方法及移动终端 | |
US11637921B2 (en) | Enabling vibration notification based on environmental noise | |
WO2020107169A1 (zh) | 一种音频模式校正的方法、装置及电子设备 | |
CN109246290B (zh) | 一种权限管理方法及移动终端 |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 18939965 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 18939965 Country of ref document: EP Kind code of ref document: A1 |
|
32PN | Ep: public notification in the ep bulletin as address of the adressee cannot be established |
Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 15/09/2021) |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 18939965 Country of ref document: EP Kind code of ref document: A1 |