CN113179505B - Bluetooth playing device restarting and reconnecting method, bluetooth playing device and electronic equipment - Google Patents
Bluetooth playing device restarting and reconnecting method, bluetooth playing device and electronic equipment Download PDFInfo
- Publication number
- CN113179505B CN113179505B CN202110260533.3A CN202110260533A CN113179505B CN 113179505 B CN113179505 B CN 113179505B CN 202110260533 A CN202110260533 A CN 202110260533A CN 113179505 B CN113179505 B CN 113179505B
- Authority
- CN
- China
- Prior art keywords
- bluetooth
- playing device
- playing
- state
- bluetooth playing
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W4/00—Services specially adapted for wireless communication networks; Facilities therefor
- H04W4/80—Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/16—Sound input; Sound output
- G06F3/162—Interface to dedicated audio devices, e.g. audio drivers, interface to CODECs
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W76/00—Connection management
- H04W76/10—Connection setup
- H04W76/14—Direct-mode setup
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W76/00—Connection management
- H04W76/10—Connection setup
- H04W76/19—Connection re-establishment
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D30/00—Reducing energy consumption in communication networks
- Y02D30/70—Reducing energy consumption in communication networks in wireless communication networks
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Theoretical Computer Science (AREA)
- General Health & Medical Sciences (AREA)
- Audiology, Speech & Language Pathology (AREA)
- Health & Medical Sciences (AREA)
- Human Computer Interaction (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Multimedia (AREA)
- Telephone Function (AREA)
Abstract
The invention discloses a Bluetooth playing device restarting and reconnecting method, a Bluetooth playing device and electronic equipment. The method comprises the following steps: setting and storing the numerical value of a state zone bit according to the working state of the Bluetooth playing device; after the Bluetooth playing device restarts to establish Bluetooth connection, the stored state flag bit is detected to judge the working state of the Bluetooth playing device before disconnection; if the Bluetooth playing device is judged to be in the audio playing state before being disconnected, a playing command is sent, so that the Bluetooth playing device continues to play the previous audio. According to the method and the device, the working state of the Bluetooth playing device before disconnection is recorded, whether the Bluetooth playing device plays music before disconnection is known, if yes, the Bluetooth playing device is controlled to continuously play the music before the Bluetooth playing device is controlled to play music through sending a playing command, and therefore the problem of audio playing interruption caused by abnormal restarting and disconnection is solved.
Description
Technical Field
The present invention relates to the field of bluetooth playing technologies, and in particular, to a method for restarting a bluetooth playing device, and an electronic device.
Background
Products such as bluetooth headset, bluetooth speaker can be used to multiple scenes such as recreation audio-visual, provide wireless free sound experience. However, during the use process, some abnormal situations may occur in the bluetooth playing device inevitably, such as an ESD (Electro-Static discharge) protection restart, a watch dog (watchdog) timeout restart after the system function abnormality, and so on. The Bluetooth playing device is disconnected when being restarted, and Bluetooth is returned after being restarted. However, under the music playing service (i.e. the service of playing music simply by using a music player), the music playing of the sound source end (such as the mobile phone end) after the Bluetooth disconnection is paused, and the sound source end does not automatically continue to play after the Bluetooth playing device is connected back. The Bluetooth playing device is started very much, so that the situation that the music playing is suspended and not resumed in the music playing service state is caused, and the use experience of a user is poor.
Disclosure of Invention
In view of the problem of interruption of music playing caused by abnormal restarting of the bluetooth playing device in the prior art, a method for restarting and reconnecting the bluetooth playing device, the bluetooth playing device and electronic equipment are provided, so as to overcome the problem.
In order to achieve the above purpose, the present application adopts the following technical scheme:
according to one aspect of the present application, there is provided a method for restarting a bluetooth playback device, the method including:
setting and storing the numerical value of a state zone bit according to the working state of the Bluetooth playing device;
after the Bluetooth playing device restarts to establish Bluetooth connection, the stored state flag bit is detected to judge the working state of the Bluetooth playing device before disconnection;
if the blue tooth earphone is judged to be in the audio playing state before being disconnected, a playing command is sent, so that the Bluetooth playing device continues to play the previous audio.
Optionally, before sending the play command after determining that the bluetooth playing device is in the audio play state before being disconnected, the method further includes:
further judging whether the Bluetooth playing device is in a service state of the music player before disconnection, if yes, sending a playing command, otherwise, not sending the playing command.
Optionally, further judging whether the bluetooth playing device is in a service state of the music player before disconnection, including:
detecting whether the Bluetooth playing device generates an A2DP audio stream after restarting to establish Bluetooth connection, if the A2DP audio stream does not generate, judging that the Bluetooth playing device is in a service state of a music player before disconnection, and if the A2DP audio stream generates, judging that the Bluetooth playing device is in a service state of a non-music player before disconnection.
Optionally, setting and saving a value of a status flag according to a working status of the bluetooth playing device, including:
when the Bluetooth playing device plays the sound, the sound playing time is timed, if the playing time exceeds the preset duration, the state flag bit is set, and when the sound playing is stopped, the state flag bit is reset.
Optionally, the status flag bit is an A2DP flag bit newly written into the bluetooth playing device.
According to another aspect of the present application, there is provided a bluetooth playback apparatus including:
the state flag unit is used for setting and storing the numerical value of the state flag bit according to the working state of the Bluetooth playing device;
the state detection unit is used for detecting the stored state marker bit after the Bluetooth playing device is restarted to establish Bluetooth connection so as to judge the working state of the Bluetooth playing device before disconnection;
and the playing control unit is used for sending a playing command when judging that the Bluetooth playing device is in an audio playing state before disconnection, so that the Bluetooth playing device continues to play the previous audio.
Optionally, the bluetooth playing device further includes:
and the service detection unit is used for further judging whether the Bluetooth playing device is in the service state of the music player before the Bluetooth playing device is disconnected after the state detection unit judges that the Bluetooth playing device is in the audio playing state before the Bluetooth playing device is disconnected, if yes, the playing control unit sends the playing command, and if not, the playing control unit does not send the playing command any more.
Optionally, the service detection unit is configured to detect whether an A2DP audio stream appears after the bluetooth playing device restarts to establish the bluetooth connection, if the A2DP audio stream does not appear, determine that the bluetooth playing device is in a service state of the music player before disconnection, and if the A2DP audio stream appears, determine that the bluetooth playing device is in a service state of the non-music player before disconnection.
Optionally, the state flag unit is configured to time the sound playing time when the bluetooth playing device plays the sound, set the state flag bit if the playing time exceeds a preset duration, and reset the state flag bit when the sound playing is stopped.
According to still another aspect of the present application, there is provided an electronic apparatus including:
a processor; and
a memory arranged to store computer executable instructions that when executed cause the processor to perform any of the bluetooth playback devices restart the method of reconnecting as described above.
In summary, the beneficial effects of the application are:
and the working state of the Bluetooth playing device before disconnection is recorded, so that whether the Bluetooth playing device plays the audio before disconnection is known, if yes, the Bluetooth playing device is controlled to continue playing the audio before the Bluetooth playing device is continuously played by sending a playing command, and the problem of audio playing interruption caused by abnormal restarting and disconnection is solved.
In the preferred embodiment of the application, after judging that the Bluetooth playing device is in the audio playing state before being disconnected, further judging whether the Bluetooth playing device is in the service state of the music player before being disconnected, if yes, sending a playing command, otherwise, not sending the playing command any more, so that the problem that the music player is opened at the same time by mistake when the Bluetooth playing device processes services such as video and games can be avoided, and the user experience is improved. Preferably, the embodiment of the application detects whether an A2DP audio stream appears after the bluetooth connection to determine whether the bluetooth playing device is in a service state of the music player before disconnection.
In the preferred embodiment of the application, the setting or resetting of the status flag bit is realized by setting the status flag bit and timing the playing time of the Bluetooth playing device to compare the preset duration. By timing the playing time, the interference of short audio (such as prompt tone) can be filtered, and the problem of wrong playing state marking is avoided.
Drawings
Fig. 1 is a schematic flowchart of a method for restarting a bluetooth playback device according to an embodiment of the present application;
fig. 2 is a schematic diagram illustrating a restarting and reconnecting operation process of a bluetooth playing device according to an embodiment of the present application;
fig. 3 is a schematic diagram of a structure of a bluetooth playing device according to an embodiment of the present application;
fig. 4 is a schematic diagram of an electronic device according to an embodiment of the present application.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present application more apparent, the embodiments of the present application will be described in further detail below with reference to the accompanying drawings.
In the description of the present application, it should be noted that the directions or positional relationships indicated by the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc. are based on the directions or positional relationships shown in the drawings, are merely for convenience of description of the present application and to simplify the description, and do not indicate or imply that the devices or elements referred to must have a specific orientation, be configured and operated in a specific orientation, and thus should not be construed as limiting the present application. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance.
In the description of the present application, it should be noted that, unless explicitly specified and limited otherwise, the terms "mounted," "connected," and "connected" are to be construed broadly, and may be either fixedly connected, detachably connected, or integrally connected, for example; can be mechanically or electrically connected; can be directly connected or indirectly connected through an intermediate medium, and can be communication between two elements. The specific meaning of the terms in this application will be understood by those of ordinary skill in the art in a specific context.
The technical conception of the application is as follows: and the working state of the Bluetooth playing device before disconnection is recorded, so that whether the Bluetooth playing device plays music before disconnection is known, if yes, the Bluetooth playing device is controlled to continuously play the previous music by sending a playing command, and the problem of audio playing interruption caused by abnormal restarting and disconnection is solved.
Fig. 1 is a schematic flowchart of a method for restarting a bluetooth playback device according to an embodiment of the present application. As shown in fig. 1, a method for restarting a bluetooth playback device includes:
step S110, according to the working state of the Bluetooth playing device, setting the value of the state flag bit and storing. The status flag bit does not disappear in the restarting process so as to record the working status of the Bluetooth playing device before playing.
Step S120, after the Bluetooth playing device is restarted to establish the Bluetooth connection, the stored state flag bit is detected, and the working state of the Bluetooth playing device before disconnection is judged, so that the follow-up playing control processing is facilitated.
Step S130, if the blue tooth earphone is in the audio playing state before being disconnected, a playing command is sent to enable the Bluetooth playing device to continue playing the previous audio.
Therefore, the working state of the Bluetooth playing device before disconnection is recorded through the state flag bit, and after the Bluetooth connection is restarted, the music playing function of the Bluetooth playing device is controlled according to the state information, so that the automatic continuous playing of music after restarting and reconnecting can be realized, the manual playing operation of a user under the abnormal restarting condition of the device is omitted, the automatic recovery of the music function of the Bluetooth playing device is realized, and the use experience of the user is effectively improved.
In an embodiment of the present application, in the step 130, the sent play command is an AVRCP play command, or may be another custom type play command, so as to inform the audio source end (such as the mobile phone end) to resume playing music.
Taking AVRCP playing command as an example, AVRCP (Audio/Video Remote Control Profile), i.e. Audio/video remote control specification, can realize control of media playing, and in a connection state, the bluetooth playing device can send AVRCP command to an Audio source end (such as a mobile phone) to control music playing and pausing. However, in the existing video or game scenario, after the bluetooth playback device is restarted and connected back, the A2DP (Advanced Audio Distribution Profile, bluetooth audio transmission model protocol) service is re-established, so that the audio playback is switched from the source device side to the bluetooth playback device side. Therefore, if the bluetooth playing device is in a video or game scene, sending a playing command triggers some source device terminals to synchronously play music, so that the sound of the video or game is mixed with the sound of the music, and the use experience of a user is affected.
Thus, in step S130, after determining that the blue tooth earphone is in the audio playing state before being disconnected, the present embodiment further includes the following steps: further judging whether the Bluetooth playing device is in a service state of the music player before disconnection, if yes, sending a playing command, otherwise, not sending the playing command.
In one embodiment of the present application, further determining whether the bluetooth playing device is in a service state of the music player before disconnection includes:
detecting whether the Bluetooth playing device generates an A2DP audio stream after restarting to establish Bluetooth connection, if the A2DP audio stream does not generate, judging that the Bluetooth playing device is in a service state of a music player before disconnection, and if the A2DP audio stream generates, judging that the Bluetooth playing device is in a service state of a non-music player before disconnection.
Because the Bluetooth playing device is restarted to be connected back after being disconnected in the prior video or game scene, the A2DP service can be re-established, so that the Bluetooth playing device generates an A2DP audio stream, and whether the Bluetooth playing device is in a service state of a music player for simply playing music before being disconnected can be judged by detecting whether the Bluetooth playing device A2DP audio stream is connected back or not, thereby avoiding the situation that the music playing is triggered by mistake due to the fact that a playing command is sent, and affecting the video watching and game experience of a user.
In an embodiment of the present application, in the step 110, setting and saving the value of the status flag according to the working state of the bluetooth playing device includes: when the Bluetooth playing device plays the sound, the sound playing time is timed, if the playing time exceeds the preset duration, the state flag bit is set, and when the sound playing is stopped, the state flag bit is reset. According to the sound playing duration, the working state of the Bluetooth playing device is judged, so that the fact that prompt tones such as short messages, apps (Application programs) and the like are mistakenly considered to be music playing can be avoided.
In one embodiment of the present application, the status flag is an A2DP flag newly written into the bluetooth playing device, and the A2DP flag is not reset in the process of restarting without power failure, so that the status flag can be used continuously after abnormal restarting.
Fig. 2 shows a workflow of restarting a bluetooth playback apparatus according to an embodiment of the present application, where the bluetooth playback device is a bluetooth headset.
As shown in the left side of fig. 2, in the normal playing state, the status flag bit A2DP bootmode is set according to the duration of playing sound, when the playing duration exceeds the preset duration (for example, 2 seconds), it is determined that music playing exists at this time, the flag bit of the A2DP bootmode is set, and if the playing duration does not exceed the preset duration (for example, 2 seconds), the flag bit of the A2DP bootmode is reset when the playing of the sound is stopped. The A2DP bootmode flag bit is restarted without resetting, so that the Bluetooth headset can be reserved for use after restarting when the Bluetooth headset is abnormally restarted.
As shown in the right side of fig. 2, after the earphone is restarted and connected back, it is first determined whether the A2DP bootmode flag bit is in a set state. If not, the earphone is considered to play no audio before being disconnected, and processing is not needed. If yes, continuing to judge whether the A2DP audio stream exists after the earphone is connected back. If yes, the earphone is indicated to be in a non-music player service before disconnection, for example, in a service such as a video service, a game service and the like, at this time, recovery control of music playing is not needed, if no A2DP audio stream exists after the earphone is connected back, the earphone is indicated to be in a music player service before disconnection, at this time, a playing command is sent, and an accurate music continuous playing function can be achieved.
By integrating the description of fig. 2, the embodiment realizes the reply of the music playing service after the bluetooth playing device is restarted and is connected, and filters the interference of short-time sound playing such as prompt tone and the interference of multimedia services such as video, games and the like, thereby obviously improving the user experience.
The application also discloses a Bluetooth playing device.
Fig. 3 is a schematic diagram illustrating a restarting and reconnecting operation process of a bluetooth playing device according to an embodiment of the present application, as shown in fig. 3, the bluetooth playing device 300 includes:
the status flag unit 310 is configured to set and store a value of a status flag bit according to an operating status of the bluetooth playing device.
The state detecting unit 320 is configured to detect the stored state flag bit after the bluetooth playing device restarts to establish the bluetooth connection, so as to determine the working state of the bluetooth playing device before disconnection.
And the play control unit 330 is configured to send a play command to enable the bluetooth playing device to continue playing the previous audio when it is determined that the bluetooth playing device is in the audio playing state before being disconnected.
In one embodiment of the present application, the play command sent by the play control unit 330 is an AVRCP play command, or the play command sent by the play control unit 330 may be a custom play command of another type.
In one embodiment of the present application, the bluetooth playing device further includes: the service detection unit is configured to further determine, before the play control unit 330 sends the play command, whether the bluetooth playing device is in a service state of the music player before disconnection, if yes, the play control unit 330 sends the play command, otherwise, the play control unit 330 does not send the play command any more.
In an embodiment of the present application, the service detection unit is configured to detect whether an A2DP audio stream appears after the bluetooth playing device is restarted to establish the bluetooth connection, if the A2DP audio stream does not appear, determine that the bluetooth playing device is in a service state of the music player before disconnection, and if the A2DP audio stream appears, determine that the bluetooth playing device is in a service state of the non-music player before disconnection.
In one embodiment of the present application, the status flag unit 310 is configured to count a sound playing time when the bluetooth playing device plays a sound, set a status flag bit if the playing time exceeds a preset duration, and reset the status flag bit when the sound playing is stopped.
In one embodiment of the present application, the status flag unit 310 is further configured to set an A2DP flag bit as a flag bit in the bluetooth playback device.
The application also provides an electronic device comprising: a processor; and a memory arranged to store computer executable instructions that when executed cause the processor to perform any of the bluetooth playback devices restart the method of reconnecting as described above.
Fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present application. Referring to fig. 4, at the hardware level, the electronic device includes a processor, and optionally an internal bus, a network interface, and a memory. The Memory may include a Memory, such as a Random-Access Memory (RAM), and may further include a non-volatile Memory (non-volatile Memory), such as at least 1 disk Memory. Of course, the electronic device may also include hardware required for other services.
The processor, network interface, and memory may be interconnected by an internal bus, which may be an ISA (Industry Standard Architecture ) bus, a PCI (Peripheral Component Interconnect, peripheral component interconnect standard) bus, or EISA (Extended Industry Standard Architecture ) bus, among others. The buses may be divided into address buses, data buses, control buses, etc. For ease of illustration, only one bi-directional arrow is shown in FIG. 4, but not only one bus or type of bus.
And the memory is used for storing programs. In particular, the program may include program code including computer-operating instructions. The memory may include memory and non-volatile storage and provide instructions and data to the processor.
The processor reads the corresponding computer program from the nonvolatile memory into the memory and then runs, and the object detection device is formed on the logic level. The processor is used for executing the programs stored in the memory and is specifically used for executing the following operations: setting and storing the numerical value of a state zone bit according to the working state of the Bluetooth playing device; after the Bluetooth playing device restarts to establish Bluetooth connection, the stored state flag bit is detected to judge the working state of the Bluetooth playing device before disconnection; if the blue tooth earphone is judged to be in the audio playing state before being disconnected, a playing command is sent, so that the Bluetooth playing device continues to play the previous audio.
The method for restarting the bluetooth playing device according to the embodiment of the present application may be applied to the processor or implemented by the processor. The processor may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware in a processor or by instructions in the form of software. The processor may be a general-purpose processor, including a central processing unit (Central Processing Unit, CPU), a network processor (Network Processor, NP), etc.; but also digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), field programmable gate arrays (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. The disclosed methods, steps, and logic blocks in the embodiments of the present application may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of a method disclosed in connection with the embodiments of the present application may be embodied directly in hardware, in a decoded processor, or in a combination of hardware and software modules in a decoded processor. The software modules may be located in a random access memory, flash memory, read only memory, programmable read only memory, or electrically erasable programmable memory, registers, etc. as well known in the art. The storage medium is located in a memory, and the processor reads the information in the memory and, in combination with its hardware, performs the steps of the above method.
The embodiments of the present application also provide a computer readable storage medium storing one or more programs, where the one or more programs include instructions, which when executed by an electronic device including a plurality of application programs, enable the electronic device to execute the method for restarting a bluetooth playback apparatus in the above-described embodiment, and specifically are configured to perform: setting and storing the numerical value of a state zone bit according to the working state of the Bluetooth playing device; after the Bluetooth playing device restarts to establish Bluetooth connection, the stored state flag bit is detected to judge the working state of the Bluetooth playing device before disconnection; if the blue tooth earphone is judged to be in the audio playing state before being disconnected, a playing command is sent, so that the Bluetooth playing device continues to play the previous audio.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In one typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include volatile memory in a computer-readable medium, random Access Memory (RAM) and/or nonvolatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of computer-readable media.
Computer readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of storage media for a computer include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium, which can be used to store information that can be accessed by a computing device. Computer-readable media, as defined herein, does not include transitory computer-readable media (transmission media), such as modulated data signals and carrier waves.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article or apparatus that comprises the element.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The foregoing is merely a specific embodiment of the invention and other modifications and variations can be made by those skilled in the art in light of the above teachings. It is to be understood by persons skilled in the art that the foregoing detailed description is provided for the purpose of illustrating the invention more fully, and that the scope of the invention is defined by the appended claims.
Claims (5)
1. A method for restarting a bluetooth playback device, the method comprising:
setting and storing the numerical value of a state zone bit according to the working state of the Bluetooth playing device, wherein the state zone bit does not disappear in the restarting process, and the state zone bit is an A2DP zone bit newly written into the Bluetooth playing device;
after the Bluetooth playing device restarts to establish Bluetooth connection, the stored state flag bit is detected to judge the working state of the Bluetooth playing device before disconnection;
if the Bluetooth playing device is in the audio playing state before disconnection, sending a playing command to a source equipment end connected back to the Bluetooth playing device, so that the Bluetooth playing device continues to play the previous audio;
after judging that the Bluetooth playing device is in the audio playing state before being disconnected and before sending the playing command, the method further comprises the following steps:
further judging whether the Bluetooth playing device is in a service state of the music player before disconnection, if yes, sending a playing command, otherwise, not sending the playing command;
the further judging whether the Bluetooth playing device is in a service state of the music player before disconnection comprises the following steps:
detecting whether the Bluetooth playing device generates an A2DP audio stream after restarting to establish Bluetooth connection, if the A2DP audio stream does not generate, judging that the Bluetooth playing device is in a service state of a music player before disconnection, and if the A2DP audio stream generates, judging that the Bluetooth playing device is in a service state of a non-music player before disconnection.
2. The method for restarting a bluetooth playback device according to claim 1, wherein the setting and storing the value of the status flag according to the working status of the bluetooth playback device includes:
when the Bluetooth playing device plays the sound, the sound playing time is timed, if the playing time exceeds the preset time length, the state zone bit is set, and when the sound playing is stopped, the state zone bit is reset.
3. A bluetooth playback device, the bluetooth playback device comprising:
the state flag unit is used for setting and storing the numerical value of a state flag bit according to the working state of the Bluetooth playing device, wherein the state flag bit does not disappear in the restarting process, and the state flag bit is an A2DP flag bit newly written into the Bluetooth playing device;
the state detection unit is used for detecting the stored state marker bit after the Bluetooth playing device is restarted to establish Bluetooth connection so as to judge the working state of the Bluetooth playing device before disconnection;
the playing control unit is used for sending a playing command to a source equipment end connected back with the Bluetooth playing device when judging that the Bluetooth playing device is in an audio playing state before disconnection, so that the Bluetooth playing device can continue playing the previous audio;
the service detection unit is used for further judging whether the Bluetooth playing device is in a service state of the music player before the Bluetooth playing device is disconnected after the state detection unit judges that the Bluetooth playing device is in an audio playing state before the Bluetooth playing device is disconnected, if yes, the playing control unit sends the playing command, and if not, the playing control unit does not send the playing command any more;
the service detection unit is used for detecting whether the Bluetooth playing device generates an A2DP audio stream after restarting to establish Bluetooth connection, if the A2DP audio stream does not generate, judging that the Bluetooth playing device is in a service state of a music player before disconnection, and if the A2DP audio stream generates, judging that the Bluetooth playing device is in a service state of a non-music player before disconnection.
4. The bluetooth playback device as claimed in claim 3, wherein the status flag unit is configured to count a playback time of the sound when the bluetooth playback device plays the sound, set the status flag if the playback time exceeds a preset duration, and reset the status flag when the sound playback is stopped.
5. An electronic device, comprising:
a processor; and
a memory arranged to store computer executable instructions which when executed cause the processor to perform the bluetooth playback device restart loop method of any one of claims 1-2.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110260533.3A CN113179505B (en) | 2021-03-10 | 2021-03-10 | Bluetooth playing device restarting and reconnecting method, bluetooth playing device and electronic equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110260533.3A CN113179505B (en) | 2021-03-10 | 2021-03-10 | Bluetooth playing device restarting and reconnecting method, bluetooth playing device and electronic equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113179505A CN113179505A (en) | 2021-07-27 |
CN113179505B true CN113179505B (en) | 2023-04-28 |
Family
ID=76921889
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110260533.3A Active CN113179505B (en) | 2021-03-10 | 2021-03-10 | Bluetooth playing device restarting and reconnecting method, bluetooth playing device and electronic equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113179505B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114019808A (en) * | 2021-10-14 | 2022-02-08 | 江门市征极光兆科技有限公司 | Electronic equipment and control method of starting state thereof |
CN115086828B (en) * | 2022-08-23 | 2022-12-27 | 荣耀终端有限公司 | Earphone control method and related device |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101246417A (en) * | 2007-02-13 | 2008-08-20 | 艾威梯软件技术(北京)有限公司 | Method and system for non-intermittence software switch of audio data flow input/output |
CN108650668A (en) * | 2018-05-17 | 2018-10-12 | 歌尔科技有限公司 | Connection request processing method, bluetooth headset, wearable device and system |
Family Cites Families (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2004128673A (en) * | 2002-09-30 | 2004-04-22 | Toshiba Corp | Electronic apparatus and method for reproducing content |
JP4645709B2 (en) * | 2008-09-12 | 2011-03-09 | 株式会社デンソー | Streaming data playback device with short-range wireless communication function |
US8588849B2 (en) * | 2010-07-09 | 2013-11-19 | Blackberry Limited | System and method for resuming media |
WO2014047853A1 (en) * | 2012-09-27 | 2014-04-03 | 华为终端有限公司 | Bluetooth device connection method and device |
CN112368987B (en) * | 2018-06-30 | 2021-12-28 | 华为技术有限公司 | Media playing method and playing equipment |
CN208609151U (en) * | 2018-07-09 | 2019-03-15 | 深圳市亚昱科技有限公司 | A kind of bluetooth headset of included local playing function |
CN109379730A (en) * | 2018-10-11 | 2019-02-22 | 国网四川省电力公司电力科学研究院 | A kind of blue-teeth data exchange method and bluetooth equipment |
CN109547860A (en) * | 2018-12-07 | 2019-03-29 | 晶晨半导体(上海)股份有限公司 | A kind of method and IPTV playing device of the video suspension continued broadcasting of program request |
CN110856152A (en) * | 2019-10-28 | 2020-02-28 | 宇龙计算机通信科技(深圳)有限公司 | Method, device, electronic equipment and medium for playing audio data |
CN111787513B (en) * | 2020-06-11 | 2022-08-19 | 三星电子(中国)研发中心 | Method and apparatus for playing audio |
-
2021
- 2021-03-10 CN CN202110260533.3A patent/CN113179505B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101246417A (en) * | 2007-02-13 | 2008-08-20 | 艾威梯软件技术(北京)有限公司 | Method and system for non-intermittence software switch of audio data flow input/output |
CN108650668A (en) * | 2018-05-17 | 2018-10-12 | 歌尔科技有限公司 | Connection request processing method, bluetooth headset, wearable device and system |
Also Published As
Publication number | Publication date |
---|---|
CN113179505A (en) | 2021-07-27 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN113179505B (en) | Bluetooth playing device restarting and reconnecting method, bluetooth playing device and electronic equipment | |
CN108509176B (en) | Method and device for playing audio data, storage medium and intelligent terminal | |
CN112203206B (en) | Microphone hole blockage detection method and related product | |
CN102932549A (en) | Mobile terminal and method for accessing application programs rapidly through earphones | |
WO2019052474A1 (en) | Audio system management method, apparatus and device, and storage medium | |
US20220353627A1 (en) | Wireless earphone synchronization detection method, apparatus, wireless earphones and storage medium | |
CN111343558B (en) | Microphone hole blockage detection method and related product | |
CN110087215B (en) | Information broadcasting method and device based on Bluetooth connection, terminal and storage medium | |
CN109376062B (en) | Network state prompting method and related device | |
CN109120779B (en) | Microphone blockage reminding method and related device | |
WO2017166685A1 (en) | Method and apparatus for switching to external loudspeaker | |
CN104166591A (en) | Method and device for avoiding forced interruption of game | |
CN105679350A (en) | Audio playing method and device | |
CN112068794A (en) | Audio mixing control method, device, electronic device and storage medium | |
CN113050910A (en) | Voice interaction method, device, equipment and storage medium | |
CN108260065B (en) | Television loudspeaker playing function online detection method and device | |
CN106507160A (en) | A kind of based on the multimedia application control method for playing back of remote Bluetooth devices, system | |
CN103731457A (en) | Service processing method and terminal | |
CN107566215B (en) | Wireless network cutout detection method, device, storage medium and mobile terminal | |
CN116074679A (en) | Method, device, equipment and storage medium for determining left and right states of intelligent earphone | |
CN102789795B (en) | Method and system used for playing vehicle-mounted compact disc and based on Android operating system | |
US10812894B2 (en) | Portable communication device and method of operating the same in covert operation mode | |
CN109196912A (en) | Access control method for limiting and device | |
CN112948003B (en) | Method and equipment for switching operating systems of dual-android terminal | |
JP2020528712A (en) | Audio playback method and terminal, storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |