Application program control method and related device

By detecting the wearing status of wireless headsets and controlling the status of target applications, the problem of switching audio output devices during use of wireless headsets is solved, improving user experience and audio fluency.

CN115348349BActive Publication Date: 2024-10-18GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110529140.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-05-14
Publication Date
2024-10-18
Estimated Expiration
2041-05-14

AI Technical Summary

Technical Problem

In wireless headset use scenarios, existing technology cannot intelligently identify and automatically pause audio output, resulting in poor user experience. Especially after removing the wireless headset, the audio output device remains a wireless headset or is switched to an electronic device, which may result in missed listening. The content may cause confusion in public.

Method used

By detecting the wearing status of the wireless headset, the target application's status information is obtained, and based on whether it has the ability to respond to the pause command, it will automatically enter the suspend state to ensure that the audio output is correctly controlled when the wireless headset is not worn.

Benefits of technology

It improves the user experience. By automatically identifying and controlling audio output, it avoids unreasonable switching of audio output devices after the wireless headset is removed, ensuring smooth audio pause and reasonable selection of output paths.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115348349B_ABST
    Figure CN115348349B_ABST
Patent Text Reader

Abstract

The present application provides an application control method and related devices. First, when it is detected that the audio output device of the target application running on the electronic device is a wireless headset and the wireless headset is not worn, the state information of the target application is obtained; then, when it is determined according to the state information that the target application does not have the ability to respond to the pause instruction from the wireless headset, the target application is instructed to enter a suspended state. In the scenario where the user uses a wireless headset, the target application that cannot be automatically paused when the wireless headset is not worn can be automatically identified, and the target application can be controlled to enter a suspended state, thereby improving the user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of Internet of Things, and in particular to an application control method and related devices. Background Art

[0002] The audio output methods of electronic devices mainly include speaker output and headphone output. Currently, users usually pair and connect the electronic device with wireless headphones first, and then wear the wireless headphones on their ears as an audio output path to play audio signals. In the actual application scenario of wireless headphones, the unreasonable selection of audio output paths between the wireless headphone end and the electronic device end will bring a bad user experience to the user. Summary of the invention

[0003] Based on the above problems, the present application proposes an application control method and related devices, which can control the applications running on the electronic device according to the status of the wireless headset to improve the user experience.

[0004] In a first aspect, an embodiment of the present application provides an application control method, including:

[0005] When it is detected that the audio output device of the target application running on the electronic device is a wireless headset and the wireless headset is not worn, acquiring the status information of the target application;

[0006] When it is determined according to the state information that the target application does not have the ability to respond to the pause instruction from the wireless headset, the target application is instructed to enter a suspended state.

[0007] In a second aspect, an embodiment of the present application provides an application control device, the application control device comprising:

[0008] A state acquisition unit, configured to acquire state information of the target application running on the electronic device when it is detected that the audio output device of the target application running on the electronic device is a wireless headset and the wireless headset is not worn;

[0009] The program control unit is used to instruct the target application to enter a suspended state when it is determined according to the state information that the target application does not have the ability to respond to the pause instruction from the wireless headset.

[0010] In a third aspect, an embodiment of the present application provides an electronic device, comprising a processor, a memory, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the processor, and the program includes instructions for executing the steps of the method described in any one of the first aspect of the embodiments of the present application.

[0011] In a fourth aspect, an embodiment of the present application provides a computer storage medium, wherein the computer storage medium stores a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by a processor, the processor executes a method as described in any one of the first aspects of the embodiments of the present application.

[0012] In a fifth aspect, an embodiment of the present application provides a computer product, wherein the computer program product includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to cause a computer to execute some or all of the steps described in any method of the first aspect of the embodiment of the present application. The computer program product may be a software installation package.

[0013] It can be seen that the above application control method and related device firstly detect that the audio output device of the target application running on the electronic device is a wireless headset and the wireless headset is not worn, and then obtain the status information of the target application; then, when it is determined according to the status information that the target application does not have the ability to respond to the pause instruction from the wireless headset, the target application is instructed to enter the suspended state. In the scenario where the user uses wireless headsets, the target application that cannot be automatically paused when the wireless headset is not worn can be automatically identified, and the target application can be controlled to enter the suspended state, thereby improving the user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying any creative work.

[0015] Figure 1 A schematic diagram of an application scenario of an application control method provided in an embodiment of the present application;

[0016] Figure 2 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application;

