A bluetooth device dynamic configuration method, device and computer readable storage medium

By monitoring the Bluetooth channel status in the audio management module and generating conflict resolution options using a broadcast mechanism, the Bluetooth channel is dynamically configured, resolving channel conflicts when multiple applications call the channel and improving the user experience of Bluetooth devices.

CN116017383BActive Publication Date: 2025-11-25NUBIA TECHNOLOGY CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202211648208.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-21
Publication Date
2025-11-25
Estimated Expiration
2042-12-21

AI Technical Summary

Technical Problem

In existing technologies, Bluetooth channel conflicts are prone to occur when multiple applications call Bluetooth devices, resulting in problems such as no sound from the Bluetooth headset speaker or mixed audio during calls.

Method used

By monitoring the status changes of the Bluetooth channel in the system's audio management module, application information is sent to the monitoring module using a broadcast mechanism to generate conflict resolution options, and the channel configuration is adjusted according to the user's selection, thus achieving dynamic configuration.

Benefits of technology

It effectively resolves the conflict issue of multiple applications accessing the Bluetooth channel, improving the user's Bluetooth experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116017383B_ABST
    Figure CN116017383B_ABST
Patent Text Reader

Abstract

The application discloses a kind of bluetooth device dynamic configuration method, equipment and computer readable storage medium, wherein, the method comprises: receiving the first application information by the broadcast receiver of monitoring module, and when the second state of the first state of the first application information and the second state of the second application of the second application of the monitoring module monitoring first Bluetooth channel opening and / or second Bluetooth channel opening and / or second application information conflict, the current Bluetooth conflict resolution option is generated according to the first application information and the second application information of the second application by the subthread of the monitoring module, and the channel configuration of the first state and / or the second state is adjusted according to the selection item of the Bluetooth conflict resolution option.The application realizes a kind of efficient bluetooth device dynamic configuration scheme, effectively solves the calling conflict problem of multiple applications for multiple Bluetooth channels, greatly improves the bluetooth use experience of user.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of mobile communication, in particular to a Bluetooth device dynamic configuration method, device and computer readable storage medium. BACKGROUND

[0002] In the prior art, with the continuous development of intelligent terminal devices and the popularity of Bluetooth devices such as Bluetooth earphones, users often encounter the "failure" phenomenon that the mobile phone is normally and stably connected with the Bluetooth earphone, but the Bluetooth earphone speaker has no sound. The reason for this phenomenon is that the audio channel operation set by the third-party application is not standardized, especially in the following two application scenarios.

[0003] Firstly, two applications simultaneously use the Bluetooth Sco channel for calling or video, and if the previous application does not stop, i.e. stopBluetoothSco(), then two-way calling mixed sound will occur;

[0004] Secondly, one application uses the Bluetooth A2DP channel to listen to music, and another application uses the Bluetooth Sco channel for calling or video, and then the Bluetooth A2DP channel will be suspended into the suspend a2dp state, at this time, if the application does not stopBluetoothSco(), the previous application cannot restore A2DP to play music forever.

[0005] Therefore, how to effectively realize the dynamic configuration of multiple Bluetooth channels when multiple applications call Bluetooth devices has become a technical problem to be solved at present. SUMMARY

[0006] In order to solve the above technical defects in the prior art, the present application provides a Bluetooth device dynamic configuration method, which comprises:

[0007] When the system's audio management module monitors the first state of the opening and closing of the first Bluetooth channel and / or the opening and closing of the second Bluetooth channel of the first application, the broadcast sender of the audio management module sends the first application information of the first application to the preset monitoring module;

[0008] The broadcast receiver of the monitoring module receives the first application information, and when the monitoring module monitors the second state of the opening and closing of the first Bluetooth channel and / or the opening and closing of the second Bluetooth channel of the second application which conflicts with the first state, the sub-thread of the monitoring module generates the current Bluetooth conflict resolution option according to the first application information and the second application information of the second application, and adjusts the channel configuration of the first state and / or the second state according to the selection item of the Bluetooth conflict resolution option.

