CN111491278B - Method and terminal for playing audio through Bluetooth device - Google Patents

Method and terminal for playing audio through Bluetooth device Download PDF

Info

Publication number
CN111491278B
CN111491278B CN201910087080.1A CN201910087080A CN111491278B CN 111491278 B CN111491278 B CN 111491278B CN 201910087080 A CN201910087080 A CN 201910087080A CN 111491278 B CN111491278 B CN 111491278B
Authority
CN
China
Prior art keywords
bluetooth
audio
terminal
user
target
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910087080.1A
Other languages
Chinese (zh)
Other versions
CN111491278A (en
Inventor
王双
赵辉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hisense Mobile Communications Technology Co Ltd
Original Assignee
Hisense Mobile Communications Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hisense Mobile Communications Technology Co Ltd filed Critical Hisense Mobile Communications Technology Co Ltd
Priority to CN201910087080.1A priority Critical patent/CN111491278B/en
Publication of CN111491278A publication Critical patent/CN111491278A/en
Application granted granted Critical
Publication of CN111491278B publication Critical patent/CN111491278B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/80Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication
    • GPHYSICS
    • G11INFORMATION STORAGE
    • G11BINFORMATION STORAGE BASED ON RELATIVE MOVEMENT BETWEEN RECORD CARRIER AND TRANSDUCER
    • G11B31/00Arrangements for the associated working of recording or reproducing apparatus with related apparatus
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/14Direct-mode setup
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Abstract

The invention relates to the technical field of Bluetooth communication, in particular to a method and a terminal for playing audio through Bluetooth equipment, which are used for solving the problem that the scheme for playing the terminal audio through the Bluetooth equipment in the prior art is not flexible enough. After the terminal starts the Bluetooth, the terminal establishes connection with at least two Bluetooth devices supporting audio playing; the terminal determines a target Bluetooth device selected by a user from at least two Bluetooth devices connected with the terminal through a Bluetooth selection interface of the terminal according to an operation instruction of the user; the terminal switches the audio channel to be played to the target Bluetooth device through the Bluetooth control interface so that the target Bluetooth device plays the audio to be played. According to the scheme for playing the terminal audio through the Bluetooth equipment, the Bluetooth equipment for playing the audio can be reasonably selected according to the requirements of the user, and the flexibility of the method for playing the audio through the Bluetooth equipment is improved.

Description

Method and terminal for playing audio through Bluetooth device
Technical Field
The invention relates to the technical field of Bluetooth communication, in particular to a method and a terminal for playing audio through Bluetooth equipment.
Background
At present, the same terminal may establish a communication connection with two bluetooth devices, and after the communication connection is successfully established, the terminal also establishes a connection with A2DP (Advanced Audio Distribution Profile) and HFP (Hands-free Profile) data channels of each bluetooth device. The A2DP data channel is used for playing media audio of the terminal, and the HFP data channel is used for playing terminal call audio. But only one channel of one bluetooth device is in an active state, and the other channels are in a dormant state, namely, only one bluetooth device can play media audio or call audio.
In the prior art, when audio needs to be played through a bluetooth device, a terminal determines the bluetooth device used for playing the type of audio for the last time, and still adopts the bluetooth device used for the last time during the playing; for example, when media audio playing is started, if it is determined that the bluetooth device used when the media audio is played last time is the bluetooth device1, the terminal uses the bluetooth device1 to play the media audio; for another example, when the call audio is started, if it is determined that the bluetooth device used when the audio was played last time is the bluetooth device2, the terminal uses the bluetooth device2 to play the call audio. However, for the user, when the media audio or the call audio is played through the bluetooth device, only the bluetooth device which is used for playing the same type of audio at the last time can be adopted, so that it is difficult to ensure that the bluetooth device which is to be used for playing the media audio or the call audio at this time meets the user requirement; for example, the terminal establishes a connection with the bluetooth headset and the vehicle-mounted device at the same time, and when the terminal starts a call service, the user wants to play the call audio through the bluetooth headset, but since the bluetooth device used for playing the call service is played last time, the situation that the call audio is played through the vehicle-mounted device occurs.
To sum up, the current scheme for playing the terminal audio through the bluetooth device cannot reasonably select the bluetooth device to be used for playing the media audio or the call audio according to the requirement of the user, and the current scheme for playing the terminal audio through the bluetooth device is not flexible.
Disclosure of Invention
The invention provides a method and a terminal for playing audio through Bluetooth equipment, which are used for solving the problems that in the prior art, the scheme for playing the terminal audio through the Bluetooth equipment cannot reasonably select the Bluetooth equipment to be used for playing media audio or call audio according to the requirements of a user, and the current scheme for playing the terminal audio through the Bluetooth equipment is not flexible enough.
Based on the foregoing problems, in a first aspect, an embodiment of the present invention provides a method for playing audio through a bluetooth device, where the method includes:
after the terminal starts the Bluetooth, the terminal establishes connection with at least two Bluetooth devices supporting audio playing;
the terminal determines a target Bluetooth device selected by the user from at least two Bluetooth devices connected with the terminal through a Bluetooth selection interface of the terminal according to an operation instruction of the user; the target Bluetooth device is one of at least two Bluetooth devices connected with the terminal;
and the terminal switches the audio channel to be played to the target Bluetooth equipment through a Bluetooth control interface so that the target Bluetooth equipment plays the audio to be played.
In a second aspect, an embodiment of the present invention provides a terminal, including:
the Bluetooth connection module is used for establishing connection with at least two Bluetooth devices supporting audio playing after the Bluetooth of the terminal is started;
the Bluetooth selection module is used for determining target Bluetooth equipment selected by a user from at least two Bluetooth equipment connected with the terminal through a Bluetooth selection interface of the terminal according to an operation instruction of the user;
and the audio processing module is used for switching an audio channel to be played to the target Bluetooth equipment through a Bluetooth control interface so as to enable the target Bluetooth equipment to play the audio to be played.
In a third aspect, an embodiment of the present invention provides a system for playing an audio, including a terminal and at least two bluetooth devices supporting audio playing;
the terminal is used for establishing connection with the at least two Bluetooth devices after Bluetooth is started; according to an operation instruction of a user, determining a target Bluetooth device selected by the user from at least two Bluetooth devices connected with the terminal through a Bluetooth selection interface of the terminal; switching an audio channel to be played to the target Bluetooth equipment through a Bluetooth control interface;
and the target Bluetooth equipment is used for playing the audio to be played after receiving the audio to be played.
After the terminal establishes connection with at least two Bluetooth devices supporting audio playing, the terminal can determine a target Bluetooth device selected by a user from the Bluetooth devices connected with the terminal according to an operation instruction of the user; the terminal switches the audio channel to be played to the target Bluetooth equipment through the Bluetooth control interface, and the target Bluetooth equipment plays the audio to be played; according to the embodiment of the invention, the user sets the target Bluetooth equipment according to the self requirement, and after the terminal determines the target Bluetooth equipment set by the user, the audio is played through the target Bluetooth equipment set by the user, so that the scheme for playing the terminal audio through the Bluetooth equipment provided by the embodiment of the invention can reasonably select the Bluetooth equipment for playing the audio according to the requirement of the user, and the flexibility of the method for playing the audio through the Bluetooth equipment is improved.
Drawings
FIG. 1 is a diagram of a Bluetooth protocol framework according to an embodiment of the present invention;
fig. 2 is a schematic diagram illustrating a connection establishment method between a first terminal and a bluetooth device according to an embodiment of the present invention;
FIG. 3 is a flowchart illustrating a method for playing audio via a Bluetooth device according to an embodiment of the present invention;
fig. 4 is a schematic diagram illustrating a connection establishment method between a second terminal and a bluetooth device according to an embodiment of the present invention;
fig. 5 is a schematic diagram of a bluetooth selection interface of a first terminal according to an embodiment of the present invention;
fig. 6 is a schematic diagram of a bluetooth selection interface of a second terminal according to an embodiment of the present invention;
fig. 7 is an overall flowchart of playing audio via a bluetooth device according to a first embodiment of the present invention;
fig. 8 is a schematic diagram of a bluetooth selection interface of a third terminal according to an embodiment of the present invention;
fig. 9 is a schematic diagram of a bluetooth selection interface of a fourth terminal according to an embodiment of the present invention;
fig. 10 is an overall flowchart of the second embodiment of the present invention for playing audio via bluetooth devices;
fig. 11 is a schematic structural diagram of a terminal according to an embodiment of the present invention;
fig. 12 is a schematic structural diagram of a system for playing audio according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer, the present invention will be described in further detail with reference to the accompanying drawings, and it is apparent that the described embodiments are only a part of the embodiments of the present invention, not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Bluetooth wireless communication technology has started from version 4.0 and includes two standards, namely, Bluetooth dual-mode standard, which includes two parts, namely, conventional Bluetooth (or Classic Bluetooth) and Bluetooth Low Energy (Bluetooth Low Energy). For example, a classic bluetooth device may be a bluetooth headset, a speaker, an in-vehicle device, etc.; the low-power consumption bluetooth equipment can be for intelligent wearing equipment, intelligent bracelet, mouse, keyboard etc.. Since the dual mode standard is supported, the terminal can theoretically connect a plurality of different bluetooth devices at the same time.
When the terminal is connected with the bluetooth device, besides a transmission link of information data stream is realized through a bluetooth bottom layer protocol, functions such as decomposition and recombination of data frames, quality of service control, group extraction and the like are completed through a bluetooth intermediate protocol, for each specific application scene and different protocol stacks of each application, Profile (configuration file) corresponding to a bluetooth high layer protocol is needed to realize combination of bottom-up protocols corresponding to a certain function, each Profile corresponds to different application functions, wherein the bluetooth device supporting audio playing comprises support HFP and A2DP which are respectively used for processing application scenes related to conversation audio and media audio. The bluetooth protocol framework is shown in fig. 1 and includes a bottom layer protocol, a middle layer protocol and an application high layer protocol; wherein the bottom layer protocol comprises a Link Management Protocol (LMP), a baseband (Base Band) and a Radio Frequency (RF); the intermediate protocol layer comprises a logical link control and adaptation protocol (L2CAP), a serial port simulation protocol (RFCOMM) and a Service Discovery Protocol (SDP); the application high-level protocols include A2DP, HFP, HSP, OPP, PBAP, PAN, HID, SPP, etc. (of which only A2DP and HFP are taken as examples in fig. 1), A2DP is used to process media audio according to AT commands, and HFP is used to process call audio according to AT commands.
After the terminal establishes a connection with two bluetooth devices supporting call audio and media audio simultaneously, an audio channel as shown in fig. 2 is established. Suppose that the terminal establishes a first media audio channel and a first call audio channel with the bluetooth device1, and the terminal establishes a second media audio channel and a second call audio channel with the bluetooth device 2. And the terminal controls the first media audio channel of the Bluetooth device1 and the second media audio channel of the Bluetooth device2 through the internal media audio channel control module, and controls the first call audio channel of the Bluetooth device1 and the second call audio channel of the Bluetooth device2 through the internal call audio control module. The media audio channel and the call audio channel are two mutually independent channels, and only one channel is in an activated state at the same time. In the audio playing mode in the prior art, when a terminal starts media audio or call audio playing, the terminal selects an audio channel to be used through respective corresponding audio channel control modules. For example, when the terminal starts a call audio, the call audio control module determines the bluetooth device used by playing last time, and if the bluetooth device1 is assumed, the call audio control module activates a first call audio channel of the bluetooth device1 and plays the call audio through the first call audio channel.
In the prior art, a terminal establishes a media audio channel and a call audio channel for each Bluetooth device, a call audio control module is used for selecting the call audio channel, and the media audio control module is used for selecting the media audio channel and adopts the audio channel used by playing audio at the last time; however, before playing the audio, the user cannot know from which bluetooth device the audio to be played will be played, and cannot reasonably select the bluetooth device to be used for playing the media audio or the call audio according to the user's requirement.
An embodiment of the present invention provides a method for playing audio through a bluetooth device, as shown in fig. 3, the method includes:
step 301, after the terminal starts the bluetooth, establishing connection with at least two bluetooth devices supporting audio playing;
step 302, the terminal determines a target bluetooth device selected by the user from at least two bluetooth devices connected with the terminal through a bluetooth selection interface of the terminal according to an operation instruction of the user;
step 303, the terminal switches the audio channel to be played to the target bluetooth device through the bluetooth control interface, so that the target bluetooth device plays the audio to be played.
The at least two Bluetooth devices connected with the terminal are Bluetooth devices supporting media audio playing and/or conversation audio playing; the audio to be played is media audio or call audio.
After the terminal establishes connection with at least two Bluetooth devices supporting audio playing, the terminal can determine a target Bluetooth device selected by a user from the Bluetooth devices connected with the terminal according to an operation instruction of the user; the terminal switches the audio channel to be played to the target Bluetooth equipment through the Bluetooth control interface, and the target Bluetooth equipment plays the audio to be played; according to the embodiment of the invention, the user sets the target Bluetooth equipment according to the self requirement, the terminal determines the target Bluetooth equipment set by the user, and the audio is played through the target Bluetooth equipment set by the user, so that the scheme for playing the terminal audio through the Bluetooth equipment provided by the embodiment of the invention can reasonably select the Bluetooth equipment for playing the audio according to the requirement of the user, and the flexibility of the method for playing the audio through the Bluetooth equipment is improved.
An optional way to implement the above playing audio through the bluetooth device is to add a channel switching preprocessing module in the terminal, where the channel switching preprocessing module maintains a bluetooth device list connected to the terminal and a target bluetooth device selected by a user. Before the terminal plays audio, the channel switching preprocessing module determines an audio channel required to be used according to the target Bluetooth device set by the user and informs the corresponding audio channel control module.
In the embodiment of the invention, after the terminal establishes connection with two Bluetooth devices which simultaneously support conversation audio and media audio, an audio channel as shown in figure 4 is established. Suppose that the terminal establishes a first media audio channel and a first call audio channel with the bluetooth device1, and the terminal establishes a second media audio channel and a second call audio channel with the bluetooth device 2. A channel switching preprocessing module, a media audio channel control module and a call audio control module are arranged in the terminal; the terminal determines that a target Bluetooth device set by a user is a Bluetooth device1 through a channel switching preprocessing module, and when the audio to be played is a call audio, the channel switching preprocessing module informs a call audio control module to activate a first call audio channel of the Bluetooth device1 and uses the first call audio channel to play the call audio; when the audio to be played by the terminal is the media audio, the channel switching preprocessing module informs the media audio control module to activate the first media audio channel of the bluetooth device1, and the first media audio channel is used to play the media audio.
In implementation, the bluetooth control interface mainly implements switching logic for controlling the output device of the audio channel; wherein, the output device of the audio channel comprises all connected Bluetooth audio devices, hands-free devices, earphones, wired earphones and the like.
After the terminal starts the bluetooth, any method in the prior art may be used to establish a connection with at least two bluetooth devices that support playing media audio and/or call audio, which is not limited herein.
After the terminal establishes connection with the Bluetooth equipment, a Bluetooth selection interface is presented to a user; the Bluetooth selection interface comprises a list of at least two Bluetooth devices connected with the terminal.
After the terminal presents the Bluetooth selection interface to the user, the user selects a target Bluetooth device for playing audio through the Bluetooth selection interface.
In implementation, a user can select one bluetooth device from a bluetooth device list contained in a bluetooth selection interface as a target bluetooth device; or the user selects two Bluetooth devices from a Bluetooth device list contained in the Bluetooth selection interface, and the two Bluetooth devices are respectively used as a first target Bluetooth device for playing the call audio and a second target Bluetooth device for playing the media audio.
The following is a detailed description of different numbers of target bluetooth devices.
Firstly, selecting a target Bluetooth device.
For example, after the terminal starts the bluetooth, the terminal establishes connection with two bluetooth devices supporting audio playing, and the two bluetooth devices are respectively a bluetooth device1 and a bluetooth device 2; as shown in fig. 5, a bluetooth selection interface of the terminal includes a list of bluetooth devices 1 and 2;
in addition, the Bluetooth selection interface also comprises a default option which indicates that the user does not select the target Bluetooth equipment when the user selects the default option;
it should be noted that, when the user does not select the target bluetooth device, and the audio to be played is the call audio, the terminal switches the call audio channel to be played to the bluetooth device used when the call audio is played last time through the bluetooth control interface, and the bluetooth device used when the call audio is played last time plays the call audio to be played; when the audio to be played is the media audio, the terminal switches the media audio channel to be played to the Bluetooth device used for playing the media audio last time through the Bluetooth control interface, and the Bluetooth device used for playing the media audio last time plays the media audio to be played; the Bluetooth device used for playing the media audio last time can be the same as or different from the Bluetooth device used for playing the call audio last time.
After the user selects the bluetooth device1, the terminal has a bluetooth selection interface as shown in fig. 6 according to the operation instruction of the user. Indicating that the user sets the bluetooth device1 as a target bluetooth device.
It should be noted that the foregoing description of the bluetooth selection interface in the embodiment of the present invention is only exemplary, and other manners of presenting the bluetooth selection interface are also applicable to the present invention.
An optional implementation manner is that, in the embodiment of the present invention, the terminal defines a static variable, targetglobothdevice, for recording information of a target bluetooth device selected by a user; after a user selects a target Bluetooth device in a Bluetooth selection interface through an operation command, the terminal sets the value of a static variable targetBluetooth device as identification information of the target Bluetooth device selected by the user; for example, when the user selects the bluetooth device1 as the target bluetooth device through the operation instruction, the value of the targetbluetooth device is set as the identification information of the bluetooth device 1; or, when the user selects the bluetooth device2 as the target bluetooth device through the operation instruction, the value of the targetbluetooth device is set as the identification information of the bluetooth device 2.
In addition, when the user selects the "default" option in the bluetooth selection interface, which indicates that the user has not selected the target bluetooth device, the value of the static variable targetglobothdevice is set to "null" at this time.
After a target Bluetooth device is set in the mode, before audio is played, the terminal obtains the value of a static variable targetBlueToothdevice, and the target Bluetooth device selected by a user is determined according to the value of the static variable targetBlueToothdevice;
for example, if the value of the static variable targetblockothdevice is the identification information of the bluetooth device1, the terminal switches the audio channel to be played to the bluetooth device1, and the bluetooth device1 plays the audio to be played; and if the value of the static variable targetBlueTothdevice is the information of the Bluetooth device2, the terminal switches the audio channel to be played to the Bluetooth device2, and the Bluetooth device2 plays the audio to be played.
It should be noted that, when only one target bluetooth device is set, and when the audio to be played is a call audio or a media audio, the terminal sends the audio to be played to the same target bluetooth device selected by the user.
The method for playing audio via a bluetooth device when selecting a target device will be described in detail below with reference to fig. 7.
Suppose that the terminal establishes a connection with two bluetooth devices after bluetooth is turned on, and both bluetooth devices support call audio and media audio.
As shown in fig. 7, a flowchart of playing audio through a bluetooth device according to an embodiment of the present invention:
step 701, the terminal starts Bluetooth;
step 702, establishing connection between a terminal and two Bluetooth devices;
step 703, the terminal presents the bluetooth selection interface to the user; the Bluetooth selection interface comprises a list of two Bluetooth devices connected with the terminal;
step 704, when the audio to be played is a call audio, the terminal judges whether a target Bluetooth device is set by the user according to an operation instruction of the user; if yes, go to step 705, if no, go to step 706;
step 705, the terminal switches the communication audio channel to be played to the target bluetooth device, and the target bluetooth device plays the communication audio;
step 706, the terminal switches the channel of the call audio to be played to the bluetooth device used for playing the call audio last time, and the bluetooth device used for playing the call audio last time plays the call audio;
step 707, when the audio to be played is a media audio, the terminal determines whether the user is provided with a target bluetooth device according to an operation instruction of the user; if yes, go to step 708, if no, go to step 709;
step 708, the terminal switches a media audio channel to be played to a target bluetooth device, and the target bluetooth device plays the media audio;
step 709, the terminal switches the media audio channel to be played to the bluetooth device used for playing the media audio last time, and the bluetooth device used for playing the media audio last time plays the media audio.
And II, selecting two target Bluetooth devices.
The two target bluetooth devices selected by the user are respectively: the device comprises a first target Bluetooth device used for playing conversation audio and a second target Bluetooth device used for playing media audio.
For example, after the terminal starts the bluetooth, the terminal establishes connection with two bluetooth devices supporting audio playing, and the two bluetooth devices are respectively a bluetooth device1 and a bluetooth device 2;
the bluetooth selection interface of the terminal is shown in fig. 8, and the bluetooth selection interface of the terminal includes a selection area of a first target bluetooth device and a selection area of a second target bluetooth device; the selection area of the first target bluetooth device contains a bluetooth device list (bluetooth device1 and bluetooth device 2) connected with the terminal, and the selection area of the second target bluetooth device contains a bluetooth device list (bluetooth device1 and bluetooth device 2) connected with the terminal.
It should be noted that the first target bluetooth device and the second target bluetooth device in the embodiment of the present invention may be the same or different, that is, the user may select the same bluetooth device to play the media audio and the call audio, or select different bluetooth devices to play the media audio and the call audio, respectively.
In addition, the selection area of the first target Bluetooth device and the selection area of the second target Bluetooth device both comprise a default option;
specifically, if the user selects the default option in the selection area of the first target bluetooth device, it indicates that the user does not select the first target bluetooth device for playing the call audio; under the condition, when the audio to be played is the call audio, the terminal switches the call audio channel to be played to the Bluetooth device used for playing the call audio last time, and the Bluetooth device used for playing the call audio last time plays the call audio to be played;
if the user selects the default option in the selection area of the second target Bluetooth device, the user does not select the second target Bluetooth device for playing the media audio; under the condition, when the audio to be played is the media audio, the terminal switches the media audio channel to be played to the bluetooth device used for playing the media audio last time, and the bluetooth device used for playing the media audio last time plays the media audio to be played.
It is assumed that the first target bluetooth device and the second target bluetooth device selected by the terminal according to the operation instruction of the user are as shown in fig. 9; it means that the user sets the first target bluetooth device as bluetooth device1 and sets the second target bluetooth device as bluetooth device 2. When the audio to be played is a call audio, the terminal switches the call audio channel to be played to the bluetooth device1, and the bluetooth device1 plays the call audio channel; when the audio to be played is the media audio, the terminal switches the media audio channel to be played to the bluetooth device2, and the bluetooth device2 plays the audio.
It should be noted that the above description of the bluetooth selection interface in the embodiment of the present invention is only exemplary, and other presentation manners of the bluetooth selection interface are also applicable to the present invention.
An optional implementation manner is that, in the embodiment of the present invention, the terminal defines two static variables, which are respectively used to record information of the first target bluetooth device and information of the second target bluetooth device set by the user; for example, the two static variables are targetbiunterothdevice 1 and targetbiunterothdevice 2, respectively, where targetbiunterothdevice 1 is used to record identification information of a first target bluetooth device set by a user, and targetbiunterothdevice 2 is used to record identification information of a second target bluetooth device set by the user.
For a first target bluetooth device: after a user selects a first target Bluetooth device from a corresponding Bluetooth device list in a selection area of the first target Bluetooth device in a Bluetooth selection interface through an operation command, the terminal sets the value of a static variable targetBlueToothdevice1 as identification information of the first target Bluetooth device selected by the user; for example, when the user selects the bluetooth device1 as the first target bluetooth device through the operation instruction, the value of the targetglobothdevice 1 is set as the identification information of the bluetooth device 1; or when the user selects the bluetooth device2 as the first target bluetooth device through the operation instruction, setting the value of the targetbluetooth device1 as the identification information of the bluetooth device 2;
in addition, when the user selects the "default" option while selecting the first target bluetooth device, which means that the user does not select the first target bluetooth device, the value of the static variable targetglobothdevice 1 is set to "null" at this time.
For a second target bluetooth device: after a user selects a second target Bluetooth device from the corresponding Bluetooth device list in a selected area of the second target Bluetooth device in the Bluetooth selection interface through an operation command, the terminal sets the value of a static variable targetBluetooth device2 as the identification information of the second target Bluetooth device selected by the user; for example, when the user selects the bluetooth device1 as the second target bluetooth device through the operation instruction, the value of the targetglobothdevice 2 is set as the identification information of the bluetooth device 1; or when the user selects the bluetooth device2 as the second target bluetooth device through the operation instruction, setting the value of the targetbluetooth device2 as the identification information of the bluetooth device 2;
in addition, when the user selects the "default" option while selecting the second target bluetooth device, which means that the user does not select the second target bluetooth device, the value of the static variable targetglobothdevice 2 is set to "null" at this time.
After the first target Bluetooth device and the second target Bluetooth device are set in the manner, the terminal determines a first target Bluetooth device selected by the user from the list of the at least two Bluetooth devices and used for playing the call audio according to a first operation instruction of the user; and according to a second operation instruction of the user, determining a second target Bluetooth device selected by the user from the list of the at least two Bluetooth devices and used for playing the media audio.
Specifically, when the audio to be played is a call audio, the terminal obtains a value of a static variable targetblockothdevice 1, and determines a first target bluetooth device according to the value of the static variable targetblockothdevice 1; for example, if the value of the static variable targetblockothdevice 1 is the identification information of the bluetooth device1, the terminal determines that the first target bluetooth device for playing the call audio is the bluetooth device 1; or, if the value of the static variable targetbetalotythevice 1 is the identification information of the bluetooth device2, the terminal determines that the first target bluetooth device for playing the call audio is the bluetooth device 2.
When the audio to be played is media audio, the terminal obtains the value of a static variable targetBlueTothdevice 2, and determines a second target Bluetooth device according to the value of the static variable targetBlueTothdevice 2; for example, if the value of the static variable targetbetalotythevice 2 is the identification information of the bluetooth device1, the terminal determines that the second target bluetooth device for playing the media audio is the bluetooth device 1; or, if the value of the static variable targetbetalotythevice 2 is the identification information of the bluetooth device2, the terminal determines that the second target bluetooth device for playing the media audio is the bluetooth device 2.
The method for playing audio through a bluetooth device when two target devices are selected will be described in detail with reference to fig. 10.
Suppose that the terminal establishes a connection with two bluetooth devices after bluetooth is turned on, and both bluetooth devices support call audio and media audio.
As shown in fig. 10, a flowchart of playing audio through a bluetooth device according to an embodiment of the present invention:
step 1001, the terminal starts Bluetooth;
step 1002, establishing connection between a terminal and two Bluetooth devices;
step 1003, the terminal presents a Bluetooth selection interface to a user; the Bluetooth selection interface comprises a selection area of a first target Bluetooth device and a selection area of a second target Bluetooth device, and the selection areas of the first target Bluetooth device and the second target Bluetooth device both comprise a list of two Bluetooth devices connected with the terminal;
step 1004, when the audio to be played is a call audio, the terminal judges whether a first target Bluetooth device for playing the call audio is set by the user according to an operation instruction of the user; if yes, go to step 1005, otherwise go to step 1006;
step 1005, the terminal switches the communication audio channel to be played to the first target Bluetooth device, and the first target Bluetooth device plays the communication audio;
step 1006, the terminal switches the channel of the call audio to be played to the bluetooth device used for playing the call audio last time, and the bluetooth device used for playing the call audio last time plays the call audio;
step 1007, when the audio to be played is the media audio, the terminal judges whether the user is provided with a second target bluetooth device for playing the media audio according to the operation instruction of the user; if yes, go to step 1008, if no, go to step 1009;
step 1008, the terminal switches a media audio channel to be played to a second target bluetooth device, and the second target bluetooth device plays the media audio;
step 1009, the terminal switches the media audio channel to be played to the bluetooth device used for playing the media audio last time, and the bluetooth device used for playing the media audio last time plays the media audio.
Based on the same inventive concept, the embodiment of the present invention further provides a terminal, and as the principle of solving the problem of the terminal is similar to the method of playing the audio through the bluetooth device in the embodiment of the present invention, the implementation of the terminal may refer to the implementation of the method, and repeated details are not repeated.
As shown in fig. 11, a first smart device according to an embodiment of the present invention includes: a Bluetooth connection module 1101, a Bluetooth selection module 1102 and an audio processing module 1103;
the bluetooth connection module 1101 is configured to establish connection with at least two bluetooth devices supporting audio playing after bluetooth of the terminal is turned on;
a bluetooth selection module 1102, configured to determine, according to an operation instruction of a user, a target bluetooth device selected by the user from at least two bluetooth devices connected to the terminal through a bluetooth selection interface of the terminal;
the audio processing module 1103 is configured to switch an audio channel to be played to the target bluetooth device through the bluetooth control interface, so that the target bluetooth device plays an audio to be played.
Optionally, the at least two bluetooth devices connected to the terminal are bluetooth devices supporting playing of media audio and/or call audio;
the audio to be played is media audio or call audio.
Optionally, the bluetooth selection module 1102 is further configured to:
presenting a Bluetooth selection interface including a list of the at least two Bluetooth devices connected with the terminal to a user to cause the user to select the target Bluetooth device from the list.
Optionally, the bluetooth selection module 1102 is specifically configured to:
and determining that one Bluetooth device selected by the user from the list of the at least two Bluetooth devices is the target Bluetooth device according to the operation instruction of the user.
Optionally, the bluetooth selection module 1102 is specifically configured to:
determining a first target Bluetooth device selected by the user from the list of the at least two Bluetooth devices and used for playing the call audio according to a first operation instruction of the user; and according to a second operation instruction of the user, determining a second target Bluetooth device selected by the user from the list of the at least two Bluetooth devices and used for playing the media audio.
As shown in fig. 12, an audio playing system according to an embodiment of the present invention includes a terminal 1201 and at least two bluetooth devices 1202; wherein the at least two Bluetooth devices support playing audio;
the terminal 1201 is used for establishing connection with the at least two Bluetooth devices after Bluetooth is started; according to an operation instruction of a user, determining a target Bluetooth device selected by the user from at least two Bluetooth devices connected with the terminal through a Bluetooth selection interface of the terminal; switching an audio channel to be played to the target Bluetooth equipment through a Bluetooth control interface;
the bluetooth device 1202 is configured to play the audio to be played after receiving the audio to be played.
The present application is described above with reference to block diagrams and/or flowchart illustrations of methods, apparatus (systems) and/or computer program products according to embodiments of the application. It will be understood that one block of the block diagrams and/or flowchart illustrations, and combinations of blocks in the block diagrams and/or flowchart illustrations, 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, and/or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer and/or other programmable data processing apparatus, create means for implementing the functions/acts specified in the block diagrams and/or flowchart block or blocks.
Accordingly, the subject application may also be embodied in hardware and/or in software (including firmware, resident software, micro-code, etc.). Furthermore, the present application may take the form of a computer program product on a computer-usable or computer-readable storage medium having computer-usable or computer-readable program code embodied in the medium for use by or in connection with an instruction execution system. In the context of this application, a computer-usable or computer-readable medium may be any medium that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.

Claims (10)

1. A method for playing audio via a bluetooth device, the method comprising:
after the terminal starts the Bluetooth, the terminal establishes connection with at least two Bluetooth devices supporting audio playing and presents a Bluetooth selection interface to a user; the terminal and at least two Bluetooth devices respectively establish respective media audio channels and communication audio channels;
the terminal determines that the user selects one Bluetooth device selected from at least two Bluetooth devices connected with the terminal as a target Bluetooth device through a Bluetooth selection interface of the terminal according to an operation instruction of the user; or determining two Bluetooth devices which are selected by the user from at least two Bluetooth devices connected with the terminal through a Bluetooth selection interface of the terminal and are respectively used for playing different types of audio as target Bluetooth devices;
after receiving the audio to be played, the terminal activates an audio channel corresponding to the type of the audio to be played in the target Bluetooth equipment through a channel switching preprocessing module according to the type of the audio to be played and the target Bluetooth equipment selected by the user;
and the terminal transmits the audio to be played to the activated audio channel in the target Bluetooth equipment through a Bluetooth control interface, so that the target Bluetooth equipment plays the audio to be played through the activated audio channel.
2. The method of claim 1, wherein the at least two bluetooth devices establishing connection with the terminal are bluetooth devices supporting playing media audio and/or call audio;
the audio to be played is media audio or call audio.
3. The method of claim 2, wherein after the terminal establishes connection with at least two bluetooth devices supporting audio playing, before determining a target bluetooth device set by the user through a bluetooth selection interface of the terminal according to an operation instruction of the user, further comprising:
the terminal presents a bluetooth selection interface including a list of the at least two bluetooth devices connected to the terminal to a user, so that the user selects the target bluetooth device from the list.
4. The method of claim 3, wherein the terminal determines the target Bluetooth device set by the user through the Bluetooth selection interface of the terminal according to the operation instruction of the user, and the method comprises the following steps:
and the terminal determines that one Bluetooth device selected by the user from the list of the at least two Bluetooth devices is the target Bluetooth device according to the operation instruction of the user.
5. The method of claim 3, wherein the terminal determines the target Bluetooth device set by the user through the Bluetooth selection interface of the terminal according to the operation instruction of the user, and the method comprises the following steps:
the terminal determines a first target Bluetooth device selected by the user from the list of the at least two Bluetooth devices and used for playing the call audio according to a first operation instruction of the user; and determining a second target Bluetooth device selected by the user from the list of the at least two Bluetooth devices for playing the media audio according to a second operation instruction of the user.
6. A terminal, comprising:
the Bluetooth connection module is used for establishing connection with at least two Bluetooth devices supporting audio playing after the Bluetooth of the terminal is started, and presenting a Bluetooth selection interface to a user; the terminal and at least two Bluetooth devices respectively establish respective media audio channels and communication audio channels;
the Bluetooth selection module is used for determining one Bluetooth device selected from at least two Bluetooth devices connected with the terminal as a target Bluetooth device through a Bluetooth selection interface of the terminal by the user according to an operation instruction of the user; or determining two Bluetooth devices which are selected by the user from at least two Bluetooth devices connected with the terminal through a Bluetooth selection interface of the terminal and are respectively used for playing different types of audio as target Bluetooth devices;
the audio processing module is used for activating an audio channel corresponding to the type of the audio to be played in the target Bluetooth equipment through the channel switching preprocessing module according to the type of the audio to be played and the target Bluetooth equipment selected by the user after receiving the audio to be played; and transmitting the audio to be played to the activated audio channel in the target Bluetooth equipment through a Bluetooth control interface so that the target Bluetooth equipment plays the audio to be played through the activated audio channel.
7. The terminal of claim 6, wherein the at least two Bluetooth devices establishing connection with the terminal are Bluetooth devices supporting playing media audio and/or call audio;
the audio to be played is media audio or call audio.
8. The terminal of claim 7, wherein the bluetooth selection module is further configured to:
presenting a Bluetooth selection interface including a list of the at least two Bluetooth devices connected with the terminal to a user to cause the user to select the target Bluetooth device from the list.
9. The terminal of claim 8, wherein the bluetooth selection module is specifically configured to:
and determining that one Bluetooth device selected by the user from the list of the at least two Bluetooth devices is the target Bluetooth device according to the operation instruction of the user.
10. The terminal of claim 8, wherein the bluetooth selection module is specifically configured to:
determining a first target Bluetooth device selected by the user from the list of the at least two Bluetooth devices and used for playing the call audio according to a first operation instruction of the user; and according to a second operation instruction of the user, determining a second target Bluetooth device selected by the user from the list of the at least two Bluetooth devices and used for playing the media audio.
CN201910087080.1A 2019-01-29 2019-01-29 Method and terminal for playing audio through Bluetooth device Active CN111491278B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910087080.1A CN111491278B (en) 2019-01-29 2019-01-29 Method and terminal for playing audio through Bluetooth device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910087080.1A CN111491278B (en) 2019-01-29 2019-01-29 Method and terminal for playing audio through Bluetooth device

Publications (2)

Publication Number Publication Date
CN111491278A CN111491278A (en) 2020-08-04
CN111491278B true CN111491278B (en) 2022-09-02

Family

ID=71812226

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910087080.1A Active CN111491278B (en) 2019-01-29 2019-01-29 Method and terminal for playing audio through Bluetooth device

Country Status (1)

Country Link
CN (1) CN111491278B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112367558B (en) * 2020-10-29 2023-12-05 深圳Tcl新技术有限公司 Application playing acceleration method, intelligent playing device and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103312864A (en) * 2012-03-09 2013-09-18 深圳市三诺电子有限公司 Intelligent terminal and method for controlling bluetooth device via intelligent terminal
CN103636141A (en) * 2012-11-16 2014-03-12 华为终端有限公司 Method for establishing Bluetooth connection, mobile terminal, Bluetooth devices and system
CN104980884A (en) * 2015-06-09 2015-10-14 联想(北京)有限公司 Information transmission method and information transmission device
CN106657675A (en) * 2017-02-03 2017-05-10 惠州Tcl移动通信有限公司 Method and system for playing audios and videos of mobile terminal through Bluetooth playing device
WO2018032455A1 (en) * 2016-08-18 2018-02-22 华为技术有限公司 Bluetooth communication method and terminal
CN107864432A (en) * 2017-10-25 2018-03-30 努比亚技术有限公司 Baffle Box of Bluetooth connection management method, terminal and computer-readable recording medium
CN107911871A (en) * 2017-12-12 2018-04-13 腾讯科技(深圳)有限公司 Control method, device and control device, the storage medium of bluetooth connection

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8417185B2 (en) * 2005-12-16 2013-04-09 Vocollect, Inc. Wireless headset and method for robust voice data communication

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103312864A (en) * 2012-03-09 2013-09-18 深圳市三诺电子有限公司 Intelligent terminal and method for controlling bluetooth device via intelligent terminal
CN103636141A (en) * 2012-11-16 2014-03-12 华为终端有限公司 Method for establishing Bluetooth connection, mobile terminal, Bluetooth devices and system
CN104980884A (en) * 2015-06-09 2015-10-14 联想(北京)有限公司 Information transmission method and information transmission device
WO2018032455A1 (en) * 2016-08-18 2018-02-22 华为技术有限公司 Bluetooth communication method and terminal
CN106657675A (en) * 2017-02-03 2017-05-10 惠州Tcl移动通信有限公司 Method and system for playing audios and videos of mobile terminal through Bluetooth playing device
CN107864432A (en) * 2017-10-25 2018-03-30 努比亚技术有限公司 Baffle Box of Bluetooth connection management method, terminal and computer-readable recording medium
CN107911871A (en) * 2017-12-12 2018-04-13 腾讯科技(深圳)有限公司 Control method, device and control device, the storage medium of bluetooth connection

Also Published As

Publication number Publication date
CN111491278A (en) 2020-08-04

Similar Documents

Publication Publication Date Title
US11778363B2 (en) Audio data transmission method applied to switching between single-earbud mode and double-earbud mode of TWS headset and device
US11856498B2 (en) Bluetooth device connection method and device
US20100048133A1 (en) Audio data flow input/output method and system
US20170199501A1 (en) Supporting Virtually Simultaneous Operation of Dual Wireless Protocols in a Single Device
CN109151212B (en) Equipment control method and device and electronic equipment
CN108848360B (en) Intelligent projector, projection screen control method and related product
CN111447602B (en) Bluetooth device, Bluetooth preemption method and device thereof, and computer-readable storage medium
US20160316338A1 (en) Device Control Method and Device
US11930542B2 (en) Source device switching method and device through Bluetooth connection information sharing
JP2022505461A (en) Mode switchable bluetooth device, bluetooth connection system and bluetooth connection method
CN108513196A (en) A kind of wireless headset and its matching method
CN111741456A (en) Bluetooth device, Bluetooth preemption method and device thereof, and computer-readable storage medium
CN105812185A (en) Communication connection method for playing device
CN110177357B (en) Bluetooth management method, mobile terminal and computer storage medium
CN110856086A (en) Method and device for controlling sound system and readable storage medium
CN111491278B (en) Method and terminal for playing audio through Bluetooth device
CN114885261A (en) Earphone assembly, wireless audio playing system and communication method thereof
CN110381418B (en) Loudspeaking device, relay device and mobile terminal
CN110381491B (en) Signal transmission method and terminal
CN114205699A (en) Wireless headset, method of controlling wireless headset, and storage medium
CN112867114A (en) Wireless device
CN112867115A (en) Wireless device and wireless communication method
CN112866965A (en) Intelligent glasses
CN112866964A (en) Wireless earphone assembly
CN113395576A (en) Scene switching method, computer equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP01 Change in the name or title of a patent holder
CP01 Change in the name or title of a patent holder

Address after: 266071 Shandong city of Qingdao province Jiangxi City Road No. 11

Patentee after: Qingdao Hisense Mobile Communication Technology Co.,Ltd.

Address before: 266071 Shandong city of Qingdao province Jiangxi City Road No. 11

Patentee before: HISENSE MOBILE COMMUNICATIONS TECHNOLOGY Co.,Ltd.