[0017] Figure 3 A flowchart of an application control method provided in an embodiment of the present application;

[0018] Figure 4 A flowchart of another application control method provided in an embodiment of the present application;

[0019] Figure 5 A block diagram of the functional units of an application control device provided in an embodiment of the present application;

[0020] Figure 6 A block diagram of the functional units of another application control device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0021] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0022] The terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally includes steps or units that are not listed, or optionally includes other steps or units inherent to these processes, methods, products or devices.

[0023] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0024] The background technology of the embodiments of the present application is described below. After the existing wireless headset is connected to an electronic device, when it is necessary to take off the wireless headset, the user generally manually pauses the application and then takes off the wireless headset; or the application is automatically paused after taking off the wireless headset; or after taking off the wireless headset, the audio output device of the application is still the wireless headset; or after taking off the wireless headset, the audio output device of the application is switched to the electronic device.

[0025] The above method of manual pause is not smart enough. Many applications do not support automatic pause. If the audio output device of the application is still the wireless headset after taking off the wireless headset, the user will miss some content. If the audio output device of the application is switched to an electronic device after taking off the headset, it will cause confusion to the user in some public places.

[0026] Based on the above problems, an embodiment of the present application provides an application control method and related devices, which can automatically identify the target application that cannot be paused when the user takes off the wireless headphones in the scenario where the user uses wireless headphones, and control the target application to put it into a suspended state, thereby improving the user experience.

[0027] First combine Figure 1 An application scenario of an application control method in an embodiment of the present application is described. Figure 1 A schematic diagram of an application scenario of an application control method provided in an embodiment of the present application includes an electronic device 100 and a wireless headset 200.

[0028] The electronic device 100 described in the embodiments of the present application may include various handheld devices with wireless communication functions, vehicle-mounted devices, wireless headphones, computing devices or other processing devices connected to a wireless modem, as well as various forms of user equipment (UE), mobile stations (MS), terminal devices, etc. The electronic device may be, for example, a smart phone, a tablet computer, a wearable device, etc. For the convenience of description, the above-mentioned devices are collectively referred to as the electronic device 100.

[0029] In the embodiment of the present application, the wireless headset 200 can be: a Bluetooth headset, a true wireless stereo (TWS) headset, and of course other headsets based on wireless transmission, such as an optical conduction headset, etc. The Bluetooth headset can be an ordinary Bluetooth headset, that is, a headset that plays sound through a speaker, and of course the Bluetooth headset can also be a bone conduction headset. The present application does not limit the sound conduction method of the wireless headset. The wireless headset 200 can establish a wireless connection with the electronic device 100, and the wireless headset 200 can be a dual headset or a single headset.

[0030] It can be understood that the wireless headset can be an ear-hook headset, an in-ear headset, or a head-mounted headset, and the embodiment of the present application is not limited thereto.

[0031] The electronic device 100 is connected to the wireless headset 200. When the wireless headset 200 is worn on the user's ear, it can be identified that the wireless headset 200 is in a wearing state, and the target application running on the electronic device 100 uses the wireless headset 200 as an audio output channel. The wireless headset 200 and the electronic device 100 can detect in real time whether the wireless headset 200 is in a wearing state. When the user takes off the wireless headset 200, it can be detected that the wireless headset 200 is not in a wearing state. At this time, the wireless headset 200 sends a pause instruction to the electronic device 100, and the pause instruction is used to pause the target application. At this time, the electronic device 100 can detect the target application and determine whether the target application can respond to the pause instruction from the wireless headset 200. If the target application cannot respond to the pause instruction from the wireless headset 200, the electronic device 100 can switch the target application to the background by popping up a target dialog box to force it to enter a suspended state; if the target application can respond to the pause instruction from the wireless headset 200, it enters a suspended state. It should be noted that the above-mentioned target application is an application currently running on the electronic device, which may include music applications, video applications, game applications, etc., and is not specifically limited here. The above-mentioned target dialog box may be a dialog box of the dialog type.

[0032] Through the above application scenarios, the audio output path can be reasonably selected between the electronic device and the wireless headset during use, so as to flexibly control the audio output and improve the user experience.

[0033] Furthermore, the following is combined Figure 2 An electronic device in an embodiment of the present application is described. Figure 2 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. The electronic device 100 includes a storage and processing circuit 110, and a sensor 170 connected to the storage and processing circuit 110, wherein:

[0034] The electronic device 100 may include a control circuit, which may include a storage and processing circuit 110. The storage and processing circuit 110 may include a memory, such as a hard disk drive memory, a non-volatile memory (such as a flash memory or other electronic programmable read-only memory for forming a solid-state drive, etc.), a volatile memory (such as a static or dynamic random access memory, etc.), etc., which is not limited by the embodiments of the present application. The processing circuit in the storage and processing circuit 110 can be used to control the operation of the electronic device 100. The processing circuit can be implemented based on one or more microprocessors, microcontrollers, digital signal processors, baseband processors, power management units, audio codec chips, application-specific integrated circuits, display driver integrated circuits, etc.

[0035] The storage and processing circuit 110 may be used to run software in the electronic device 100, such as an Internet browsing application, a Voice over Internet Protocol (VOIP) phone call application, an email application, a media playback application, an operating system function, etc. These software may be used to perform some control operations, such as image acquisition based on a camera, ambient light measurement based on an ambient light sensor, proximity sensor measurement based on a proximity sensor, information display functions implemented based on status indicators such as status indicators of light-emitting diodes, touch event detection based on a touch sensor, functions associated with displaying information on multiple (e.g., layered) display screens, operations associated with performing wireless communication functions, operations associated with collecting and generating audio signals, control operations associated with collecting and processing button press event data, and other functions in the electronic device 100, etc., which are not limited by the embodiments of the present application.

[0036] The electronic device 100 may include an input-output circuit 150. The input-output circuit 150 may be used to enable the electronic device 100 to input and output data, that is, to allow the electronic device 100 to receive data from an external device and also allow the electronic device 100 to output data from the electronic device 100 to an external device. The input-output circuit 150 may further include a sensor 170. The sensor 170 may include an ultrasonic fingerprint recognition module, and may also include an ambient light sensor, a proximity sensor based on light and capacitance, a touch sensor (for example, based on a light touch sensor and / or a capacitive touch sensor, wherein the touch sensor may be part of a touch display screen, or may be used independently as a touch sensor structure), an acceleration sensor, and other sensors, etc. The ultrasonic fingerprint recognition module may be integrated under the screen, or the ultrasonic fingerprint recognition module may be disposed on the side or back of the electronic device, which is not limited here, and the ultrasonic fingerprint recognition module may be used to collect fingerprint images.

[0037] The sensor 170 may include a first camera and a second camera. The first camera may be a front camera or a rear camera, and the second camera may be a front camera or a rear camera. The second camera may be an infrared (Infrared Radiation, IR) camera or a visible light camera. When the IR camera is shooting, the pupil reflects infrared light, so the IR camera is more accurate than the RGB camera in shooting pupil images; the visible light camera requires more subsequent pupil detection, and has higher calculation precision and accuracy than the IR camera, and better versatility than the IR camera, but the amount of calculation is large.

[0038] The input-output circuit 150 may also include one or more display screens, such as the display screen 130. The display screen 130 may include a liquid crystal display screen, an organic light-emitting diode display screen, an electronic ink display screen, a plasma display screen, a display screen using other display technologies, or a combination of several of them. The display screen 130 may include a touch sensor array (i.e., the display screen 130 may be a touch-controlled display screen). The touch sensor may be a capacitive touch sensor formed by an array of transparent touch sensor electrodes (e.g., indium tin oxide (ITO) electrodes), or may be a touch sensor formed using other touch technologies, such as sonic touch, pressure-sensitive touch, resistive touch, optical touch, etc., which is not limited in the embodiments of the present application.

[0039] The electronic device 100 may further include an audio component 140. The audio component 140 may be used to provide audio input and output functions for the electronic device 100. The audio component 140 in the electronic device 100 may include a speaker, a microphone, a buzzer, a tone generator, and other components for generating and detecting sound.

[0040] The communication circuit 120 can be used to provide the electronic device 100 with the ability to communicate with external devices. The communication circuit 120 may include analog and digital input-output interface circuits, and wireless communication circuits based on radio frequency signals and / or optical signals. The wireless communication circuit in the communication circuit 120 may include a radio frequency transceiver circuit, a power amplifier circuit, a low noise amplifier, a switch, a filter, and an antenna. For example, the wireless communication circuit in the communication circuit 120 may include a circuit for supporting near field communication (NFC) by transmitting and receiving near field coupled electromagnetic signals. For example, the communication circuit 120 may include a near field communication antenna and a near field communication transceiver. The communication circuit 120 may also include a cellular phone transceiver and antenna, a wireless local area network transceiver circuit and antenna, etc.

[0041] The electronic device 100 may further include a battery, power management circuits and other input-output units 160. The input-output units 160 may include buttons, joysticks, click wheels, scroll wheels, touch pads, keypads, keyboards, cameras, light emitting diodes and other status indicators, etc.

[0042] A user may input commands through input-output circuitry 150 to control the operation of electronic device 100 , and may use output data of input-output circuitry 150 to enable receiving status information and other outputs from electronic device 100 .

[0043] The above is an application scenario and hardware introduction of the embodiment of the present application. Figure 3 An application control method in an embodiment of the present application is described. Figure 3 A flowchart of an application control method provided in an embodiment of the present application, which is applied to an electronic device, specifically includes the following steps:

[0044] Step 301: When it is detected that the audio output device of the target application running on the electronic device is a wireless headset and the wireless headset is not worn, the status information of the target application is obtained.

[0045] The target application may be any of the following: an audio player application, a video player application, a live broadcast application, a chat application, etc., which are not specifically limited here. It is understandable that the application currently running on the electronic device is the target application. If there are multiple applications that can output audio at the same time, all the applications that can output audio at the same time can be determined as the target application.

[0046] The audio output device is used to output the audio of the target application. When used as an audio output device, it can be in a state of playing the audio of the target application or in a state of pausing the audio of the target application.

[0047] When the wireless headset is a single headset, it can be determined that it is in the unworn state when the entire single headset is taken off; when the wireless headset is a dual headset, it can be determined that it is in the unworn state only when both headsets are taken off.

[0048] The wireless headset can detect in real time whether it is in a worn state or not worn state, and report it to the electronic device. When the wireless headset is not worn, the electronic device can obtain the step of executing the state information of the target application, and the state information of the target application can include relevant information of the application software. The electronic device can determine whether the target application has the ability to respond to the pause instruction from the wireless headset based on the state information. It can be understood that the not worn state includes the scenario where the user manually takes off the wireless headset, and also includes the scenario where the wireless headset is insufficient in power and cannot continue to output audio.

[0049] Specifically, when the electronic device obtains the state information of the target application, it can perform the following steps:

[0050] 31. Get the process number corresponding to the currently active audio track;

[0051] 32. Obtain target application identification information of the target application according to the process number.

[0052] It is understandable that the above-mentioned target application will be in an activated state when it is running, and the output audio will also produce a corresponding audio track. The electronic device can directly obtain the process number corresponding to the activated audio track. Since the process number can be the unique identifier of the target application, the target application and the corresponding target application identification information can be directly determined. The target application identification information is the identification information that identifies the target application. The target application identification information can be an application name, an application serial number, an application icon, etc., which is not limited here. The target application identification information can facilitate the electronic device to query whether the target application has the ability to respond to the pause command from the wireless headset, which will not be discussed here.

[0053] It can be seen that when it is detected that the audio output device of the target application running on the electronic device is a wireless headset and the wireless headset is not worn, the status information of the target application is obtained, and it is possible to automatically determine whether the target application has the ability to respond to a pause instruction from the wireless headset, thereby facilitating subsequent application control and improving determination efficiency and accuracy.

[0054] Step 302: When it is determined according to the state information that the target application is not capable of responding to a pause instruction from the wireless headset, instruct the target application to enter a suspended state.

[0055] Among them, the electronic device can determine whether the target application has the ability to respond to the pause command from the wireless headset based on the state information of the target application. When it is determined that the target application does not have the ability to respond to the pause command from the wireless headset, the target application can be controlled to enter a suspended state, for example, the target application is controlled from a running state to a background suspended state, thereby utilizing the effect that audio and video apps that do not respond to pause can often be suspended when switched to the background, and avoiding the audio of the target application being directly played through the electronic device after the wireless headset is removed. It can be understood that the suspended state can be a state that can cause the audio and video APP that does not have the ability to respond to the above pause to have a pause effect.

[0056] In a possible embodiment, the electronic device can generate a target dialog box of the dialog type. The above target dialog box is a small window that pops up on the current interface of the electronic device, which is used to display important prompt information, prompt the user to input information, confirm information, or display a certain status, such as download progress, exit prompt, etc., and can also include a feedback button, which can generally include a play button and a pause button for the user to choose.