[0009] Optionally, the method further comprises:

[0010] creating the broadcast receiver corresponding to the broadcast transmitter in the monitoring module associated with the audio management module.

[0011] creating the monitoring module associated with the audio management module, and creating the broadcast receiver corresponding to the broadcast transmitter in the monitoring module.

[0012] Optionally, the method further comprises:

[0013] setting the Bluetooth conflict resolution option when the same Bluetooth channel conflicts;

[0014] providing a first selection item of closing the first application and a second selection item of keeping the first application in the Bluetooth conflict resolution option.

[0015] Optionally, the method further comprises:

[0016] closing the first application when a trigger instruction of the first selection item is received;

[0017] updating the application information of the application currently occupying the first Bluetooth channel or the second Bluetooth channel.

[0018] Optionally, the method further comprises:

[0019] closing the second application when a trigger instruction of the second selection item is received;

[0020] updating the application information of the application currently occupying the first Bluetooth channel or the second Bluetooth channel.

[0021] Optionally, the method further comprises:

[0022] setting the Bluetooth conflict resolution option when different Bluetooth channels conflict;

[0023] providing a third selection item of closing the first application and a fourth selection item of keeping the first application in the Bluetooth conflict resolution option.

[0024] Optionally, the method further comprises:

[0025] closing the first application when a trigger instruction of the third selection item is received;

[0026] stopping the occupation state of the first Bluetooth channel or the second Bluetooth channel, and updating the application information of the application currently occupying the first Bluetooth channel or the second Bluetooth channel.

[0027] Optionally, the method further comprises:

[0028] closing the second application when a trigger instruction of the fourth selection item is received;

[0029] updating application information of an application currently occupying the first Bluetooth channel or the second Bluetooth channel.

[0030] The application also provides a Bluetooth device dynamic configuration device, which comprises a memory, a processor and a computer program stored in the memory and executable on the processor, and the computer program implements the steps of the Bluetooth device dynamic configuration method according to any one of the above when executed by the processor.

[0031] The application also provides a computer readable storage medium, which stores a Bluetooth device dynamic configuration program, and the Bluetooth device dynamic configuration program implements the steps of the Bluetooth device dynamic configuration method according to any one of the above when executed by a processor.

[0032] The Bluetooth device dynamic configuration method, device and computer readable storage medium of the application are implemented by sending first application information of a first application to a preset monitoring module through a broadcast transmitter of an audio management module of a system when the audio management module monitors a first state of opening and / or closing of a first Bluetooth channel and / or a second Bluetooth channel of the first application, receiving the first application information through a broadcast receiver of the monitoring module, and generating a current Bluetooth conflict resolution option according to the first application information and second application information of a second application through a sub-thread of the monitoring module when the monitoring module monitors a second state of opening and / or closing of the first Bluetooth channel and / or the second Bluetooth channel of the second application conflicting with the first state, and adjusting channel configuration of the first state and / or the second state according to a selection item of the Bluetooth conflict resolution option. An efficient Bluetooth device dynamic configuration scheme is implemented, the calling conflict problem of multiple applications for multiple Bluetooth channels is effectively solved, and the Bluetooth use experience of a user is greatly improved. BRIEF DESCRIPTION OF DRAWINGS

[0033] The application will be further described below with reference to the accompanying drawings and embodiments. In the drawings:

[0034] Figure 1 is a schematic diagram of a hardware structure of a mobile terminal according to the application;

[0035] Figure 2 is a first flowchart of the Bluetooth device dynamic configuration method according to the application;

[0036] Figure 3 is a second flowchart of the Bluetooth device dynamic configuration method according to the application;

[0037] Figure 4 is a third flowchart of the Bluetooth device dynamic configuration method according to the application;

[0038] Figure 5 is a fourth flowchart of a Bluetooth device dynamic configuration method according to the present invention;

[0039] Figure 6 is a fifth flowchart of a Bluetooth device dynamic configuration method according to the present invention;

[0040] Figure 7 is a sixth flowchart of a Bluetooth device dynamic configuration method according to the present invention;

