Virtual Call Method, Device, Terminal and Storage Medium Based on Bluetooth Device
By periodically detecting the SCO connection status and virtual call requirements, re-establishing the SCO and switching the audio signal output, the problem of poor virtual call reliability of Bluetooth headsets is solved, and the stable virtual call effect is achieved.
Patent Information
- Application Number
- CN202210475524.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-29
- Publication Date
- 2025-08-05
- Estimated Expiration
- 2042-04-29
AI Technical Summary
In the prior art, when the Bluetooth headset is connected to the mobile phone, the establishment of the Bluetooth synchronization link SCO fails to establish, resulting in poor reliability of virtual calls, especially when the mobile phone and the Bluetooth headset are not connected to the HFP, the audio signal is output from the mobile phone.
By periodically detecting the connection status of the SCO and the usage information of the third-party application, if there is no connection and there is a virtual call requirement, send a connection instruction message to re-establish the SCO and switch the audio signal to the Bluetooth device output.
Improves the reliability of Bluetooth devices for virtual calls, ensures that audio signals are output from Bluetooth devices, and enhances the stability of virtual calls.
Smart Images

Figure CN114885314B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of communication technology, and in particular to a virtual call method, apparatus, terminal, and storage medium based on a Bluetooth device. Background Art
[0002] Mobile phones often have third-party applications installed, such as social networking apps, which often offer virtual call features like video or voice calls. Therefore, users can use these third-party apps to make virtual calls with friends. Bluetooth headsets are widely used due to their portability, so users can connect their Bluetooth headsets to their devices to communicate with friends via the headset.
[0003] In related technologies, when a Bluetooth headset is connected to a mobile phone, the headset broadcasts a Handsfree Profile (HFP) request. After receiving the HFP request, the mobile phone establishes an HFP connection with the headset. At this time, when a third-party application requests a virtual call, the third-party application, based on the HFP request, establishes a Bluetooth Synchronous Connection Oriented (SCO) link with the Bluetooth headset that has established an HFP connection with the mobile phone. Based on the SCO link, the Bluetooth headset responds to the virtual call directly.
[0004] After receiving the HFP request, the third-party application immediately requests to establish SCO with the Bluetooth headset. However, if the mobile phone and the Bluetooth headset have not yet completed the HFP connection establishment, the SCO establishment will fail. At this time, the audio signal of the third-party application will be output from the mobile phone, resulting in poor reliability of virtual calls based on the Bluetooth headset. Summary of the Invention
[0005] The embodiments of the present application provide a method, apparatus, electronic device, and storage medium for virtual calls based on Bluetooth devices, which can improve the reliability of virtual calls based on Bluetooth devices. The technical solution is as follows:
[0006] In one aspect, a virtual call method based on a Bluetooth device is provided, the method comprising:
[0007] Determining, based on a preset period, a first connection state of a third-party application of the terminal and a Bluetooth synchronization link (SCO) of the Bluetooth device and usage information of the third-party application, wherein the usage information is used to indicate whether the third-party application currently has a first virtual call, where the first virtual call is a virtual call responded to by the terminal;
[0008] When the first connection state is disconnected and the usage information indicates that the third-party application currently has the first virtual call, sending a first connection indication message to the third-party application, where the first connection indication message is used to instruct the third-party application to re-establish the SCO with the Bluetooth device;
[0009] After the third-party application completes establishing the SCO with the Bluetooth device, based on the SCO, the device responding to the first virtual call is switched from the terminal to the Bluetooth device, and the SCO is used to transmit the audio signal of the first virtual call between the third-party application and the Bluetooth device.
[0010] On the other hand, a virtual call device based on a Bluetooth device is provided, the device comprising:
[0011] a determination module, configured to determine, based on a preset period, a first connection state of a third-party application of the terminal and a Bluetooth synchronization link (SCO) of the Bluetooth device and usage information of the third-party application, wherein the usage information is used to indicate whether the third-party application currently has a first virtual call, the first virtual call being a virtual call responded to by the terminal;
[0012] a sending module, configured to, when the first connection state is disconnected and the usage information indicates that the third-party application currently has the first virtual call, send a first connection indication message to the third-party application, wherein the first connection indication message is used to instruct the third-party application to re-establish the SCO with the Bluetooth device;
[0013] A switching module is used to switch the device responding to the first virtual call from the terminal to the Bluetooth device based on the SCO after the third-party application and the Bluetooth device complete establishing the SCO, and the SCO is used to transmit the audio signal of the first virtual call between the third-party application and the Bluetooth device.
[0014] On the other hand, a terminal is provided, comprising a processor and a memory; the memory stores at least one program code, and the at least one program code is used to be executed by the processor to implement the virtual call method based on a Bluetooth device as described in the above aspect.
[0015] On the other hand, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores at least one program code, and the at least one program code is used to be executed by a processor to implement the virtual call method based on a Bluetooth device as described in the above aspects.
[0016] On the other hand, a computer program product is provided, which stores at least one program code, and the at least one program code is used to be executed by a processor to implement the virtual call method based on a Bluetooth device as described in the above aspects.
[0017] In an embodiment of the present application, the connection status of SCO and whether a virtual call currently exists between the third-party application are periodically determined; when the connection status of SCO is not connected and a virtual call currently exists between the third-party application, the SCO between the third-party application and the Bluetooth device is re-established, and then based on the SCO, the Bluetooth device responds to the virtual call, thereby ensuring that when the Bluetooth device and the terminal are connected, the audio signal of the virtual call can be output from the Bluetooth device, thereby improving the reliability of virtual calls based on the Bluetooth device. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1 A schematic diagram showing an implementation environment involved in a virtual call method based on a Bluetooth device provided by an exemplary embodiment of the present application;
[0019] Figure 2 A flowchart of a virtual call method based on a Bluetooth device is shown in an exemplary embodiment of the present application;
[0020] Figure 3 A flowchart of a virtual call method based on a Bluetooth device is shown in another exemplary embodiment of the present application;
[0021] Figure 4 A flowchart of a virtual call method based on a Bluetooth device is shown in another exemplary embodiment of the present application;
[0022] Figure 5 A flowchart of a virtual call method based on a Bluetooth device is shown in another exemplary embodiment of the present application;
[0023] Figure 6 A flowchart of a virtual call method based on a Bluetooth device is shown in another exemplary embodiment of the present application;
[0024] Figure 7 A structural block diagram of a virtual communication device based on a Bluetooth device is shown in an exemplary embodiment of the present application;
[0025] Figure 8 The figure shows a structural block diagram of a terminal according to an exemplary embodiment of the present application. DETAILED DESCRIPTION
[0026] In order to make the objectives, technical solutions and advantages of this application clearer, the implementation methods of this application will be further described in detail below with reference to the accompanying drawings.
[0027] The term "multiple" as used herein refers to two or more. "And / or" describes the relationship between related objects, indicating that three possible relationships exist. For example, "A and / or B" can represent: A exists alone, A and B exist simultaneously, or B exists alone. The character " / " generally indicates that the related objects are in an "or" relationship. Furthermore, the relevant data involved in this application may be authorized by the user or fully authorized by all parties.
[0028] It should be noted that the information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data used for analysis, stored data, displayed data, etc.), and signals involved in this application are all authorized by the user or fully authorized by all parties, and the collection, use, and processing of the relevant data must comply with the relevant laws, regulations, and standards of the relevant countries and regions. For example, the first connection status of the SCO, usage information of third-party applications, the second connection status of the terminal and the Bluetooth device, network information of the virtual call, audio signals of the virtual call, and demand information of third-party applications involved in this application are all obtained with full authorization.
[0029] Please refer to Figure 1 , which shows a schematic diagram of the implementation environment involved in the virtual call method based on the Bluetooth device 102 provided by an exemplary embodiment of the present application. The implementation environment includes a terminal 101 and a Bluetooth device 102. The terminal 101 and the Bluetooth device 102 are connected via a Bluetooth module, and a third-party application is installed on the terminal 101. When the terminal 101 makes a virtual call through the third-party application, it can respond to the virtual call through the Bluetooth device 102. The Bluetooth device 102 responding to the virtual call means that the audio signal of the virtual call counterpart is output by the Bluetooth device 102; and the Bluetooth device 102 collects the audio signal of the virtual call local end, and then transmits the collected audio signal to the third-party application, and the third-party application transmits it to the virtual call counterpart. The virtual call can be a virtual call initiated by a third-party application or a virtual call received by a third-party application.
[0030] Moreover, before the Bluetooth device 102 responds to the virtual call, the terminal 101 establishes an HFP connection with the Bluetooth device 102 through the Bluetooth module; after the HFP connection is established, the third-party application establishes an SCO with the Bluetooth device 102, which is used to transmit the audio signal of the virtual call.
[0031] Accordingly, the Bluetooth device 102 is a device having a Bluetooth module, an audio acquisition module (to collect the audio signal of the virtual call terminal), and an audio playback module (to output the audio signal of the virtual call terminal); for example, the Bluetooth device 102 may be a Bluetooth headset, a Bluetooth watch, a Bluetooth bracelet, a Bluetooth speaker, or a Bluetooth microphone. The terminal 101 may be a device having a Bluetooth module and having a third-party application installed; for example, the terminal 101 may be a mobile phone, a laptop computer, a tablet computer, a smart TV, a vehicle-mounted terminal 101, an intelligent robot, or other types of devices. Among them, the third-party application may be an application with a virtual call function; for example, the third-party application may be a social application or a short video application.
[0032] Among them, a virtual call refers to a call made through a third-party application; a non-virtual call refers to a call made through the Subscriber Identity Module (SIM) card of the terminal 101, that is, a non-virtual call refers to an ordinary operator call.
[0033] Please refer to Figure 2 , which shows a flowchart of a virtual call method based on a Bluetooth device according to an exemplary embodiment of the present application. The method includes:
[0034] Step S201: The terminal determines, based on a preset period, a first connection state between a third-party application of the terminal and the SCO of a Bluetooth device and usage information of the third-party application.
[0035] This usage information indicates whether a third-party application currently has a first virtual call. A first virtual call is a virtual call responded to by a terminal. A virtual call responded to by a terminal refers to the output of the virtual call's audio signal through the terminal (e.g., the terminal's microphone or speaker), as well as the collection of the audio signal of the virtual call's local end by the terminal's audio collector (microphone). The first connection status can be either disconnected or connected.
[0036] One thing that needs to be explained is that when the first connection state is not connected and the usage information is used to indicate that a first virtual call currently exists between the third-party application, step S202 is executed; when the first connection state is connected or the usage information is used to indicate that a first virtual call currently does not exist between the third-party application, step S201 is continued to be executed.
[0037] Step S202: When the first connection state is not connected and the usage information indicates that the third-party application currently has a first virtual call, the terminal sends a first connection indication message to the third-party application, where the first connection indication message is used to instruct the third-party application to re-establish SCO with the Bluetooth device.
[0038] If the first connection state is disconnected and the usage information indicates that the third-party application currently has a first virtual call, the terminal determines that the third-party application requires the use of SCO. The terminal then sends a first connection indication message to the third-party application. The third-party application receives the first connection indication message and, based on the first connection indication message, re-establishes the SCO with the Bluetooth device. After the third-party application re-establishes the SCO with the Bluetooth device, the third-party application sends a first notification message to the terminal, indicating that the SCO has been established, and then step S203 is executed. Alternatively, after the third-party application re-establishes the SCO with the Bluetooth device, the Bluetooth device sends a second notification message to the terminal, indicating that the SCO has been established, and then step S203 is executed.
[0039] It should be noted that when the first connection state is connected, or the usage information is used to indicate that the third-party application currently does not have a first virtual call, step S201 is continued until the first connection state is disconnected and the usage information is used to indicate that the third-party application currently has a first virtual call.
[0040] Another point worth noting is that the terminal can simultaneously determine the first connection state of the SCO and the usage information of the third-party application based on a preset period, thereby ensuring synchronization in the determination of the first connection state and the usage information of the third-party application. Alternatively, the terminal can first determine the first connection state of the SCO based on a preset period, and only determine the usage information of the third-party application when the first connection state is disconnected. This allows the terminal to execute subsequent steps only when the first connection state meets a condition (the first connection state is disconnected), and not execute subsequent steps when the first connection state does not meet the condition (the first connection state is connected), thereby saving computing resources. Alternatively, the terminal can first determine the usage information of the third-party application based on a preset period, and only determine the first connection state of the SCO when the usage information indicates that the third-party application currently has a first virtual call. This allows the terminal to execute subsequent steps only when the usage information meets the condition (the usage information indicates that the third-party application currently has a first virtual call), and not execute subsequent steps when the usage information does not meet the condition (the usage information indicates that the third-party application currently does not have a first virtual call), thereby saving computing resources.
[0041] Step S203: After the third-party application and the Bluetooth device complete establishing the SCO, the terminal switches the device responding to the first virtual call from the terminal to the Bluetooth device based on the SCO. The SCO is used to transmit the audio signal of the first virtual call between the third-party application and the Bluetooth device.
[0042] After receiving the first notification message from the third-party application or the second notification message from the Bluetooth device, the terminal determines that the SCO establishment between the third-party application and the Bluetooth device is complete. Based on the SCO, the terminal switches the audio signal of the first virtual call from being output by the terminal (e.g., the speaker or receiver of the terminal) to being output by the Bluetooth device, and switches the audio signal of the virtual call from being collected by the terminal's audio collector (microphone) to being collected by the Bluetooth device.
[0043] In an embodiment of the present application, the connection status of SCO and whether a third-party application currently has a virtual call are periodically determined; when the connection status of SCO is not connected and a third-party application currently has a virtual call, the SCO between the third-party application and the Bluetooth device is re-established, thereby responding to the virtual call through the Bluetooth device based on SCO, ensuring that when the Bluetooth device and the terminal are connected, the audio signal of the virtual call can be output from the Bluetooth device, thereby improving the reliability of virtual calls based on the Bluetooth device.
[0044] Please refer to Figure 3 , which shows a flowchart of a virtual call method based on a Bluetooth device according to another exemplary embodiment of the present application. The method includes:
[0045] Step S301: the terminal determines a second connection state between the terminal and the Bluetooth device.
[0046] The second connection state is either connected or not connected; connected means that the terminal has established an HFP connection with the Bluetooth device, and not connected means that the terminal has not established an HFP connection with the Bluetooth device. In some embodiments, the terminal can periodically determine the second connection state between the terminal and the Bluetooth device. In other embodiments, the terminal determines the second connection state between the terminal and the Bluetooth device only when the Bluetooth module of the terminal is turned on.
[0047] It should be noted that, when the second connection state is connected, step S302 is executed; when the second connection state is disconnected, the process ends; or, when the second connection state is disconnected, step S301 is continued until the second connection state is connected.
[0048] Step S302: When the second connection state is connected, the terminal determines the first connection state of the SCO and usage information of the third-party application based on a preset period.
[0049] This usage information indicates whether a third-party application currently has a first virtual call. A first virtual call is a virtual call responded to by a terminal. A virtual call responded to by a terminal refers to the output of the virtual call's audio signal through the terminal (e.g., the terminal's microphone or speaker), as well as the collection of the audio signal of the virtual call's local end by the terminal's audio collector (microphone). The first connection status can be either disconnected or connected.
[0050] Since the first virtual call is possible only when the third-party application is running in the foreground, before determining the usage information of the third-party application, the terminal first determines the running status of the third-party application, which is foreground running, background running, or not running; when the running status is foreground running or background running, the step of determining the usage information of the third-party application based on a preset period is executed; when the third-party application is not started, the step of determining the usage information of the third-party application based on the preset period is not executed, so that a screening process with a smaller amount of calculation is performed first, and when the conditions are met, the subsequent usage information determination process is performed, thereby reducing the amount of calculation.
[0051] In some embodiments, the preset period may be a fixed period set in advance; for example, the preset period may be 3 seconds or 4 seconds, etc. In other embodiments, the preset period is determined based on the running state of the third-party application. For example, when the running state of the third-party application is foreground running, the preset period is determined to be the first period; when the running state of the third-party application is background running, the preset period is determined to be the second period, and the first period is smaller than the second period. That is, when the running state of the third-party application is foreground running, the probability of the user using the third-party application to make a virtual call is relatively high. In this case, a smaller period (i.e., more frequent) is set to determine the usage information of the third-party application, thereby ensuring that the subsequent virtual call can be responded to in a timely manner through the Bluetooth device; and when the running state of the third-party application is background running, the probability of the user using the third-party application to make a virtual call is relatively low. In this case, a larger period (i.e., fewer times) is set to determine the usage information of the third-party application, thereby saving power consumption of the terminal.
[0052] One thing that needs to be explained is that when the first connection state is not connected and the usage information is used to indicate that a first virtual call currently exists between the third-party application, step S303 is executed; when the first connection state is connected or the usage information is used to indicate that a first virtual call currently does not exist between the third-party application, step S301 is continued to be executed.
[0053] Step S303: When the first connection state is not connected and the usage information indicates that a first virtual call currently exists in the third-party application, the terminal verifies the condition for sending the first connection indication message.
[0054] In some embodiments, when the first connection state is not connected and the usage information indicates that a first virtual call currently exists with the third-party application, the "terminal sends a first connection indication message to the third-party application" in step S304 can be directly executed. In other embodiments, when the first connection state is not connected and the usage information indicates that a first virtual call currently exists with the third-party application, the terminal may first verify the conditions for sending the first connection indication message before sending the first connection indication message to the third-party application. If the conditional verification of the first connection indication message passes, step S304 is executed. If the conditional verification of the first connection indication message fails, the terminal returns to step S301.
[0055] In an embodiment of the present application, before sending the first connection indication message to the third-party application, the terminal first verifies the conditions for sending the first connection indication message, thereby avoiding the situation where it is not suitable to send the first connection indication message to the third-party application due to changes in the environment for some reasons, thereby ensuring reliability.
[0056] The terminal verifies the condition for sending the first connection indication message, including at least one of the following implementation methods:
[0057] The first implementation method: the terminal determines the second connection state between the terminal and the Bluetooth device, and when the second connection state is connected, determines that the conditional check for sending the first connection indication message is passed; when the second connection state is not connected, determines that the conditional check for sending the first connection indication message is not passed.
[0058] In the embodiment of the present application, the terminal rechecks the second connection state, thereby reducing the occurrence of SCO establishment failures due to changes in the second connection state and improving reliability.
[0059] The second implementation manner: the terminal determines the first connection state of the SCO, and when the first connection state is disconnected, determines that the condition check for sending the first connection indication message passes; when the first connection state is connected, determines that the condition check for sending the first connection indication message fails.
[0060] In the embodiment of the present application, the terminal rechecks the first connection state, thereby reducing unnecessary SCO reconstruction due to changes in the first connection state, resulting in waste of resources, and thus improving the efficiency of responding to virtual calls through Bluetooth devices based on SCO.
[0061] The third implementation method: the terminal determines the call status of the terminal, and when the call status is in call, determines that the conditional check for sending the first connection indication message is passed; when the call status is not in call, determines that the conditional check for sending the first connection indication message is failed.
[0062] In the embodiment of the present application, since the first connection state of the SCO is disconnected, the user may give up communicating through the virtual call, for example, instead of communicating by sending messages. At this time, it is unnecessary to re-establish the SCO, which will result in a waste of resources. Therefore, the call state of the terminal is checked, and only when the call state is in progress, the subsequent step of sending the first connection indication message is performed, thereby reducing the waste of resources.
[0063] The fourth implementation method: the terminal determines the ongoing call of the terminal, and when the ongoing call is a virtual call, determines that the conditional check for sending the first connection indication message is passed; when the ongoing call is a non-virtual call, determines that the conditional check for sending the first connection indication message is failed.
[0064] In the embodiment of the present application, since the first connection state of the SCO is not connected, the user may give up communicating through a virtual call at this time; for example, instead of communicating through a non-virtual call (operator call), it is unnecessary to re-establish the SCO at this time, which will result in a waste of resources; therefore, the ongoing call of the terminal is checked, and only when the ongoing call is a virtual call, the subsequent step of sending the first connection indication message is performed, thereby reducing the waste of resources.
[0065] The fifth implementation method: the terminal determines the responding device of the ongoing call of the terminal. When the responding device is a terminal, it determines that the conditional check for sending the first connection indication message is passed; when the responding device is a non-terminal (Bluetooth device), it determines that the conditional check for sending the first connection indication message is not passed.
[0066] In the embodiment of the present application, since the first connection state of SCO is not connected, the user may manually trigger the third-party application to re-establish SCO with the Bluetooth device. That is, at this time, the terminal is responding to the virtual call through the Bluetooth device based on SCO, and it is unnecessary for the terminal to instruct the third-party application to re-establish SCO, which will result in a waste of resources. Therefore, the responding device of the ongoing call of the terminal is verified, and only when the responding device is the terminal is the subsequent step of sending the first connection indication message, thereby reducing the waste of resources.
[0067] One point that needs to be explained is that the terminal can verify the conditions for sending the first connection indication message through one or at least two of the above implementation methods, that is, the above at least two implementation methods can be superimposed; and when the above at least two implementation methods are superimposed, the conditions of the above two implementation methods need to be met at the same time to determine that the conditional check for sending the first connection indication message is passed; if the conditions of any implementation method are not met, it is determined that the conditional check for sending the first connection indication message has failed.
[0068] In some embodiments, the terminal verifies the condition for sending the first connection indication message through the first implementation manner and the second implementation manner above. The terminal verifies the condition for sending the first connection indication message, including:
[0069] The terminal determines a second connection state between the terminal and the Bluetooth device and a first connection state of the SCO. When the second connection state is connected and the first connection state is disconnected, it is determined that the conditional check for sending the first connection indication message is passed; when the second connection state is disconnected or the first connection state is connected, it is determined that the conditional check for sending the first connection indication message fails.
[0070] One thing that needs to be explained is that the process of verifying the conditions for sending the first connection indication message by the terminal through the other two, other three, and other four implementation methods is similar to the process of verifying the conditions for sending the first connection indication message through the first implementation method and the second implementation method above, and will not be repeated here.
[0071] In some embodiments, the terminal verifies the conditions for sending the first connection indication message through the first to fifth implementations above. The terminal verifies the conditions for sending the first connection indication message, including:
[0072] The terminal determines a second connection state between the terminal and the Bluetooth device, determines a first connection state of the SCO, determines a call state of the terminal, determines an ongoing call of the terminal and determines a responding device of the ongoing call of the terminal; when the second connection state is connected, and the first connection state is disconnected, and the call state is in progress, and the ongoing call is a virtual call, and the responding device is a terminal, it is determined that the conditional check for sending the first connection indication message is passed; when the second connection state is disconnected, or the first connection state is connected, or the call state is not in progress, or the ongoing call is a non-virtual call, or the responding device is not a terminal (Bluetooth device), it is determined that the conditional check for sending the first connection indication message is failed.
[0073] It should be noted that determining the second connection state between the terminal and the Bluetooth device, determining the first connection state of the SCO, determining the call state of the terminal, determining the ongoing call of the terminal and determining the responding device of the ongoing call of the terminal can be performed simultaneously or in sequence; for example, see Figure 4 The terminal first determines the second connection state between the terminal and the Bluetooth device; when the second connection state is not connected, it ends; when the second connection state is connected, it determines the first connection state of SCO; when the first connection state is connected, it ends; when the first connection state is not connected, it determines the call state of the terminal; when the call state is not in call, it ends; when the call state is in call, it determines the ongoing call of the terminal; when the ongoing call is not a virtual call, it ends; when the ongoing call is a virtual call, it determines the responding device of the ongoing call of the terminal; when the responding device is not a terminal, it ends; when the responding device is a terminal, it determines that the conditional check for sending the first connection indication message passes.
[0074] In the embodiment of the present application, the terminal passes Figure 4 The method shown verifies the conditions for sending the first connection indication message in a layered manner, which can save resources to the greatest extent.
[0075] Step S304: When the condition check for sending the first connection indication message passes, the terminal sends the first connection indication message to the third-party application, where the first connection indication message is used to instruct the third-party application to re-establish SCO with the Bluetooth device.
[0076] If the conditions for sending the first connection indication message are verified to be met, and the third-party application is determined to require the use of the SCO, the terminal then sends a first connection indication message to the third-party application. The third-party application receives the first connection indication message and, based on the first connection indication message, re-establishes the SCO with the Bluetooth device. After the third-party application re-establishes the SCO with the Bluetooth device, the third-party application sends a first notification message to the terminal, indicating that the SCO has been established, and then step S305 is executed. Alternatively, after the third-party application re-establishes the SCO with the Bluetooth device, the Bluetooth device sends a second notification message to the terminal, indicating that the SCO has been established, and then step S305 is executed.
[0077] Step S305: After the third-party application and the Bluetooth device complete establishing the SCO, the terminal switches the device responding to the first virtual call from the terminal to the Bluetooth device based on the SCO. The SCO is used to transmit the audio signal of the first virtual call between the third-party application and the Bluetooth device.
[0078] After receiving the first notification message from the third-party application or the second notification message from the Bluetooth device, the terminal determines that the SCO establishment between the third-party application and the Bluetooth device is complete. Based on the SCO, the terminal switches the audio signal of the first virtual call from being output by the terminal (e.g., the speaker or receiver of the terminal) to being output by the Bluetooth device, and switches the audio signal of the virtual call from being collected by the terminal's audio collector (microphone) to being collected by the Bluetooth device.
[0079] In an embodiment of the present application, when the Bluetooth device and the terminal are connected, the connection status of the SCO and whether a third-party application currently has a virtual call are periodically determined; when the connection status of the SCO is not connected and a third-party application currently has a virtual call, the SCO between the third-party application and the Bluetooth device is re-established, and then based on the SCO, the Bluetooth device responds to the virtual call, ensuring that the audio signal of the virtual call can be output from the Bluetooth device, thereby improving the reliability of virtual calls based on the Bluetooth device.
[0080] Please refer to Figure 5 , which shows a flowchart of a virtual call method based on a Bluetooth device according to another exemplary embodiment of the present application. The method includes:
[0081] Step 501: When the second virtual call is hung up, the terminal determines, based on a preset period, a first connection state of the third-party application and the SCO of the Bluetooth device and usage information of the third-party application.
[0082] The second virtual call is a historical virtual call of a third-party application; in some embodiments, the second virtual call is any historical virtual call before the first virtual call; for example, the second virtual call is the historical virtual call closest to the first virtual call. In other embodiments, there are two possibilities for the second virtual call to be hung up, one is that it is hung up when the user communication is completed, and the other is that it is hung up before the communication is completed. In other embodiments, the second virtual call is a virtual call that is hung up before the communication is completed. Accordingly, step 501 can be implemented by the following steps (1) and (3), including:
[0083] (1) When the second virtual call is hung up, the terminal determines the reason information for hanging up the second virtual call.
[0084] The reason information indicates the reason why the second virtual call was terminated, which can be either completion or incompleteness. Incompleteness includes at least one of network instability, hanging up without a closing statement, and failure to establish a SCO, resulting in a terminal responding to the virtual call. Accordingly, the reason information includes at least one of network information, the audio signal before the second virtual call was terminated, and an identifier of the device responding to the second virtual call.
[0085] In a first implementation method, the reason information for hanging up the second virtual call includes network information. In a case where the network information is used to indicate that the network connection is unstable, the terminal determines that the second virtual call was hung up before the communication was completed; in a case where the network information is used to indicate that the network connection is stable, the terminal determines that the second virtual call was hung up when the communication was completed.
[0086] In an embodiment of the present application, since the second virtual call of the third-party application needs to rely on the network, if the network connection is unstable, the second virtual call will be hung up; therefore, the terminal determines whether the second virtual call is hung up when the communication is completed based on network information, which can improve accuracy.
[0087] In a second implementation, the reason for hanging up the second virtual call includes an audio signal immediately before the second virtual call was hung up. If the audio signal does not include a closing statement, the terminal determines that the second virtual call was hung up before the call was completed. If the audio signal includes a closing statement, the terminal determines that the second virtual call was hung up after the call was completed. The closing statement is any word used to indicate the end of a call. For example, closing statements include "bye," "bye," "OK," "That's it," and "Hang up."
[0088] In the embodiment of the present application, since users often say closing words to each other when communication is completed, the terminal determines whether the second virtual call is hung up when the communication is completed based on the closing words, which can improve accuracy.
[0089] It should be noted that before the terminal obtains the audio signal, a prompt box pops up to prompt the user whether to agree to the terminal obtaining the audio signal; after receiving the user's confirmation operation, the audio signal is obtained, so that the audio signal is obtained only after the user's separate authorization.
[0090] In a third implementation method, the reason information for hanging up the second virtual call includes the device identifier of the device responding to the second virtual call. In a case where the device identifier is used to indicate that the device responding to the second virtual call is a terminal, the terminal determines that the second virtual call is hung up before the communication is completed; in a case where the device identifier is used to indicate that the device responding to the second virtual call is a non-terminal (Bluetooth device), the terminal determines that the second virtual call is hung up when the communication is completed.
[0091] In an embodiment of the present application, since when the terminal is connected to a Bluetooth device, if the audio signal of the virtual call is output from the earpiece or speaker of the terminal, the user is likely to hang up the virtual call and then re-establish a virtual call; therefore, the terminal determines whether the second virtual call is hung up when the communication is completed based on the device that responds to the second virtual call, which can improve accuracy.
[0092] (2) When the cause information indicates that the second virtual call is hung up before the communication is completed, the terminal determines the first connection state of the SCO based on a preset period.
[0093] (3) The terminal determines the usage information of the third-party application.
[0094] It should be noted that the process of the terminal determining the first connection state of the SCO and the usage information of the third-party application based on the preset period is the same as step S302 and will not be repeated here.
[0095] One thing that needs to be explained is that Figure 3 The embodiment shown and Figure 5 The embodiments shown can be combined, and step 501 can be replaced as follows: the terminal determines a second connection state between the terminal and the Bluetooth device, and when the second connection state is connected and the second virtual call is hung up, the terminal determines the first connection state of the third-party application and the SCO of the Bluetooth device and the usage information of the third-party application based on a preset period.
[0096] Step S502: When the first connection state is not connected and the usage information indicates that a first virtual call currently exists in the third-party application, the terminal verifies a condition for sending a first connection indication message.
[0097] It should be noted that step S502 is the same as step S303 and will not be described again here.
[0098] Step S503: When the condition check for sending the first connection indication message passes, the terminal sends the first connection indication message to the third-party application, where the first connection indication message is used to instruct the third-party application to re-establish SCO with the Bluetooth device.
[0099] It should be noted that step S503 is the same as step S304 and will not be described in detail here.
[0100] Step S504: After the third-party application and the Bluetooth device complete establishing the SCO, the terminal switches the device responding to the first virtual call from the terminal to the Bluetooth device based on the SCO. The SCO is used to transmit the audio signal of the first virtual call between the third-party application and the Bluetooth device.
[0101] It should be noted that step S504 is the same as step S305 and will not be described in detail here.
[0102] In an embodiment of the present application, since the user may immediately initiate a first virtual call when the communication is not completed but the previous second virtual call is hung up, the connection status of SCO and whether the third-party application currently has a virtual call are periodically determined; when the connection status of SCO is not connected and the third-party application currently has a virtual call, the SCO between the third-party application and the Bluetooth device is re-established, and then the Bluetooth device responds to the virtual call based on SCO, ensuring that the audio signal of the virtual call can be output from the Bluetooth device, thereby improving the reliability of virtual calls based on the Bluetooth device.
[0103] Please refer to Figure 6 , which shows a flowchart of a virtual call method based on a Bluetooth device according to another exemplary embodiment of the present application. The method includes:
[0104] Step S601: the terminal determines a second connection state between the terminal and the Bluetooth device.
[0105] It should be noted that step S601 is the same as step S301 and will not be described again here.
[0106] Step S602: When the second connection state is connected, the terminal determines the first connection state of the SCO and usage information of the third-party application based on a preset period.
[0107] It should be noted that step S602 is the same as step S302 and will not be described again here.
[0108] Another point to note is that if the first connection state is disconnected and the usage information indicates that the third-party application currently does not have a first virtual call, step S603 is executed. If the first connection state is disconnected and the usage information indicates that the third-party application currently has a first virtual call, step S606 is executed. If the first connection state is connected, the process ends.
[0109] Step S603: When the first connection state is not connected and the usage information indicates that the third-party application currently does not have a first virtual call, the terminal determines the demand information of the third-party application, where the demand information indicates whether the third-party application has a demand for a virtual call.
[0110] In some embodiments, the demand information includes operation information indicating whether the user has opened an interface including a virtual call button, which is used to trigger a virtual call. If the user has opened the interface including the virtual call button, the terminal determines that the third-party application has a demand for a virtual call; if the user has not opened the interface including the virtual call button, the terminal determines that the third-party application does not have a demand for a virtual call.
[0111] In other embodiments, the demand information includes communication information indicating whether a call request for a virtual call has been received. If the communication information indicates that a call request for a virtual call has been received, the terminal determines that the third-party application has a demand for a virtual call; if the communication information indicates that no call request for a virtual call has been received, the terminal determines that the third-party application does not have a demand for a virtual call.
[0112] It should be noted that when the demand information indicates that the third-party application has a demand for virtual calls, step S604 is executed; when the demand information indicates that the third-party application does not have a demand for virtual calls, step S601 is continued.
[0113] Step S604: When the requirement information indicates that the third-party application has a requirement for a virtual call, the terminal sends a second connection indication message to the third-party application, where the second connection indication message is used to instruct the third-party application to re-establish an SCO with the Bluetooth device.
[0114] In some embodiments, when the demand information is used to indicate that a third-party application has a demand for a virtual call, the terminal directly sends a second connection indication message to the third-party application; in some embodiments, when the demand information is used to indicate that a third-party application has a demand for a virtual call, the terminal first verifies the conditions for sending the second connection indication message, and only sends the second connection indication message to the third-party application if the condition for sending the second connection indication message is verified to be passed; if the condition for sending the second connection indication message is not verified to be passed, the second connection indication message is not sent to the third-party application.
[0115] It should be noted that the process by which the terminal sends the second connection indication message to the third-party application is similar to the process by which the terminal sends the first connection indication message to the third-party application, and will not be further described here. Furthermore, the process by which the terminal verifies the conditions for sending the second connection indication message is similar to the process by which the terminal verifies the conditions for sending the first connection indication message, and will not be further described here.
[0116] Step S605: In response to the third virtual call of the third-party application, the terminal responds to the third virtual call through the Bluetooth device based on SCO.
[0117] When the third-party application receives a new third virtual call, the terminal outputs the audio signal of the third virtual call through the Bluetooth device based on SCO, collects the audio signal of the third virtual call end through the Bluetooth device, transmits the collected audio signal to the third-party application, and the third-party application transmits it to the other end of the third virtual call.
[0118] Step S606: When the first connection state is not connected and the usage information indicates that a first virtual call currently exists with the third-party application, the terminal verifies the condition for sending the first connection indication message.
[0119] It should be noted that step S606 is the same as step S303 and will not be described again here.
[0120] Step S607: When the condition check for sending the first connection indication message passes, the terminal sends the first connection indication message to the third-party application. The first connection indication message is used to instruct the third-party application to re-establish SCO with the Bluetooth device.
[0121] It should be noted that step S607 is the same as step S304 and will not be described again here.
[0122] Step S608: After the third-party application and the Bluetooth device complete establishing the SCO, the terminal switches the device responding to the first virtual call from the terminal to the Bluetooth device based on the SCO. The SCO is used to transmit the audio signal of the first virtual call between the third-party application and the Bluetooth device.
[0123] It should be noted that step S608 is the same as step S305 and will not be described again here.
[0124] In an embodiment of the present application, when the Bluetooth device and the terminal are connected, the connection status of the SCO and whether the third-party application has a demand for a virtual call are periodically determined; when the connection status of the SCO is not connected and the third-party application has a demand for a virtual call, the SCO between the third-party application and the Bluetooth device is re-established, so that when a new virtual call is received, the Bluetooth device responds to the new virtual call based on the SCO, which not only ensures that the audio signal of the virtual call can be output from the Bluetooth device, thereby improving the reliability of virtual calls based on the Bluetooth device, but also improves the efficiency of responding to virtual calls.
[0125] Please refer to Figure 7 , which shows a block diagram of a virtual intercom device based on a Bluetooth device according to one embodiment of the present application. The virtual intercom device based on a Bluetooth device can be implemented as all or part of a processor through software, hardware, or a combination of both. The device includes:
[0126] A determination module 701 is configured to determine, based on a preset period, a first connection state of a Bluetooth synchronization link (SCO) between a third-party application of a terminal and a Bluetooth device and usage information of the third-party application, wherein the usage information is used to indicate whether the third-party application currently has a first virtual call, the first virtual call being a virtual call responded to by the terminal;
[0127] a sending module 702 configured to send a first connection indication message to the third-party application when the first connection state is disconnected and the usage information indicates that the third-party application currently has a first virtual call, wherein the first connection indication message is used to instruct the third-party application to re-establish an SCO with the Bluetooth device;
[0128] The switching module 703 is configured to switch the device responding to the first virtual call from the terminal to the Bluetooth device based on the SCO after the third-party application and the Bluetooth device complete the establishment of the SCO. The SCO is used to transmit the audio signal of the first virtual call between the third-party application and the Bluetooth device.
[0129] In some embodiments, the determining module 701 is configured to determine a second connection state between the terminal and the Bluetooth device; and when the second connection state is connected, determine the first connection state of the SCO based on a preset period.
[0130] In some embodiments, the determining module 701 is configured to determine the first connection state of the SCO based on a preset period when the second virtual call is hung up, and the second virtual call is a historical virtual call of a third-party application.
[0131] In some embodiments, the determining module 701 is configured to determine, when the second virtual call is hung up, information about the reason for hanging up the second virtual call; and, when the reason information indicates that the second virtual call was hung up before the communication was completed, determine the first connection state of the SCO based on a preset period.
[0132] In some embodiments, the apparatus further comprises at least one of the following implementations:
[0133] The reason information for hanging up the second virtual call includes network information. When the network information indicates an unstable network connection, the determining module 701 is further configured to determine whether the second virtual call was hung up before the communication was completed.
[0134] The reason information for hanging up the second virtual call includes an audio signal before the second virtual call is hung up. If the audio signal does not include a closing statement, the determining module 701 is further configured to determine whether the second virtual call is hung up before the communication is completed.
[0135] The reason information for hanging up the second virtual call includes the device identifier of the responding second virtual call. When the device identifier indicates that the device responding to the second virtual call is a terminal, the determination module 701 is further used to determine whether the second virtual call was hung up before the communication was completed.
[0136] In some embodiments, the sending module 702 is configured to verify a condition for sending the first connection indication message; and if the condition for sending the first connection indication message is verified to be passed, send the first connection indication message to the third-party application.
[0137] In some embodiments, the sending module 702 is further configured to determine a second connection state between the terminal and the Bluetooth device, and if the second connection state is connected, determine that a condition check for sending the first connection indication message passes;
[0138] The sending module 702 is further configured to determine a first connection state of the SCO, and if the first connection state is disconnected, determine that a condition check for sending the first connection indication message passes;
[0139] The sending module 702 is further configured to determine a call status of the terminal, and if the call status is in progress, determine that a condition check for sending the first connection indication message passes;
[0140] The sending module 702 is further configured to determine an ongoing call of the terminal, and if the ongoing call is a virtual call, determine that a condition check for sending the first connection indication message passes;
[0141] The sending module 702 is further configured to determine a responding device of the ongoing call of the terminal, and if the responding device is the terminal, determine whether a condition check for sending the first connection indication message passes.
[0142] In some embodiments, the apparatus further comprises:
[0143] The determining module 701 is further configured to determine demand information of the third-party application when the first connection state is disconnected and the usage information indicates that the third-party application currently does not have a first virtual call, where the demand information indicates whether the third-party application has a demand for a virtual call;
[0144] The sending module 702 is further configured to send a second connection indication message to the third-party application when the demand information indicates that the third-party application has a demand for a virtual call, wherein the second connection indication message is configured to instruct the third-party application to re-establish an SCO with the Bluetooth device;
[0145] The response module is configured to respond to the third virtual call of the third-party application and respond to the third virtual call through the Bluetooth device based on SCO.
[0146] It should be noted that the Bluetooth device-based virtual call method provided in the above embodiment is merely an example of the division of the aforementioned functional modules. In actual applications, the aforementioned functions can be assigned to different functional modules as needed, that is, the internal structure of the computer device can be divided into different functional modules to complete all or part of the functions described above. Furthermore, the Bluetooth device-based virtual call apparatus and the Bluetooth device-based virtual call method provided in the above embodiment are based on the same concept. The specific implementation process is detailed in the method embodiment and will not be repeated here.
[0147] In an embodiment of the present application, the connection status of SCO and whether a virtual call currently exists between the third-party application are periodically determined; when the connection status of SCO is not connected and a virtual call currently exists between the third-party application, the SCO between the third-party application and the Bluetooth device is re-established, and then based on the SCO, the Bluetooth device responds to the virtual call, thereby ensuring that when the Bluetooth device and the terminal are connected, the audio signal of the virtual call can be output from the Bluetooth device, thereby improving the reliability of virtual calls based on the Bluetooth device.
[0148] Please refer to Figure 8 , which shows a block diagram of a terminal 800 according to an exemplary embodiment of the present application. Terminal 800 can be a device such as a smartphone or tablet computer that has the function of controlling other devices. Terminal 800 in the present application may include one or more of the following components: a processor 810, a memory 820, and a Bluetooth module 830.
[0149] The processor 810 may include one or more processing cores. The processor 810 uses various interfaces and lines to connect the various parts of the entire terminal 800, and executes various functions and processes data of the terminal 800 by running or executing program codes, programs, code sets or program code sets stored in the memory 820, and calling data stored in the memory 820. Optionally, the processor 810 can be implemented in at least one hardware form of digital signal processing (DSP), field-programmable gate array (FPGA), and programmable logic array (PLA). The processor 810 can integrate one or more combinations of a central processing unit (CPU), a graphics processing unit (GPU), a neural network processing unit (NPU), and a modem. Among them, the CPU mainly processes the operating system, user interface, and application programs; the GPU is responsible for rendering and drawing the content to be displayed on the display; the NPU is used to implement artificial intelligence (AI) functions; and the modem is used to handle wireless communications. It is understandable that the above-mentioned modem may not be integrated into the processor 810, but may be implemented by a separate chip.
[0150] The memory 820 may include a random access memory (RAM) or a read-only memory (ROM). Optionally, the memory 820 includes a non-transitory computer-readable storage medium. The memory 820 may be used to store program code, a program, a code, a code set, or a program code set. The memory 820 may include a program storage area and a data storage area, wherein the program storage area may store program code for implementing an operating system, program code for at least one function (such as a touch function, a sound playback function, an image playback function, etc.), program code for implementing the above-mentioned various method embodiments, etc.; the data storage area may store data (such as audio data, a phone book) created according to the use of the terminal 800, etc. In addition, the Bluetooth module 830 is used to establish an HFP connection with a Bluetooth device.
[0151] In addition, those skilled in the art will understand that the structure of the terminal 800 shown in the above figures does not constitute a limitation of the terminal 800. The terminal 800 may include more or fewer components than shown, or may combine certain components, or arrange the components differently. For example, the terminal 800 also includes a microphone, a speaker, a radio frequency circuit, an input unit, a sensor, an audio circuit, a wireless fidelity (Wi-Fi) module, a power supply, and other components, which will not be described in detail here.
[0152] An embodiment of the present application also provides a computer-readable medium, which stores at least one program code, and the at least one program code is loaded and executed by the processor to implement the virtual call method based on the Bluetooth device as shown in the above embodiments.
[0153] An embodiment of the present application also provides a computer program product, which stores at least one program code, and the at least one program code is loaded and executed by the processor to implement the virtual call method based on the Bluetooth device as shown in the above embodiments.
[0154] In some embodiments, the computer program involved in the embodiments of the present application may be deployed and executed on a computer device, or on multiple computer devices located at one location, or on multiple computer devices distributed at multiple locations and interconnected through a communication network. Multiple computer devices distributed at multiple locations and interconnected through a communication network may constitute a blockchain system.
[0155] Those skilled in the art will appreciate that in one or more of the above examples, the functions described in the embodiments of the present application can be implemented using hardware, software, firmware, or any combination thereof. When implemented using software, these functions can be stored in a computer-readable medium or transmitted as one or more instructions or codes on a computer-readable medium. Computer-readable media include computer storage media and communication media, wherein communication media include any media that facilitates the transmission of computer programs from one place to another. The storage medium can be any available medium that can be accessed by a general-purpose or special-purpose computer.
[0156] The above description is merely an optional embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application shall be included in the scope of protection of the present application.
Claims
1. A virtual call method based on Bluetooth device, characterized in that: The method comprises: Determine the running status of third-party applications on the terminal; When the running state is foreground running or background running, determining, based on a preset period, a first connection state of a Bluetooth synchronization link SCO between the third-party application and the Bluetooth device and usage information of the third-party application, the usage information being used to indicate whether the third-party application currently has a first virtual call, the first virtual call being a virtual call responded to by the terminal, and when the running state is foreground running, the preset period is a first period, and when the running state is background running, the preset period is a second period, and the first period is less than the second period; When the first connection state is disconnected and the usage information indicates that the third-party application currently has the first virtual call, sending a first connection indication message to the third-party application, where the first connection indication message is used to instruct the third-party application to re-establish the SCO with the Bluetooth device; After the third-party application completes establishing the SCO with the Bluetooth device, based on the SCO, the device responding to the first virtual call is switched from the terminal to the Bluetooth device, and the SCO is used to transmit the audio signal of the first virtual call between the third-party application and the Bluetooth device.
2. The method according to claim 1, characterized in that The determining, based on a preset period, a first connection state of a Bluetooth synchronization link SCO between the third-party application and the Bluetooth device includes: Determining a second connection state between the terminal and the Bluetooth device; In a case where the second connection state is connected, the first connection state of the SCO is determined based on the preset period.
3. The method according to claim 1 or 2, characterized in that The determining, based on a preset period, a first connection state of a Bluetooth synchronization link SCO between the third-party application and the Bluetooth device includes: In a case where the second virtual call is hung up, the first connection state of the SCO is determined based on the preset period, and the second virtual call is a historical virtual call of the third-party application.
4. The method according to claim 3, characterized in that When the second virtual call is hung up, determining the first connection state of the SCO based on the preset period includes: In the case where the second virtual call is hung up, determining reason information for hanging up the second virtual call; When the reason information indicates that the second virtual call is hung up before the communication is completed, the first connection state of the SCO is determined based on the preset period.
5. The method according to claim 4, characterized in that The method further includes at least one of the following implementations: The reason information for hanging up the second virtual call includes network information. When the network information indicates an unstable network connection, determining that the second virtual call was hung up before the communication was completed; The reason information for hanging up the second virtual call includes an audio signal before the second virtual call is hung up, and when the audio signal does not include a closing statement, determining that the second virtual call is hung up before the communication is completed; The reason information for hanging up the second virtual call includes the device identifier of the responding second virtual call. When the device identifier is used to indicate that the device responding to the second virtual call is the terminal, it is determined that the second virtual call was hung up before the communication was completed.
6. The method according to claim 1, characterized in that The sending a first connection indication message to the third-party application includes: verifying a condition for sending the first connection indication message; If the condition for sending the first connection indication message is verified to be passed, the first connection indication message is sent to the third-party application.
7. The method according to claim 6, characterized in that The verifying the condition for sending the first connection indication message includes at least one of the following implementation methods: determining a second connection state between the terminal and the Bluetooth device, and if the second connection state is connected, determining that a condition check for sending the first connection indication message passes; determining a first connection state of the SCO, and if the first connection state is disconnected, determining that a condition check for sending the first connection indication message passes; Determining a call status of the terminal, and if the call status is in progress, determining that a condition check for sending the first connection indication message passes; determining an ongoing call of the terminal, and if the ongoing call is a virtual call, determining that a condition check for sending the first connection indication message passes; Determine a responding device for the ongoing call with the terminal, and if the responding device is the terminal, determine that a condition check for sending the first connection indication message passes.
8. The method according to claim 1, characterized in that The method further comprises: When the first connection state is disconnected and the usage information indicates that the third-party application currently does not have the first virtual call, determining demand information of the third-party application, where the demand information indicates whether the third-party application has a demand for a virtual call; When the demand information indicates that the third-party application has a demand for a virtual call, sending a second connection indication message to the third-party application, where the second connection indication message is used to instruct the third-party application to re-establish the SCO with the Bluetooth device; In response to the third virtual call of the third-party application, the third virtual call is responded to through the Bluetooth device based on the SCO.
9. A virtual communication device based on a Bluetooth device, characterized in that: The device comprises: a determination module for determining an operating state of a third-party application of the terminal; and, when the operating state is foreground operation or background operation, determining, based on a preset period, a first connection state of a Bluetooth synchronization link SCO between the third-party application and the Bluetooth device and usage information of the third-party application, wherein the usage information is used to indicate whether the third-party application currently has a first virtual call, the first virtual call being a virtual call responded to by the terminal, and when the operating state is foreground operation, the preset period is a first period, and when the operating state is background operation, the preset period is a second period, and the first period is less than the second period; a sending module, configured to, when the first connection state is disconnected and the usage information indicates that the third-party application currently has the first virtual call, send a first connection indication message to the third-party application, wherein the first connection indication message is used to instruct the third-party application to re-establish the SCO with the Bluetooth device; A switching module is used to switch the device responding to the first virtual call from the terminal to the Bluetooth device based on the SCO after the third-party application and the Bluetooth device complete establishing the SCO, and the SCO is used to transmit the audio signal of the first virtual call between the third-party application and the Bluetooth device.
10. A terminal, characterized in that: The terminal includes a processor and a memory; the memory stores at least one program code, and the at least one program code is used to be executed by the processor to implement the virtual call method based on a Bluetooth device as described in any one of claims 1 to 8.
11. A computer-readable storage medium, characterized in that The computer-readable storage medium stores at least one program code, and the at least one program code is used to be executed by a processor to implement the virtual call method based on a Bluetooth device according to any one of claims 1 to 8.
12. A computer program product, characterized in that The computer program product stores at least one program code, and the at least one program code is loaded and executed by a processor to implement the virtual call method based on a Bluetooth device according to any one of claims 1 to 8.
Citation Information
Patent Citations
Bluetooth control method and device, mobile terminal and storage medium
CN110602683A