[0057] Generally, when the target dialog box pops up, the target application will be switched to the background and enter a suspended state. The user can interact with the dialog box and then return to the covered interface to continue running the target application.

[0058] For example, the target application is a video software, which is playing a first video and the audio output device is a wireless headset. When the user takes off the wireless headset, the electronic device can receive information reported by the wireless headset that it is not being worn. When it is determined that the video software does not have the ability to respond to a pause instruction from the wireless headset, a target dialog box can be generated to cover the video software and pause its playback. The target dialog box can be used to prompt the user that the wireless headset has been taken off. At this time, clicking play will cause the audio output device of the video software to switch to the electronic device, and provide buttons such as "Continue Playing", "Pause Playing" and "Playing with Headphones" for the user to choose. When the user selects "Continue Playing", the target dialog box is closed and the first video is continued to be played. At this time, the audio of the first video is played out; when the user selects "Pause Playing", the target dialog box is closed and the first video is paused; when the user selects "Playing with Headphones", the target dialog box is closed and the first video is continued to be played. At this time, the audio of the first video is still output through the removed wireless headset. It should be noted that the prerequisite for generating this button is that the wireless headset has power to support audio output.

[0059] It can be seen that when it is determined according to the status information that the target application does not have the ability to respond to the pause instruction from the wireless headset, a target dialog box pops up to instruct the target application to enter a suspended state. In the scenario where the user uses wireless headsets, the target application that cannot be automatically paused when the wireless headset is not worn can be automatically identified, and the target application can be controlled to enter a suspended state, thereby improving the user experience.

[0060] Combine the following Figure 4 Another application control method in the embodiment of the present application is described. Figure 4 A flowchart of another application control method provided in an embodiment of the present application specifically includes the following steps:

[0061] Step 401: The electronic device is connected to a wireless headset and runs a target application.

[0062] The target application can be any of the following: audio playback application, video playback application, live broadcast application, chat application, etc., which are not specifically limited here. It is understandable that the application currently running on the above electronic device is the target application. If there are multiple applications that can output audio at the same time, all applications that can output audio at the same time can be determined as target applications. It is understandable that the wireless headset is in a wearing state at this time, and the wireless headset is the audio output device of the target application.

[0063] Step 402: When it is detected that the wireless headset is not being worn, the status information of the target application is obtained.

[0064] Among them, the wireless headset can detect the scene of being taken off and report to the electronic device, and can also detect the scene of its own low power and report to the electronic device. The above two scenarios can be understood as the wireless headset is not worn. The electronic device can obtain the process number corresponding to the audio track (audio track) that is currently in the active state, and obtain the target application identification information of the target application according to the process number. It can be understood that the above-mentioned target application will be in an active state when running, and the output audio will also produce a corresponding audio track. The electronic device can directly obtain the process number corresponding to the activated audio track. Since the process number can be the unique identifier of the target application, the target application and the corresponding target application identification information can be directly determined. The target application identification information is the identification information that identifies the target application. The target application identification information can be an application name, an application serial number, an application icon, etc., which is not limited here. The target application identification information can facilitate the electronic device to query whether the target application has the ability to respond to the pause instruction from the wireless headset.

[0065] In a possible embodiment, upon receiving a pause instruction sent by a wireless headset, detecting whether the target application responds to the pause instruction within a preset period of time;

[0066] If the target application responds to the pause instruction within a preset period of time, the target application automatically enters a suspended state;

[0067] If the target application does not respond to the pause instruction within a preset period of time, the target application is instructed to enter a suspended state.

[0068] Specifically, the preset time period may be a time period between a timestamp of receiving a pause instruction and a timestamp of detecting that the wireless headset is not being worn. Generally, wireless headsets are worn on both ears of a user. When the headsets are taken off, there is a difference in the timestamps when the left and right headsets leave the user's ears. Generally, when either earphone leaves the user's ear, a pause instruction will be sent to a connected electronic device. The electronic device may detect whether a target application is able to respond to the pause instruction. If the target application has not responded to the pause instruction when the other earphone is taken off, it may be directly determined that the target application does not have the ability to respond to the pause instruction from the wireless headset. When the other earphone is also taken off and is not being worn, the target application is controlled to enter a suspended state.

[0069] This can increase data processing speed and improve the efficiency of application control, but the accuracy will be relatively reduced.

[0070] Step 403: determine, based on the status information, whether the target application has the ability to respond to a pause instruction from the wireless headset.