[0041] Figure 8 is a seventh flowchart of a Bluetooth device dynamic configuration method according to the present invention;

[0042] Figure 9 is an eighth flowchart of a Bluetooth device dynamic configuration method according to the present invention;

[0043] Figure 10 is a ninth flowchart of a Bluetooth device dynamic configuration method according to the present invention. DETAILED DESCRIPTION

[0044] It should be understood that the specific embodiments described herein are merely illustrative of the present application and do not limit the present application.

[0045] In the following description, the suffixes used for elements, such as "module", "part", or "unit", are merely intended for facilitating a description of the present application, and do not have specific meanings or roles. Therefore, "module", "part", or "unit" can be mixedly used.

[0046] A terminal can be implemented in various forms. For example, the terminal described in the present application can include a mobile terminal such as a mobile phone, a tablet, a notebook computer, a palmtop computer, a Personal Digital Assistant (PDA), a Portable Media Player (PMP), a navigation device, a wearable device, a smart band, a pedometer, etc., and a stationary terminal such as a digital TV, a desktop computer, etc.

[0047] In the following description, a mobile terminal will be exemplified, and it will be understood by those skilled in the art that the configuration according to the embodiments of the present application can be applied to a stationary type terminal, except for elements particularly used for mobile purposes.

[0048] Referring to Figure 1Fig. 1 is a diagram of a hardware structure of a mobile terminal according to an embodiment of the present application. The mobile terminal 100 can include a RF (Radio Frequency) unit 101, a WiFi module 102, an audio output unit 103, an A / V (audio / video) input unit 104, a sensor 105, a display unit 106, a user input unit 107, an interface unit 108, a memory 109, a processor 110, and a power supply 111, etc. Those skilled in the art will understand that the mobile terminal structure shown in Fig. 1 is not intended to limit the scope of the present application, and the mobile terminal can include more or less components, or some components can be combined, or different components can be arranged, than those shown in the diagram. Figure 1 The mobile terminal structure shown in Fig. 1 is not intended to limit the scope of the present application, and the mobile terminal can include more or less components, or some components can be combined, or different components can be arranged, than those shown in the diagram.

[0049] The following detailed description will be made with reference to the accompanying drawings. Figure 1 The components of the mobile terminal will be described in detail.

[0050] The RF unit 101 can be used for transmitting and receiving information or signals in a communication or call process. Specifically, the RF unit 101 receives downlink information from a base station and transmits uplink data to the base station. The RF unit 101 can include, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, etc. In addition, the RF unit 101 can communicate with the network and other devices through wireless communication. The wireless communication can use any communication standard or protocol, including but not limited to GSM (Global System for Mobile communication), GPRS (General Packet Radio Service), CDMA2000 (Code Division Multiple Access 2000), WCDMA (Wideband Code Division Multiple Access), TD-SCDMA (Time Division-Synchronous Code Division Multiple Access), FDD-LTE (Frequency Division Duplexing-Long Term Evolution), TDD-LTE (Time Division Duplexing-Long Term Evolution), etc.

[0051] WiFi belongs to a short-range wireless transmission technology, and the mobile terminal can help users send and receive emails, browse web pages, and access streaming media, etc. through the WiFi module 102, which provides users with wireless broadband Internet access. Although Figure 1 The WiFi module 102 is shown, but it is understood that it does not belong to the necessary components of the mobile terminal, and can be omitted as needed without changing the essence of the invention.

[0052] The audio output unit 103 can convert audio data received by the radio frequency unit 101 or the WiFi module 102 or stored in the memory 109 into an audio signal and output it as sound when the mobile terminal 100 is in a call signal reception mode, a call mode, a recording mode, a voice recognition mode, a broadcast reception mode, etc. Moreover, the audio output unit 103 can also provide audio output related to a particular function performed by the mobile terminal 100 (e.g., a call signal reception sound, a message reception sound, etc.). The audio output unit 103 can include a speaker, a buzzer, etc.