[0071] Among them, when the above-mentioned wireless headset confirms that it is not being worn, it can send a pause instruction to the electronic device, and the pause instruction is used to pause the target application to stop audio output.

[0072] Among them, the target application identification information can be compared with the preset status information, and the preset status information includes information about the application that cannot respond to the pause command from the wireless headset, which may correspond to the preset application name, preset application serial number, preset application icon, etc., which is not specifically limited here.

[0073] Further, when the above-mentioned state information matches the preset state information, it can be determined that the target application does not have the ability to respond to the pause instruction from the wireless headset;

[0074] When the state information does not match the preset state information, it is determined that the target application has the ability to respond to the pause instruction.

[0075] If the target application has the ability to respond to the pause instruction from the wireless headset, step 404 is executed; if the target application does not have the ability to respond to the pause instruction from the wireless headset, step 405 is executed.

[0076] Step 404: Control the target application to enter a suspended state according to the pause instruction from the wireless headset.

[0077] Furthermore, after the target application enters the suspended state, when a play instruction fed back by the user is obtained, if it is detected that the wireless headset is in the unworn state, the audio output path of the target application is determined to be the electronic device and the target application is put into the running state;

[0078] When the play instruction fed back by the user is obtained, if it is detected that the wireless headset is in a wearing state, the audio output path of the target application is determined to be the wireless headset and the target application is put into a running state.

[0079] Step 405: pop up a target dialog box to instruct the target application to enter a suspended state.

[0080] The target dialog box is a small window that pops up on the current interface of the electronic device, which is used to display important prompt information, prompting the user that the audio output path of the target application has been switched to the electronic device at this time, and may also include a feedback button, which generally includes a play button and a pause button for the user to choose. Generally, when the target dialog box pops up, the target application will switch to the background, and the user must interact with the dialog box and then return to the covered interface to continue running the target application.

[0081] Step 406: Obtain the user's feedback instruction for the feedback button.

[0082] The feedback instruction includes a feedback play instruction of selecting the play button or a feedback pause instruction of selecting the pause button.

[0083] Wherein, when the feedback instruction is the feedback play instruction, step 407 is executed; when the feedback instruction is the feedback pause instruction, step 408 is executed.

[0084] Step 407, closing the target dialog box, determining that the target application enters a running state and uses the electronic device as the audio output path.

[0085] Among them, the current environment data can be detected to determine the playback scene type, the environment data includes any one or any combination of surrounding image data, surrounding decibel data, and user location data, and the playback scene type includes any one of a silent scene, a low-volume playback scene, and a loud-volume playback scene. For example, if the analysis of any one or any combination of the surrounding image data, the surrounding decibel data, and the user location data can determine that the user is in a library at this time, then the playback scene type can be determined to be a silent scene; if the analysis of any one or any combination of the surrounding image data, the surrounding decibel data, and the user location data can determine that the user is at home at this time, then the playback scene type can be determined to be a loud-volume type;

[0086] Furthermore, the audio output settings of the target application can be determined according to the playback scene type, such as volume settings, audio output special effect settings, etc. It is understandable that the playback volume settings can be flexibly adapted according to the content and playback scene of the target application, and are not specifically limited here. It can be seen that in this way, the audio output can be optimized in combination with the current scene while responding to user feedback, greatly improving the user experience.

[0087] Step 408: close the target dialog box and determine that the target application maintains the suspended state.

[0088] Through the above method, during use, the audio output path can be reasonably selected between the electronic device end and the wireless headset end, so as to flexibly control the audio output and improve the user experience.

[0089] The steps not described in detail above can be found in Figure 3 All or part of the steps of the method described in will not be repeated here.

[0090] The above mainly introduces the scheme of the embodiment of the present application from the perspective of the execution process on the method side. It is understandable that, in order to realize the above functions, the electronic device includes a hardware structure and / or software module corresponding to the execution of each function. It should be easily appreciated by those skilled in the art that, in combination with the units and algorithm steps of each example described in the embodiments provided herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present application.

[0091] The embodiment of the present application can divide the electronic device into functional units according to the above method example. For example, each functional unit can be divided according to each function, or two or more functions can be integrated into one processing unit. The above integrated unit can be implemented in the form of hardware or in the form of software functional units. It should be noted that the division of units in the embodiment of the present application is schematic and is only a logical function division. There may be other division methods in actual implementation.