[0053] The A / V input unit 104 is used to receive audio or video signals. The A / V input unit 104 can include a graphics processor (GPU) 1041 and a microphone 1042, the graphics processor 1041 processes image data of a still picture or a video obtained by an image capture device (such as a camera) in a video capture mode or an image capture mode. The processed image frame can be displayed on the display unit 106. The image frame processed by the graphics processor 1041 can be stored in the memory 109 (or other storage medium) or transmitted via the radio frequency unit 101 or the WiFi module 102. The microphone 1042 can receive sound (audio data) via the microphone 1042 in a telephone call mode, a recording mode, a voice recognition mode, etc. and can process such sound into audio data. The processed audio (voice) data can be converted into a format that can be transmitted to a mobile communication base station via the radio frequency unit 101 in the case of a telephone call mode. The microphone 1042 can implement various types of noise cancellation (or suppression) algorithms to cancel (or suppress) noise or interference generated in the process of receiving and transmitting audio signals.

[0054] The mobile terminal 100 also includes at least one sensor 105, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor includes an ambient light sensor and a proximity sensor, wherein the ambient light sensor can adjust the brightness of the display panel 1061 according to the brightness of ambient light, and the proximity sensor can turn off the display panel 1061 and / or the backlight when the mobile terminal 100 is moved to the ear. As one of the motion sensors, the accelerometer sensor can detect the magnitude of acceleration in each direction (generally three axes), and when at rest, can detect the magnitude and direction of gravity, and can be used for applications such as identifying the posture of the mobile phone (such as switching between horizontal and vertical screens, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometers, tapping), and the like. As for the fingerprint sensor, pressure sensor, iris sensor, molecular sensor, gyroscope, barometer, hygrometer, thermometer, infrared sensor and other sensors that can be configured on the mobile phone, they will not be described here.

[0055] The display unit 106 is configured to display information input by a user or information provided to the user. The display unit 106 can include a display panel 1061, which can be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), or the like.

[0056] The user input unit 107 can be configured to receive input digital or character information, and to generate key signal inputs related to user settings and function controls of the mobile terminal. Specifically, the user input unit 107 can include a touch panel 1071 and other input devices 1072. The touch panel 1071, also known as a touch screen, can collect a user's touch operation (such as the user's operation on or near the touch panel 1071 using a finger, a stylus, or any suitable object or accessory) and drive the corresponding connection device according to the pre-set program. The touch panel 1071 can include two parts, a touch detection device and a touch controller. The touch detection device detects the user's touch position and detects the signal generated by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into touch coordinates, and sends it to the processor 110, and can also receive commands from the processor 110 and execute them. In addition, the touch panel 1071 can be implemented in various types such as resistive, capacitive, infrared, and surface acoustic wave. In addition to the touch panel 1071, the user input unit 107 can also include other input devices 1072. Specifically, the other input devices 1072 can include one or more of a physical keyboard, function keys (such as volume control buttons, on / off buttons, etc.), trackballs, mice, joysticks, and the like, without limitation.

[0057] Further, the touch panel 1071 can cover the display panel 1061, and when the touch panel 1071 detects a touch operation thereon or thereabout, transmit the same to the processor 110 to determine the type of the touch event, and then the processor 110 provides a corresponding visual output on the display panel 1061 according to the type of the touch event. Although in the above description, the touch panel 1071 and the display panel 1061 are implemented as two independent components to realize the input and output functions of the mobile terminal, in some embodiments, the touch panel 1071 and the display panel 1061 can be integrated to realize the input and output functions of the mobile terminal, which is not limited herein. Figure 1 Further, the touch panel 1071 can cover the display panel 1061, and when the touch panel 1071 detects a touch operation thereon or thereabout, transmit the same to the processor 110 to determine the type of the touch event, and then the processor 110 provides a corresponding visual output on the display panel 1061 according to the type of the touch event. Although in the above description, the touch panel 1071 and the display panel 1061 are implemented as two independent components to realize the input and output functions of the mobile terminal, in some embodiments, the touch panel 1071 and the display panel 1061 can be integrated to realize the input and output functions of the mobile terminal, which is not limited herein.

[0058] The interface unit 108 serves as an interface through which at least one external device can be connected with the mobile terminal 100. For example, the external device can include a wired or wireless headset port, an external power source (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device having an identification module, an audio input / output (I / O) port, a video I / O port, an earphone port, or the like. The interface unit 108 can be used as a path through which input data can be input to the mobile terminal 100 or through which the mobile terminal 100 can output data to an external device.

[0059] The memory 109 is operable to store various data used by at least one component of the mobile terminal 100. The memory 109 can include random access memory (RAM), flash memory, a hard disk, or the like, and can store operating system, applications, or the like.

[0060] The processor 110 serves as a control center of the mobile terminal 100 and performs various functions and processing of the mobile terminal 100 by running or executing software programs and / or modules stored in the memory 109 and by invoking data stored in the memory 109. The processor 110 can include one or more processing units. Preferably, the processor 110 can include an application processor and a modem processor. The application processor is mainly responsible for processing an operating system, a user interface, and an application program, and the modem processor is mainly responsible for wireless communication. It is understood that the modem processor can not be integrated into the processor 110.

[0061] The mobile terminal 100 can further include a power supply 111 (such as a battery) for supplying power to each component. Preferably, the power supply 111 can be logically connected to the processor 110 through a power management system, so that the power management system can realize functions such as management of charging, discharging, and power consumption management.

[0062] Although Figure 1 It is not shown that the mobile terminal 100 can further include a Bluetooth module and the like, which will not be described here.

[0063] Based on the above mobile terminal hardware structure, various embodiments of the method of the present application are proposed.

[0064] Figure 2 is the first flowchart of the dynamic configuration method of the Bluetooth device of the present application. The embodiment proposes a dynamic configuration method of the Bluetooth device, which includes:

[0065] S10, when the audio management module of the system monitors the first state of the opening and closing of the first Bluetooth channel and / or the opening and closing of the second Bluetooth channel of the first application, the broadcast transmitter of the audio management module sends the first application information of the first application to the preset monitoring module;

[0066] S20, the broadcast receiver of the monitoring module receives the first application information, and when the monitoring module monitors that the second state of the opening and closing of the first Bluetooth channel and / or the opening and closing of the second Bluetooth channel of the second application conflicts with the first state, the sub-thread of the monitoring module generates the current Bluetooth conflict resolution option according to the first application information and the second application information of the second application, and adjusts the channel configuration of the first state and / or the second state according to the selection item of the Bluetooth conflict resolution option.

[0067] In this embodiment, the original Bluetooth and audio modules carried on the mobile terminal are taken as examples for illustration. Considering that the user finds that the mobile phone connection with the Bluetooth earphone is normal and stable in some scenarios, but the Bluetooth earphone speaker has no sound, this embodiment sets up a monitoring module Monitor through an Intent broadcast mechanism to monitor the operation of the third-party APP on the Bluetooth earphone Sco / A2DP channel, thereby providing a warning and a solution for the user to choose, so as to improve the experience of the Bluetooth earphone when listening to music and making a phone call.

[0068] In the embodiment, the described Bluetooth headset sound problem optimization scheme based on Intent broadcast is to optimize the problem that the Bluetooth headset speaker has no sound when the mobile phone is normally and stably connected with the Bluetooth headset in some multi-application switching scenarios, thereby improving the experience when the Bluetooth headset listens to music and makes a call. Specifically, in the embodiment, through the Intent broadcast mechanism, a monitoring module Monitor is set to monitor the operation of a third-party APP on the Bluetooth headset Sco / A2DP channel, i.e., the first Bluetooth channel and the second Bluetooth channel of the embodiment. For example, the callingapplication PI (package name and UID / PID information, i.e., application information) currently occupying the Bluetooth Sco channel is recorded, and a pre-warning and a solution option are provided for the user, so that the user can actively select.

[0069] The embodiment has the beneficial effect that when the audio management module of the system monitors the first state of the opening and closing of the first Bluetooth channel and / or the opening and closing of the second Bluetooth channel of the first application, the broadcast sender of the audio management module sends the first application information of the first application to the preset monitoring module; the broadcast receiver of the monitoring module receives the first application information, and when the monitoring module monitors the second state of the opening and closing of the first Bluetooth channel and / or the opening and closing of the second Bluetooth channel of the second application, which conflicts with the first state, the sub-thread of the monitoring module generates the current Bluetooth conflict resolution option according to the first application information and the second application information of the second application, and adjusts the channel configuration of the first state and / or the second state according to the selection item of the Bluetooth conflict resolution option. An efficient Bluetooth device dynamic configuration scheme is realized, the calling conflict problem of multiple applications for multiple Bluetooth channels is effectively solved, and the Bluetooth use experience of the user is greatly improved.

[0070] Figure 3 The second flowchart of the Bluetooth device dynamic configuration method of the application is based on the above embodiment, and the method further includes:

[0071] S01, creating the broadcast sender in the audio management module;

[0072] S02, creating the monitoring module associated with the audio management module, and creating the broadcast receiver corresponding to the broadcast sender in the monitoring module.

[0073] Figure 4 The third flowchart of the Bluetooth device dynamic configuration method of the application is based on the above embodiment, and the method further includes:

[0074] S11, setting the Bluetooth conflict resolution option when the same Bluetooth channel conflicts;

[0075] S12, provide a first selection item of closing the first application and a second selection item of keeping the first application in the Bluetooth conflict resolution option.

[0076] Figure 5 is the fourth flow chart of the Bluetooth device dynamic configuration method, based on the above embodiment, the method further comprises:

[0077] S21, when receiving the trigger instruction of the first selection item, closing the first application;

[0078] S22, updating the application information of the application occupying the first Bluetooth channel or the second Bluetooth channel.

[0079] Figure 6 is the fifth flow chart of the Bluetooth device dynamic configuration method, based on the above embodiment, the method further comprises:

[0080] S23, when receiving the trigger instruction of the second selection item, closing the second application;

[0081] S24, updating the application information of the application occupying the first Bluetooth channel or the second Bluetooth channel.

[0082] Figure 7 is the sixth flow chart of the Bluetooth device dynamic configuration method, based on the above embodiment, the method further comprises:

[0083] S13, setting the Bluetooth conflict resolution option when different Bluetooth channels conflict;

[0084] S14, providing a third selection item of closing the first application and a fourth selection item of keeping the first application in the Bluetooth conflict resolution option.

[0085] Figure 8 is the seventh flow chart of the Bluetooth device dynamic configuration method, based on the above embodiment, the method further comprises:

[0086] S25, when receiving the trigger instruction of the third selection item, closing the first application;

[0087] S26, stopping the occupation state of the first Bluetooth channel or the second Bluetooth channel, and updating the application information of the application occupying the first Bluetooth channel or the second Bluetooth channel.

[0088] Figure 9 is the eighth flow chart of the Bluetooth device dynamic configuration method, based on the above embodiment, the method further comprises:

[0089] S27, when receiving the trigger instruction of the fourth selection item, closing the second application;

[0090] S28, updating the application information of the application occupying the first Bluetooth channel or the second Bluetooth channel.

[0091] Specifically, please refer to Figure 10 In this embodiment, a mobile terminal equipped with a Bluetooth module, an audio module, a Modem, a storage module and a touch screen module is taken as an example for illustration.

[0092] In this embodiment, the Bluetooth module is used to connect a Bluetooth headset; the audio module is used to play music and make a call; the Modem is used to provide a call and network; the storage module is used to record the callingapplication PI information of the Sco, i.e. the first Bluetooth channel, such as package name and UID / PID identity and attribute information; and the touch screen module is used to provide interaction with a user.

[0093] In this embodiment, the Intent broadcast scheme adopted is a lightweight message passing mechanism, which can pass messages between different components within the same application program, pass messages between components of different application programs, and also serve as a broadcast event to publish Android system messages.

[0094] In this embodiment, the Bluetooth headset sound problem optimization method based on the above-mentioned Intent broadcast includes the following steps, as shown in Figure 10

[0095] S1, a third-party APP calls startbluetoothSco() to open the first Bluetooth channel, stopBluetoothSco() to close the first Bluetooth channel, startbluetoothA2DP() to open the second Bluetooth channel, etc.

[0096] S2, the AudioManager audio management module sends the PI (package name and UID / PID information) of the third-party APP calling startbluetoothSco(), stopBluetoothSco() and startbluetoothA2DP() to the monitoring module Monitor. Specifically, an intent is created in the AudioManager, and when the third-party APP calls startbluetoothSco(), stopBluetoothSco() and startbluetoothA2DP(), the corresponding callingapplication PI (package name and UID / PID information) is broadcast to the monitoring module Monitor.​

[0097] S3, the monitoring module Monitor receives the PI (package name and UID / PID, etc.) of the third-party APP calling startbluetoothSco(), stopBluetoothSco(), startbluetoothA2DP(). Specifically, in the monitoring module Monitor, the receiver of the broadcast is registered to receive the calling application PI (package name and UID / PID, etc.) of startbluetoothSco(), stopBluetoothSco(), startbluetoothA2DP().

[0098] S4, the processing of the monitoring module Monitor when receiving startbluetoothSco(). Specifically, in the monitoring module Monitor, when a new calling app is monitored to call startbluetoothSco() and the previous calling app has not stopped Bluetooth Sco, and isBluetoothScoOn() is true, the monitoring module Monitor performs the next step of processing.

[0099] S5, the monitoring module Monitor creates a sub-thread to provide the user with a warning and a solution, and lets the user choose. Specifically, a sub-thread is created, and in the sub-thread, a pop-up box prompts the user that two applications cannot use the Bluetooth Sco channel at the same time, otherwise there will be mixed sound, and lets the user choose whether to close the previous calling app.

[0100] S501, if the user chooses yes, the previous calling app is killed, the calling application PI (package name and UID / PID, etc.) currently occupying the Sco is updated, and then step S8 is executed.

[0101] S502, if the user chooses no, the current calling app is killed, the calling application PI (package name and UID / PID, etc.) currently occupying the Sco is updated, and then step S8 is executed.

[0102] S6, the processing when the monitoring module Monitor receives startbluetoothA2DP(). Specifically, in the monitoring module Monitor, when it is monitored that a new calling app calls startbluetoothA2DP(), and the previous calling app has not stopped Bluetooth Sco, and isBluetoothScoOn() is true, the monitoring module Monitor performs the next step of processing.

[0103] S7, the monitoring module Monitor creates a sub-thread, provides a warning and a solution to the user, and lets the user select. Specifically, a sub-thread is created, and a pop-up box in the sub-thread prompts the user that the previous calling app has not closed the Bluetooth Sco channel, and the current application music playback will be silent, and lets the user select whether to close the previous calling app.

[0104] S701, if the user selects yes, the previous calling app is killed, stopBluetoothSco() is performed, the calling application PI (package name and UID / PID information) currently occupying the Sco is updated, and then step S8 is performed.

[0105] S702, if the user selects no, the current calling app is killed.

[0106] S8, in the monitoring module Monitor, the calling application PI (package name and UID / PID information) currently occupying the Sco is recorded.

[0107] Based on the above embodiment, the application further proposes a Bluetooth device dynamic configuration device, which comprises a memory, a processor, and a computer program stored in the memory and executable on the processor, and the computer program implements the steps of the Bluetooth device dynamic configuration method when executed by the processor.

[0108] It should be noted that the device embodiment and the method embodiment belong to the same concept, and the specific implementation process is detailed in the method embodiment, and the technical features in the method embodiment are all applicable in the device embodiment, which will not be repeated here.

[0109] Based on the above embodiment, the application further proposes a computer readable storage medium, which stores a Bluetooth device dynamic configuration program, and the Bluetooth device dynamic configuration program implements the steps of the Bluetooth device dynamic configuration method when executed by the processor.

[0110] It should be noted that the above media embodiments and method embodiments belong to the same concept, and the specific implementation process is detailed in the method embodiments, and the technical features in the method embodiments are all applicable to the media embodiments, which will not be repeated here.

[0111] It should be noted that in this paper, the term "includes", "contains" or any other variant thereof is intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements not only includes those elements, but also includes other elements not explicitly listed, or includes elements inherent to such process, method, article or device. Without more limitations, the element defined by the sentence "includes a" does not exclude the presence of other identical elements in the process, method, article or device including the element.

[0112] The above-mentioned embodiment numbers of the present application are only for description, not representing the advantages and disadvantages of the embodiments.

[0113] From the above description of the embodiments, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be realized by software and necessary general hardware platform, of course, also can be realized by hardware, but in many cases, the former is a better embodiment. Based on such understanding, the technical solutions of the present application can be embodied in the form of software product, which is stored in a storage medium (such as ROM / RAM, magnetic disc, optical disc), including a plurality of instructions for making a terminal (which can be a mobile phone, computer, server, air conditioner, or network equipment, etc.) execute the method described in each embodiment of the present application.

[0114] The embodiments of the present application are described above in combination with the drawings, but the present application is not limited to the above-mentioned specific embodiments, and the above-mentioned specific embodiments are only illustrative, not restrictive, and those skilled in the art can make many forms under the inspiration of the present application without departing from the purpose of the present application and the scope protected by the claims.

Claims

1. A method of dynamic configuration of Bluetooth devices, characterized in that, The method comprises: When the system's audio management module monitors the first state of the first application's first Bluetooth channel opening and / or the second Bluetooth channel opening, the audio management module's broadcast transmitter sends the first application information of the first application to the preset monitoring module; The monitoring module's broadcast receiver receives the first application information, and when the monitoring module monitors the second state of the second application's first Bluetooth channel opening and / or the second Bluetooth channel opening conflicting with the first state, the monitoring module's sub-thread generates the current Bluetooth conflict resolution option according to the first application information and the second application's second application information, and adjusts the channel configuration of the first state and / or the second state according to the selection item of the Bluetooth conflict resolution option; Wherein, The broadcast transmitter is created in the audio management module; The monitoring module associated with the audio management module is created, and the broadcast receiver corresponding to the broadcast transmitter is created in the monitoring module; The Bluetooth conflict resolution option when the same Bluetooth channel conflicts is set; The first selection item of closing the first application and the second selection item of keeping the first application are provided in the Bluetooth conflict resolution option; When the trigger instruction of the first selection item is received, the first application is closed; The application information of the application currently occupying the first Bluetooth channel or the second Bluetooth channel is updated; When the trigger instruction of the second selection item is received, the second application is closed; The application information of the application currently occupying the first Bluetooth channel or the second Bluetooth channel is updated; The Bluetooth conflict resolution option when different Bluetooth channels conflict is set; The third selection item of closing the first application and the fourth selection item of keeping the first application are provided in the Bluetooth conflict resolution option; When the trigger instruction of the third selection item is received, the first application is closed; The occupation state of the first Bluetooth channel or the second Bluetooth channel is stopped, and the application information of the application currently occupying the first Bluetooth channel or the second Bluetooth channel is updated; When the trigger instruction of the fourth selection item is received, the second application is closed; The application information of the application currently occupying the first Bluetooth channel or the second Bluetooth channel is updated.

2. A Bluetooth device dynamic configuration device, characterized in that, The device comprises a memory, a processor, and a computer program stored on the memory and executable on the processor, which, when executed by the processor, implements the steps of the Bluetooth device dynamic configuration method of claim 1.

3. A computer-readable storage medium, characterized in that, The computer readable storage medium stores a Bluetooth device dynamic configuration program, which, when executed by the processor, implements the steps of the Bluetooth device dynamic configuration method of claim 1.

Citation Information

Patent Citations

  • Spatial multiplexing method, multiplexing device and its Bluetooth device

    CN107203340A

  • Management method, device and system for Bluetooth connection resources

    CN107548016A

  • Management method and device of Bluetooth connection resources

    CN107548017A

  • Communication control method, communication equipment, communication control system and storage medium

    CN110113736A