[0092] In the case of dividing each functional module according to each function, the following is combined Figure 5 An application control device in an embodiment of the present application is described. Figure 5 This is a block diagram of the functional units of an application control device provided in an embodiment of the present application. The application control device 500 includes:

[0093] The state acquisition unit 510 is used to acquire the state information of the target application when it is detected that the audio output device of the target application running on the electronic device is a wireless headset and the wireless headset is not worn;

[0094] The program control unit 520 is used to pop up a target dialog box to instruct the target application to enter a suspended state when it is determined according to the state information that the target application does not have the ability to respond to the pause instruction from the wireless headset.

[0095] It can be seen that, through the above application control device, first, when it is detected that the audio output device of the target application running on the electronic device is a wireless headset and the wireless headset is not worn, the state information of the target application is obtained; then, when it is determined according to the state information that the target application does not have the ability to respond to the pause instruction from the wireless headset, a target dialog box pops up to instruct the target application to enter a suspended state. In the scenario where the user uses a wireless headset, the target application that cannot be automatically paused when the wireless headset is not worn can be automatically identified, and the target application can be controlled to enter a suspended state, thereby improving the user experience.

[0096] In the case of an integrated unit, the following combination Figure 6 Another application control device 600 in an embodiment of the present application is described in detail, and the application control device 600 includes a processing unit 601 and a communication unit 602, wherein the processing unit 601 is used to execute any step in the above-mentioned method embodiment, and when performing data transmission such as sending, the communication unit 602 can be selectively called to complete the corresponding operation.

[0097] The application control device 600 may further include a storage unit 603 for storing program codes and data. The processing unit 601 may be a processor, and the storage unit 603 may be a memory.

[0098] The processing unit 601 is specifically used for:

[0099] When it is detected that the audio output device of the target application running on the electronic device is a wireless headset and the wireless headset is not worn, acquiring the status information of the target application;

[0100] When it is determined according to the state information that the target application does not have the ability to respond to the pause instruction from the wireless headset, a target dialog box is popped up to instruct the target application to enter a suspended state.

[0101] It can be seen that, through the above application control device, first, when it is detected that the audio output device of the target application running on the electronic device is a wireless headset and the wireless headset is not worn, the state information of the target application is obtained; then, when it is determined according to the state information that the target application does not have the ability to respond to the pause instruction from the wireless headset, a target dialog box pops up to instruct the target application to enter a suspended state. In the scenario where the user uses a wireless headset, the target application that cannot be automatically paused when the wireless headset is not worn can be automatically identified, and the target application can be controlled to enter a suspended state, thereby improving the user experience.

[0102] It is understandable that since the method embodiment and the device embodiment are different presentation forms of the same technical concept, the content of the method embodiment part of this application should be synchronously adapted to the device embodiment part, and will not be repeated here. The above-mentioned application control device 500 and the application control device 600 can both execute all the application control methods included in the above-mentioned embodiments.

[0103] An embodiment of the present application also provides a computer storage medium, wherein the computer storage medium stores a computer program for electronic data exchange, and the computer program enables a computer to execute part or all of the steps of any method recorded in the above method embodiments.

[0104] The embodiment of the present application also provides a computer program product, the computer program product includes a non-transitory computer-readable storage medium storing a computer program, the computer program is operable to cause a computer to execute some or all of the steps of any method described in the method embodiment. The computer program product may be a software installation package, and the computer includes an electronic device.

[0105] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.

[0106] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0107] In the several embodiments provided in the present application, it should be understood that the disclosed device can be implemented in other ways. For example, the device embodiments described above are only schematic, such as the division of the above-mentioned units, which is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, and the indirect coupling or communication connection of devices or units can be electrical or other forms.

[0108] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0109] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0110] If the above-mentioned integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable memory. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a memory, including a number of instructions to enable a computer device (which can be a personal computer, server or network device, etc.) to perform all or part of the steps of the above-mentioned methods of each embodiment of the present application. The aforementioned memory includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or CD-ROM and other media that can store program codes.

[0111] A person skilled in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable memory, and the memory can include: a flash drive, a read-only memory (English: Read-Only Memory, abbreviated as: ROM), a random access memory (English: Random Access Memory, abbreviated as: RAM), a magnetic disk or an optical disk, etc.

[0112] The embodiments of the present application are introduced in detail above. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method and core idea of ​​the present application. At the same time, for general technical personnel in this field, according to the idea of ​​the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. An application control method, It is characterized in that include: When it is detected that the audio output device of the target application running on the electronic device is a wireless headset and the wireless headset is in a not-worn state, the state information of the target application is obtained, and the wireless headset sends a pause instruction to the electronic device when it is in the not-worn state; When it is determined according to the state information that the target application does not have the ability to respond to the pause instruction from the wireless headset, the target application is instructed to change from a running state to a background suspended state.

2. The method according to claim 1, It is characterized in that The instructing the target application to change from a running state to a background suspended state includes: A target dialog box is generated and popped up for display, wherein the target dialog box includes prompt information and feedback buttons, wherein the prompt information is used to prompt the user that the audio output path of the target application has been switched to the electronic device at this time, and the feedback buttons include a play button and a pause button.

3. The method according to claim 2, It is characterized in that After indicating that the target application program changes from a running state to a background suspended state, the method further includes: Acquire a user's feedback instruction for the feedback button, wherein the feedback instruction includes a feedback play instruction for selecting the play button or a feedback pause instruction for selecting the pause button; When the feedback instruction is the feedback play instruction, the target dialog box is closed, the target application is determined to enter a running state and the electronic device is used as the audio output path; When the feedback instruction is the feedback pause instruction, the target dialog box is closed, and the target application is determined to maintain the background suspended state.

4. The method according to claim 3, It is characterized in that The step of determining that the target application enters a playing state and using the electronic device as the audio output path comprises: Detecting current environment data to determine a playback scene type, the environment data including any one or any combination of surrounding image data, surrounding decibel data, and user location data, and the playback scene type including any one of a silent scene, a low-volume playback scene, and a high-volume playback scene; An audio output setting of the target application is determined according to the playback scene type.

5. The method according to claim 1, It is characterized in that After obtaining the status information of the target application, the method further includes: comparing the status information with preset status information, the preset status information including information of an application that cannot respond to a pause instruction from the wireless headset; When the state information matches the preset state information, determining that the target application does not have the ability to respond to a pause instruction from the wireless headset; When the state information does not match the preset state information, it is determined that the target application has the ability to respond to the pause instruction.

6. The method according to claim 5, It is characterized in that After comparing the state information with the preset state information, the method further includes: If the target application has the ability to respond to the pause instruction, the target application is controlled to enter the background suspended state according to the pause instruction from the wireless headset.

7. The method according to claim 6, It is characterized in that After controlling the target application to enter the background suspended state according to the pause instruction from the wireless headset, the method further includes: When obtaining the playback instruction fed back by the user, if it is detected that the wireless headset is in the unworn state, determining that the audio output path of the target application is the electronic device and causing the target application to enter the running state; When the play instruction fed back by the user is obtained, if it is detected that the wireless headset is in a wearing state, the audio output path of the target application is determined to be the wireless headset and the target application is put into a running state.

8. The method according to claim 1, It is characterized in that The obtaining the status information of the target application comprises: Get the process number corresponding to the currently activated audio track; The target application identification information of the target application program is obtained according to the process number.

9. The method according to any one of claims 1 to 8, It is characterized in that The wireless headset includes a single headset; when the wireless headset is the single headset, the unworn state indicates that the single headset is in an unworn state.

10. The method according to any one of claims 1 to 8, Features The wireless headset includes a dual headset; when the wireless headset is the dual headset, the unworn state indicates that both of the dual headsets are in an unworn state.

11. An application control device, It is characterized in that The application control device comprises: a state acquisition unit, configured to acquire state information of the target application when it is detected that the audio output device of the target application running on the electronic device is a wireless headset and the wireless headset is in a not-worn state, wherein the wireless headset sends a pause instruction to the electronic device when the wireless headset is in the not-worn state; The program control unit is used to instruct the target application to change from a running state to a background suspended state when it is determined according to the state information that the target application does not have the ability to respond to the pause instruction from the wireless headset.

12. An electronic device, It is characterized in that The method comprises a processor, a memory, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the processor, and the programs include instructions for executing the steps in the method according to any one of claims 1 to 10.

13. A computer storage medium, It is characterized in that The computer storage medium stores a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by a processor, the processor is enabled to perform the method according to any one of claims 1 to 10.

Citation Information

Patent Citations

  • Application control method and associated device

    CN108769387A

  • Application background control method, mobile terminal and computer readable storage medium

    CN112463015A