Display method, electronic device and computer storage medium
By displaying playback control cards and controls on electronic devices, and differentiating the display format according to audio type, the problem of users being unable to quickly locate and control the sound output of background applications is solved, thus improving the user experience.
Patent Information
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- HUAWEI TECH CO LTD
- Filing Date
- 2025-10-29
- Publication Date
- 2026-05-07
AI Technical Summary
Users are unable to quickly locate and control the sounds emitted by background applications, which may lead to the accidental deletion of other application processes and negatively impact the user experience.
Electronic devices display control cards and controls, differentiate the display format according to audio type, and provide operation options. Users can quickly identify and control background audio through the controls.
It improves the efficiency of users in recognizing and controlling background audio, saves display area, and enhances the user experience.
Smart Images

Figure CN2025130887_07052026_PF_FP_ABST
Abstract
Description
Display method, electronic device and computer storage medium
[0001] The present application claims priority to the Chinese patent application No. 202411555915.9, filed on November 01, 2024, with the State Intellectual Property Office of China, and entitled "Display method, electronic device and computer storage medium", the whole content of which is incorporated herein by reference. TECHNICAL FIELD
[0002] The present application relates to the technical field of terminal, and in particular to a display method, an electronic device and a computer storage medium. BACKGROUND
[0003] With the development of terminal technology, the number of applications installed on electronic devices is increasing, and users can play videos, navigate, play music, and play e-books through the applications installed on electronic devices, which greatly improves the user experience.
[0004] An application can make a sound in the foreground or in the background. When the application makes a sound in the background, if there are multiple applications running in the background, the user cannot perceive which application is making a sound, and if the user needs to pause the application making a sound, the process of multiple applications needs to be cleared to make the application stop making a sound. However, this will mistakenly clear the processes of other applications. How to quickly locate the application making a sound in the background needs further research. SUMMARY
[0005] The present application provides a display method, an electronic device and a computer storage medium. The electronic device can display different identifiers to indicate different audio played by applications in the background, improving the display effect of the electronic device.
[0006] In a first aspect, the present application provides a display method, which includes: an electronic device playing a first audio in a first application; the electronic device receiving a first operation of a user; in response to the first operation, the first application is switched from the foreground to the background, and when the first application runs in the background, the electronic device continues to play the first audio; after the first application runs in the background, the electronic device displays a first interface, the first interface including a first control and a first broadcast control card, the first control being used to indicate that the first audio is played in the background, and the first broadcast control card being used to display a second audio played by a second application.
[0007] The first broadcast control card and the first control are both used to indicate that the first audio and the second audio are played in the background.
[0008] Through the method, the electronic device can display different identifiers to indicate different audio played by applications in the background, improving the display effect of the electronic device.
[0009] For example, the first application can be a map application, the first audio can be navigation route information, and the first control can be the control 4101 shown in FIGS. 5C-5E.
[0010] For example, the second application can be a music application, the second audio can be music, and the first control card can be the control card 3101 or the control card 3102 shown in FIGS. 5C-5E.
[0011] With reference to the first aspect, in a possible implementation, the electronic device includes an audio-video control service module; before the electronic device displays the first interface, the method further includes: the audio-video control service module acquires audio information of the first audio and audio information of the second audio; and the electronic device displays the first interface, specifically including: the audio-video control service module displays the first control card and the first control in the first interface according to the audio information of the first audio and the audio information of the second audio.
[0012] Optionally, the audio information of the first audio can be sent to the audio-video control service module when the first application is started or when the first audio is played. The audio information of the second audio can also be sent to the audio-video control service module when the second application is started or when the second audio is played.
[0013] With reference to the first aspect, in a possible implementation, the audio information of the first audio includes an audio type of the first audio, and the audio information of the second audio includes an audio type of the second audio and playback control information of the second audio; wherein the audio type of the first audio is a second type of audio, the audio type of the second audio is a first type of audio, and the playback control information of the second audio includes any one or more of: pause / play options information, and switch to play other audio options information.
[0014] In the case where the first audio is the second type of audio, the audio information of the first audio can include the second type of audio. Optionally, the audio information of the first audio can further include an identifier of the first application.
[0015] In the case where the second audio is the first type of audio, the audio information of the second audio can include the first type of audio and playback control information of the second audio. Optionally, the audio information of the second audio can further include an identifier of the first application, an audio name, audio content, an audio total duration, and an audio playback progress. The playback control information of the second audio can include pause / play options information and switch to play other audio options information.
[0016] With reference to the first aspect, in a possible implementation, when the electronic device displays the first control card, the electronic device is playing the second audio or has stopped playing the second audio.
[0017] In conjunction with the first aspect, in one possible implementation, the first playback control card includes options for controlling the audio played by the first application. These options may include any one or more of the following: pause / resume playback options, switch to play other audio options.
[0018] Optionally, the electronic device displays options for controlling the audio played by the first application in the first playback control card based on the playback control information of the second audio.
[0019] Optionally, if playback control information for the second audio is not obtained, in one possible implementation, the electronic device may not display the option for controlling the audio playback of the first application in the first playback control card. In other possible implementations, the electronic device may display the first control.
[0020] In this way, for the second audio of the first type of audio, the electronic device can display options in the first playback control card for controlling the audio played by the first application. The user can control the audio of the first type of audio played by the first application based on these options, such as switching to playing other audio of the first type of audio, pausing the playback of the second audio of the first type of audio, etc.
[0021] For example, the options for controlling the audio played by the first application may be options such as switching to play the previous / next audio track, pausing playback of the second audio track, and adjusting the volume, as shown in the playback control card 3101 or playback control card 3102.
[0022] In conjunction with the first aspect, in one possible implementation, the first interface includes a control center interface, or a volume adjustment interface, or a message notification interface, or a lock screen interface.
[0023] For example, the control center interface can be the interface shown in Figures 3D, 4D-4I, and 5A-5C.
[0024] For example, the volume control interface can be the interface shown in Figure 4J.
[0025] For example, the message notification interface can be the interface shown in Figure 3G, Figure 4L, and Figure 5E.
[0026] For example, the lock screen interface can be the interface shown in Figure 3F, Figure 4K, and Figure 5D.
[0027] In conjunction with the first aspect, in one possible implementation, the first type of audio includes any of the following: music audio, video audio, and e-book audio; the second type of audio includes any of the following: navigation audio, live broadcast audio, call audio, news playback audio, and game audio.
[0028] In conjunction with the first aspect, in one possible implementation, after the electronic device displays the first control, the method further includes: the electronic device receiving a second operation from the user on the first control, and in response to the second operation, the electronic device displaying an identifier of the first application.
[0029] In this way, users can use the first control to see which application is playing the second type of audio in the background.
[0030] For example, the second operation on the first control could be an input operation on control 4101 as shown in Figure 4D. The identifier of the first application could be the icon of the map application shown in Figure 4E.
[0031] In conjunction with the first aspect, in one possible implementation, the method further includes: after receiving the second operation, the electronic device displays a first option of the first application; the electronic device receives a third operation from the user regarding the first option; and in response to the third operation, the electronic device stops playing the first audio.
[0032] In this way, users can control the first application to stop playing the first audio in the background through the first option.
[0033] For example, the first option could be option 4104 as shown in Figure 8D.
[0034] For example, the first option could also be option 4103 as shown in Figure 8F.
[0035] In conjunction with the first aspect, in one possible implementation, the method further includes: in response to a third operation, the electronic device closes the process of the first application.
[0036] In this way, the user can close the process of the first application running in the background using the first option. After closing the process of the first application, the first application will stop playing the first audio in the background.
[0037] For example, the third operation for the first option can be the input operation for option 4103 shown in FIG8F.
[0038] In conjunction with the first aspect, in one possible implementation, the method further includes: after the electronic device stops playing the first audio, the electronic device stops displaying the first control.
[0039] Thus, after the electronic device stops playing the first audio, the electronic device stops displaying the first control to indicate that the first application is not playing the second type of audio in the background.
[0040] In conjunction with the first aspect, in one possible implementation, the method further includes: after the electronic device stops playing the first audio, the electronic device receives a fourth operation; in response to the fourth operation, the first application switches from the background to the foreground; while the first application is running in the foreground, the electronic device continues to play the first audio.
[0041] In this way, after the first application stops playing the first audio in the background, the electronic device can receive user input to bring the first application to the foreground. When the first application is running in the foreground, the electronic device can continue playing the first audio.
[0042] Optionally, when the first application is running in the foreground, the electronic device can automatically play the first audio.
[0043] Optionally, when the first application is running in the foreground, the electronic device can automatically play the first audio after receiving a user action.
[0044] In conjunction with the first aspect, in one possible implementation, the method further includes: the electronic device receiving a fifth operation from a user regarding an identifier of the first application, and in response to the fifth operation, the electronic device displaying a second interface of the first application.
[0045] In conjunction with the first aspect, in one possible implementation, the second interface is the homepage of the first application, or the second interface is an interface related to the second audio in the first application, or the second interface is an interface displayed in the foreground before the first application switches to background operation.
[0046] In this way, users can quickly display the second interface of the first application on their electronic devices by using the identifier of the first application, saving users time and effort.
[0047] For example, the identifier of the first application could be the identifier of the map application shown in Figure 10A. The second interface of the first application could be the navigation interface shown in Figure 10B.
[0048] In conjunction with the first aspect, in one possible implementation, after the electronic device displays the first interface, the method further includes: the electronic device playing a third audio in a third application; the electronic device receiving a sixth operation from the user; in response to the sixth operation, the third application switching from foreground to background operation; the electronic device receiving a seventh operation from the user on the first control; and in response to the seventh operation, the electronic device displaying the identifiers of the first application and the third application.
[0049] In this way, when an electronic device allows multiple applications to play audio of the second type of audio in the background, the electronic device can display the identifiers of those multiple applications to indicate to the user which applications are playing the second type of audio in the background.
[0050] For example, the identifier of the first application may be the icon of the map application shown in Figure 4H, and the identifier of the third application may be the icon of the instant messaging application shown in Figure 4H.
[0051] In a second aspect, this application provides an electronic device, which includes a memory and a processor, wherein the memory is used to store a computer program; and the processor is used to invoke the computer program to cause the electronic device to perform the method as described in any of the first aspects.
[0052] Thirdly, this application provides an apparatus comprising a unit or module for performing any of the methods in the first aspect, or a unit or module for performing any of the methods in the first aspect.
[0053] Fourthly, this application provides a readable storage medium storing a program or instructions that, when executed on a device, cause an electronic device to perform any of the methods described in the first aspect.
[0054] Fifthly, this application provides a chip system including one or more processors, which are used to invoke computer instructions to cause an electronic device to perform any of the methods in the first aspect.
[0055] In a sixth aspect, this application provides a program product comprising computer instructions that, when executed on an electronic device, cause the electronic device to perform any of the methods in the first aspect.
[0056] For a description of the beneficial effects in aspects two through six, please refer to the description of the beneficial effects in aspect one; this application will not repeat them here. Attached Figure Description
[0057] Figure 1 shows a schematic diagram of the hardware structure of an electronic device 100 provided in this application;
[0058] Figure 2 shows a schematic diagram of the software structure of an electronic device 100 provided in this application;
[0059] Figures 3A-3G illustrate schematic diagrams of the electronic device 100 displaying the playback control card of the first application when the first application is running in the background and making a sound.
[0060] Figures 4A-4L illustrate schematic diagrams of the electronic device 100 displaying the first control when the first application is running in the background and making a sound;
[0061] Figures 5A-5E show schematic diagrams of an electronic device 100 simultaneously displaying a playback card of a first application and a first control;
[0062] Figure 6 shows a schematic diagram of the process of the first application playing audio after it is started;
[0063] Figure 7 illustrates the process of the first application continuing to play audio after switching to background operation;
[0064] Figures 8A-8G illustrate schematic diagrams showing how electronic device 100 can control a first application to stop playing audio in the background;
[0065] Figure 9 shows a schematic diagram of the process by which electronic device 100 controls the first application to stop playing audio in the background;
[0066] Figures 10A-10B illustrate schematic diagrams of an electronic device 100 displaying a user interface in a first application in response to a user's operation of an identifier for the first application.
[0067] Figure 11 shows a flowchart of an electronic device 100 displaying a user interface in a first application in response to a user's operation on an identifier of a first application.
[0068] Figure 12 is a schematic diagram of the method flow of a display method provided in this application. Detailed Implementation
[0069] The technical solutions of the embodiments of this application are described below with reference to the accompanying drawings. In the description of the embodiments of this application, the terminology used in the following embodiments is for the purpose of describing specific embodiments only and is not intended to limit the application. As used in the specification and appended claims of this application, the singular expressions "a," "the," "the," "the," and "this" are intended to also include expressions such as "one or more," unless the context clearly indicates otherwise. It should also be understood that in the following embodiments of this application, "at least one" and "one or more" refer to one or more (including two). The term "and / or" is used to describe the relationship between related objects, indicating that three relationships can exist; for example, A and / or B can represent: A alone, A and B simultaneously, or B alone, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship.
[0070] References to "one embodiment" or "some embodiments" in this specification mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized. The term "connection" includes direct connections and indirect connections, unless otherwise stated. "First" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated.
[0071] In the embodiments of this application, the words "exemplarily" or "for example" are used to indicate examples, illustrations, or explanations. Any embodiment or design described as "exemplarily" or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design solutions. Specifically, the use of the words "exemplarily" or "for example" is intended to present the relevant concepts in a specific manner.
[0072] An application can emit sound in the foreground or in the background. When an application emits sound in the background, if multiple applications are running in the background, the user cannot tell which application is emitting the sound.
[0073] When an application is running in the background, if it needs to continue making sounds in the background, it must register with the device's control center. If an application is not registered with the control center, it cannot make sounds in the background. After an application is registered with the control center, the device can display the application's control card, allowing users to identify the application making sounds in the background.
[0074] However, the above solution has the following drawbacks:
[0075] Defect 1: If the application is not connected to the broadcast control center, the application cannot make sounds in the background.
[0076] Second, if multiple applications are playing audio in the background simultaneously, and all of these applications are registered with the electronic device's playback control center, the electronic device can display the playback control cards for all of these applications at the same time. However, if some applications are playing audio that the user cannot control, even if the electronic device displays the playback control card for that application, the user cannot control the audio played by that application through that playback control card. This not only occupies display space on the electronic device but also affects the user experience.
[0077] Based on the above analysis, this application provides a display method in which, when the first application is running in the background, if the first application needs to continue to play sound in the background, the electronic device 100 can obtain the audio type of the first audio played by the first application.
[0078] If the audio type of the first audio is a first type of audio, the electronic device 100 can display a playback control card for the first application. The playback control card displays information about the audio being played by the first application, options for controlling the audio being played by the first application, and one or more other types of information. The information about the audio being played by the first application may include, but is not limited to, any one or more of the following: the identifier of the first application, the audio name, the audio content, the total audio duration, and the audio playback progress. The options for controlling the audio being played by the first application may include, but are not limited to, any one or more of the following: pause / resume playback options, and options to switch to playing other audio.
[0079] If the audio type of the first audio is the second type of audio, the electronic device 100 can display the first control, and the second type of audio is different from the first type of audio.
[0080] Among them, the first application's broadcast control card and the first control are both used to instruct the first application to make sound in the background.
[0081] Optionally, the electronic device 100 may display the playback control card or the first control of the first application in the control center of the electronic device 100. This application does not limit the location where the electronic device 100 displays the playback control card or the first control of the first application; the electronic device 100 may also display the playback control card or the first control of the first application in the negative one screen, the pull-down notification bar, the lock screen, or other locations.
[0082] The first type of audio may include, but is not limited to, any of the following: music audio, video audio, e-book audio, etc.
[0083] The second type of audio may include, but is not limited to, any of the following: navigation audio, live audio, call audio, news playback audio, etc.
[0084] Using this method, the electronic device 100 can identify background audio applications using different display formats based on audio type. For the first type of audio, the electronic device 100 can display a playback control card, allowing the user to control the application's playback of the first type of audio. For the second type of audio, the electronic device 100 can simply display the first control, saving display space and preventing situations where the user cannot control the application's playback of the second type of audio via the playback control card.
[0085] Optionally, after the electronic device 100 displays the first control, the electronic device 100 can receive user operations on the first control, the electronic device 100 can display the identifier of the first application, the electronic device 100 can receive user operations on the identifier of the first application, and the electronic device 100 can jump to the first user interface displaying the first application. The first user interface can be the default user interface, the user interface that the first application was last displayed in the foreground, or the user interface that contains the audio information played by the first application.
[0086] Optionally, if the first application switches to the foreground, the electronic device 100 may stop displaying the first application's playback control card or first control.
[0087] Optionally, it is not limited to determining whether to display the first application's playback control card or first control based on the audio type played by the first application, but it is also possible to determine whether to display the first application's playback control card or first control based on the application type of the first application.
[0088] For example, if the first application is a first type of application, the electronic device 100 can display the playback control card of the first application. If the first application is a second type of application, the electronic device 100 can display the first control.
[0089] The first type of application includes any one of the following: music applications, video applications, and e-book applications.
[0090] The second type of application includes any of the following: navigation applications, live streaming applications, call applications, and news playback applications.
[0091] For example, the first type of application and the second type of application can be classified based on the type of the application itself.
[0092] For example, media applications and non-media applications can also be categorized based on the type of audio they play. For instance, applications capable of playing music, video, and recordings (type 1 audio) can be classified as type 1 applications. Applications capable of playing video audio, navigation audio, call audio, and live audio (type 2 audio) can be classified as type 2 applications.
[0093] For example, media applications and non-media applications can also be categorized based on the type of audio files they play. For instance, an application capable of playing audio from pre-downloaded and cached audio files or from real-time downloaded and cached audio files could be classified as Type 1 audio applications. An application capable of playing audio from real-time downloaded audio files could be classified as Type 2 applications.
[0094] It should be noted that the first type of application and the second type of application can also be classified based on other factors, which are not limited in this application.
[0095] Figure 1 shows a schematic diagram of the hardware structure of an electronic device 100 provided in this application.
[0096] Electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, antenna 1, antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a sensor module 180, a display screen 194, a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include one or more sensors, such as a gyroscope sensor, a magnetic sensor, an accelerometer, a distance sensor, a touch sensor, etc. In some embodiments, the sensor module 180 may also include one or more of the following sensors: a pressure sensor, a barometric pressure sensor, a proximity sensor, a fingerprint sensor, a temperature sensor, an ambient light sensor, a bone conduction sensor, etc.
[0097] It is understood that the structures illustrated in the embodiments of this application do not constitute a specific limitation on the electronic device 100. In other embodiments of this application, the electronic device 100 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0098] Processor 110 may include one or more processing units, such as application processor (AP), modem processor, graphics processing unit (GPU), image signal processor (ISP), controller, video codec, digital signal processor (DSP), baseband processor, and / or neural network processing unit (NPU). These different processing units may be independent devices or integrated into one or more processors.
[0099] The controller can generate operation control signals based on the instruction opcode and timing signals to complete the control of instruction fetching and execution.
[0100] The processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. This memory can store instructions or data that the processor 110 has just used or that are used repeatedly. If the processor 110 needs to use the instruction or data again, it can directly retrieve it from the memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the system. In some embodiments, the processor 110 may include one or more interfaces, such as a universal serial bus (USB) interface.
[0101] USB port 130 is a USB standard compliant interface, specifically a Mini USB port, Micro USB port, or USB Type-C port. USB port 130 can be used to connect a charger to charge electronic device 100, and can also be used for data transfer between electronic device 100 and peripheral devices. It can also be used to connect headphones for audio playback. This interface can also be used to connect other electronic devices, such as AR devices.
[0102] The charging management module 140 receives charging input from a charger. The charger can be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 receives charging input from the wired charger via the USB interface 130. In some wireless charging embodiments, the charging management module 140 receives wireless charging input via the wireless charging coil of the electronic device 100. While charging the battery 142, the charging management module 140 can also supply power to the electronic device via the power management module 141.
[0103] The power management module 141 connects the battery 142, the charging management module 140, and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140, providing power to the processor 110, internal memory 121, display screen 194, and wireless communication module 160, etc. The power management module 141 can also monitor parameters such as battery capacity, battery cycle count, and battery health status (leakage current, impedance). In some other embodiments, the power management module 141 may also be located within the processor 110. In other embodiments, the power management module 141 and the charging management module 140 may be located in the same device.
[0104] The wireless communication function of electronic device 100 can be realized through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modem processor and baseband processor, etc.
[0105] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 can be used to cover one or more communication frequency bands. Different antennas can also be multiplexed to improve antenna utilization. For example, antenna 1 can be multiplexed as a diversity antenna for a wireless local area network. In some other embodiments, the antennas can be used in conjunction with tuning switches.
[0106] The mobile communication module 150 can provide solutions for wireless communication, including 2G / 3G / 4G / 5G, applied to the electronic device 100. The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves via antenna 1, and perform filtering, amplification, and other processing on the received electromagnetic waves before transmitting them to a modem processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modem processor and convert it into electromagnetic waves for radiation via antenna 1. In some embodiments, at least some functional modules of the mobile communication module 150 may be housed in the processor 110. In some embodiments, at least some functional modules of the mobile communication module 150 and at least some modules of the processor 110 may be housed in the same device.
[0107] The wireless communication module 160 can provide solutions for wireless communication applications on the electronic device 100, including wireless local area networks (WLANs) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), and infrared (IR) technologies. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via antenna 2, demodulates and filters the electromagnetic wave signals, and sends the processed signal to processor 110. The wireless communication module 160 can also receive signals to be transmitted from processor 110, frequency modulate and amplify them, and then convert them into electromagnetic waves for radiation via antenna 2.
[0108] In some embodiments, antenna 1 of electronic device 100 is coupled to mobile communication module 150, and antenna 2 is coupled to wireless communication module 160, enabling electronic device 100 to communicate with networks and other devices via wireless communication technology. The wireless communication technology may include Global System for Mobile Communications (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Time-Division Code Division Multiple Access (TD-SCDMA), Long Term Evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technologies, etc. The GNSS may include the Global Positioning System (GPS), the Global Navigation Satellite System (GLONASS), the BeiDou Navigation Satellite System (BDS), the Quasi-Zenith Satellite System (QZSS), and / or satellite-based augmentation systems (SBAS).
[0109] Electronic device 100 implements display functions through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, connected to the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations and for graphics rendering. Processor 110 may include one or more GPUs, which execute program instructions to generate or modify display information.
[0110] Display screen 194 is used to display images, videos, etc. Display screen 194 includes a display panel. The display panel may be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a miniature LED, a microLED, a quantum dot light-emitting diode (QLED), etc. In some embodiments, electronic device 100 may include one or N displays 194, where N is a positive integer greater than 1.
[0111] Internal memory 121 may include one or more random access memory (RAM) and one or more non-volatile memory (NVM).
[0112] The random access memory can be directly read and written by the processor 110. It can be used to store executable programs (such as machine instructions) of the operating system or other running programs, as well as user and application data.
[0113] Non-volatile memory can also store executable programs and user and application data, and can be pre-loaded into random access memory for direct reading and writing by the processor 110.
[0114] The external memory interface 120 can be used to connect to external non-volatile memory, thereby expanding the storage capacity of the electronic device 100. The external non-volatile memory communicates with the processor 110 through the external memory interface 120 to perform data storage functions. For example, music, video, and other files can be stored in the external non-volatile memory.
[0115] Electronic device 100 can implement audio functions, such as making calls and recording, through audio module 170, speaker 170A, receiver 170B, microphone 170C, and application processor.
[0116] The audio module 170 is used to convert digital audio information into analog audio signals for output, and also to convert analog audio input into digital audio signals. The audio module 170 can also be used for encoding and decoding audio signals. In some embodiments, the audio module 170 may be located in the processor 110, or some functional modules of the audio module 170 may be located in the processor 110.
[0117] The speaker 170A, also known as a "loudspeaker," is used to convert audio electrical signals into sound signals. The electronic device 100 can listen to music or make hands-free calls through the speaker 170A.
[0118] The receiver 170B, also known as the "earpiece," is used to convert audio electrical signals into sound signals. When the electronic device 100 answers a telephone call or voice message, the receiver 170B can be brought close to the ear to listen to the voice.
[0119] Microphone 170C, also known as a "microphone" or "voice transducer," is used to convert sound signals into electrical signals. When making a phone call or sending a voice message, the user can speak by bringing their mouth close to microphone 170C, inputting the sound signal into microphone 170C. Electronic device 100 may have at least one microphone 170C. In some embodiments, electronic device 100 may have two microphones 170C, which, in addition to collecting sound signals, can also perform noise reduction. In other embodiments, electronic device 100 may also have three, four, or more microphones 170C, which can collect sound signals, reduce noise, identify the sound source, and perform directional recording, etc.
[0120] A gyroscope sensor can be used to determine the motion attitude of an electronic device 100. In some embodiments, the gyroscope sensor can determine the angular velocity of the electronic device 100 around three axes (i.e., the x, y, and z axes). The gyroscope sensor can be used for image stabilization. For example, when the shutter is pressed, the gyroscope sensor detects the angle of the electronic device 100's movement, calculates the distance the lens module needs to compensate based on the angle, and allows the lens to counteract the movement of the electronic device 100 through reverse motion, thus achieving image stabilization. The gyroscope sensor can also be used in navigation and motion-sensing gaming scenarios.
[0121] The magnetic sensor includes a Hall effect sensor. Electronic device 100 can use the magnetic sensor to detect the opening and closing of the flip cover.
[0122] An accelerometer can detect the magnitude of acceleration of an electronic device 100 in various directions (typically three axes). When the electronic device 100 is stationary, it can detect the magnitude and direction of gravity. It can also be used to identify the posture of the electronic device and is applied to applications such as screen orientation switching and pedometers.
[0123] A distance sensor is used to measure distance. Electronic device 100 can measure distance using infrared or laser. In some embodiments, during a shooting scene, electronic device 100 can utilize the distance sensor to measure distance for rapid focusing.
[0124] A touch sensor, also known as a "touch device," can be located on the display screen 194. The touch sensor and the display screen 194 together form a touchscreen, also known as a "touchscreen." The touch sensor detects touch operations applied to or near it. The touch sensor can then transmit the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 194. In some embodiments, the touch sensor may also be located on the surface of the electronic device 100, in a different position than the display screen 194.
[0125] In some embodiments, the electronic device 100 may further include one or more of buttons, a motor, and an indicator. Buttons may include a power button, volume buttons, etc. Buttons may be mechanical buttons or touch buttons. The electronic device 100 can receive button input and generate key signal inputs related to user settings and function control of the electronic device 100. The motor may generate vibration cues. The indicator may be an indicator light, which can be used to indicate charging status, battery level changes, and can also be used to indicate messages, missed calls, notifications, etc.
[0126] The SIM card interface 195 is used to connect the SIM card.
[0127] Figure 2 shows a schematic diagram of the software structure of an electronic device 100 provided in this application.
[0128] Electronic device 100 may be a device running iOS, Android, Microsoft, or other operating systems. The software system of electronic device 100 may adopt a layered architecture, event-driven architecture, microkernel architecture, microservice architecture, or cloud architecture.
[0129] A layered architecture divides software into several layers, each with a clear role and function. Layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, from top to bottom: the application layer, the application framework layer, the Android runtime and system libraries, and the kernel layer.
[0130] The application layer can include a series of application packages.
[0131] As shown in Figure 2, the application package may include Huawei Music, Huawei Video, Instant Messaging, Map, Calling, Broadcast Control Center, etc.
[0132] The application framework layer provides application programming interfaces (APIs) and a programming framework for applications in the application layer. The application framework layer includes some predefined functions.
[0133] The application framework layer may include an audio service module (audio kit), an audio and video session control service module (audio & video session kit), a background task management module, an application management module, etc.
[0134] The audio service module (audio kit) is used to receive audio files sent by the application and send them to the underlying audio driver. The audio driver can drive the audio playback unit to play the audio file. The audio playback unit may include, but is not limited to, receivers, speakers, etc.
[0135] The audio and video playback control service module manages applications registered with it and stores their information. This information includes, but is not limited to, the application name. If an application is registered with the module, it can continue playing audio while running in the background. If an application is not registered, it cannot play audio while running in the background.
[0136] The audio and video playback control service module is also used to determine whether to display the application's playback control card or the first control when the application is running in the background. Optionally, the electronic device 100 may not include the audio and video playback control service module.
[0137] The background task management module is used to manage applications running in the background. If an application requests a long-running task from the background task management module, the module can keep the application's process running in the background. If an application does not request a long-running task from the background task management module, the module must close the application's process running in the background.
[0138] The application management module is used to monitor the running status of applications, which can include, but is not limited to, foreground or background running status.
[0139] The application management module is also used to send the application's running status to the audio and video playback control service module, so that the audio and video playback control service module can determine whether to display the application's playback control card or the first control based on the application's running status and the type of audio played by the application.
[0140] The application framework layer can also include a media notification management module. This module controls the display of media control cards based on media information in the notification center, lock screen, and AOD (Away From Home) interface. Both the application layer and the application framework layer run in a virtual machine. The virtual machine executes the Java files of the application layer and application framework layer as binary files. The virtual machine is used for managing object lifecycles, stack management, thread management, security and exception management, and garbage collection.
[0141] System libraries can include multiple functional modules. For example: surface manager, media libraries, 3D graphics processing libraries (e.g., OpenGL ES), 2D graphics engines (e.g., SGL), etc.
[0142] The Surface Manager is used to manage the display subsystem and provides the blending of 2D and 3D layers for multiple applications.
[0143] The media library supports playback and recording of various common audio and video formats, as well as still image files. It supports multiple audio and video encoding formats, such as MPEG4, H.264, MP3, AAC, AMR, JPG, and PNG.
[0144] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.
[0145] A 2D graphics engine is a graphics engine for 2D drawing.
[0146] In some embodiments, the media library may also be referred to as the system service layer.
[0147] The kernel layer is the layer between hardware and software. The kernel layer contains at least the display driver, camera driver, audio driver, and sensor driver.
[0148] The hardware layer may include one or more audio playback units, such as receivers, speakers, Bluetooth, etc.
[0149] The following section provides a detailed description of a display method provided in this application, combining UI and process flow.
[0150] When the first application plays the first type of audio, if the first application is playing the first audio in the foreground, and when the first application is moved to the background, if the first application meets the conditions for continuing to play audio in the background, the electronic device 100 can display the application's playback control card. Thus, for the first type of audio, the electronic device 100 can display the application's playback control card to prompt the user about the application running in the background, and the user can also control the application to play the second type of audio through the playback control card.
[0151] When the first application is playing the second type of audio, if the first application is playing the first audio in the foreground, and when the first application is moved to the background, if the conditions for continuing to play audio in the background are met, the electronic device 100 can display the first control. In this way, for the second type of audio, the electronic device 100 can display the first control to prompt the user that it is running in the background, which not only saves display space on the electronic device 100 but also prevents situations where the user cannot control the playback of the second type of audio by using the playback control card.
[0152] 1. When the first application is playing audio in the foreground and then switches to the background, the electronic device 100 can display the playback control card or the first control of the first application.
[0153] Figures 3A-3G show schematic diagrams of the electronic device 100 displaying the playback control card of the first application when the first application is running in the background and making a sound.
[0154] For example, the first application could be a music application.
[0155] For example, as shown in FIG3A, the electronic device 100 displays a desktop, on which a page containing application icons is displayed. This page includes multiple application icons (e.g., settings application icon, app market application icon, gallery application icon, music application icon, etc.). Below the multiple application icons, a page indicator is also displayed to indicate the positional relationship between the currently displayed page and other pages. Below the page indicator, a tray area is displayed. The tray area includes multiple tray icons, such as camera application icon, contacts application icon, phone application icon, and messaging application icon. The tray area remains displayed when switching pages. In some embodiments, the page may also include multiple application icons and a page indicator. The page indicator may not be part of the page and may exist independently. The tray icons are also optional, and this embodiment does not limit this.
[0156] As shown in Figure 3A, the electronic device 100 can receive user input operations on the music application icon, such as a click operation. In response to the user's input operation, the electronic device 100 can display the music playback interface shown in Figure 3B. This music aspect includes the name of the music played by the electronic device 100, "AAA", the total duration of the music played by the electronic device 100, "04:42", the progress of the music played by the electronic device 100, "00:42", and music playback control options, such as options to play the previous song, play the next song, pause playback, download, and share.
[0157] In some embodiments, the electronic device 100 may receive user input to switch the first application to run in the background.
[0158] For example, as shown in FIG3B, the electronic device 100 can receive a swipe operation by the user at the bottom of the display screen, such as an upward swipe operation. In response to the user's swipe operation, the electronic device 100 can display the desktop shown in FIG3C, and the music application is switched to run in the background.
[0159] If the conditions for continuing music playback in the background are met, the music app can continue playing music in the background after switching to background operation. If the conditions for continuing music playback in the background are not met, the music app must stop playing music in the background after switching to background operation.
[0160] Optionally, in addition to the swipe-up action at the bottom of the screen to switch the music application to run in the background, users can also switch the music application to run in the background through other operations, which are not limited in this application.
[0161] Optionally, after the music application is switched to run in the background, the electronic device 100 is not limited to displaying the desktop; the electronic device 100 may also display other user interfaces, which is not limited in this application.
[0162] To prompt users to play audio in the background using a music application, electronic device 100 can display a playback control card for the music application.
[0163] Optionally, the electronic device 100 may display the playback control card of the music application in the control center. The electronic device 100 may also display the playback control card of the music application in other areas, such as displaying the playback control card of the music application on the negative one screen, but this application is not limited thereto.
[0164] For example, as shown in FIG3C, electronic device 100 can receive a swipe operation by a user on the top of the display screen, such as a downward swipe operation. In response to the user's swipe operation, electronic device 100 can display the control center shown in FIG3D.
[0165] As shown in Figure 3D, the control center displays multiple control options, such as Wi-Fi on / off, Bluetooth on / off, flashlight on / off, ring mode on / off, auto-rotate device on / off, screenshot on / off, instant sharing on / off, airplane mode on / off, mobile data on / off, location information on / off, eye protection mode on / off, personal hotspot on / off, screen recording on / off, large screen projection on / off, and screen brightness adjustment. The control center shown in Figure 3D also includes a music application playback control card 3101. Playback control card 3101 includes the music name "AAA" played by the music application, and music playback control options, such as play previous track, play next track, and play / pause. Playback control card 3101 indicates that the music application is currently playing music in the background.
[0166] As shown in Figure 3D, the electronic device 100 can receive user input operations on the playback control card 3101, such as a click operation. In response to the user's input operation, the electronic device 100 can display the music application's playback control card 3102 as shown in Figure 3E. The playback control card 3102 displays more information than the playback control card 3101. For example, the playback control card 3102 also displays lyrics, volume adjustment options, and an indicator of the music application's most recently played music.
[0167] Optionally, in addition to displaying the broadcast control card 3101 in the control center, the electronic device 100 may also display the broadcast control card 3101 in the message notification interface and the lock screen interface.
[0168] For example, as shown in Figure 3F, the electronic device 100 displays a lock screen interface, which displays the time and date. The lock screen interface also displays a playback control card 3101 to prompt the user that the music application is running in the background and playing music.
[0169] For example, as shown in Figure 3G, the electronic device 100 displays a message notification interface, which shows SMS notification messages. The message notification interface also displays a playback control card 3101 to notify the user that the music application is running in the background and playing music.
[0170] In some embodiments, the message notification interface may also be referred to as a drop-down notification interface.
[0171] Optionally, while the music application is running in the background and continuing to play music, the electronic device 100 can receive a user operation to open the Huawei Video application and play video through the Huawei Video application. If the Huawei Video application also switches to running in the background, and if only playback of the first type of audio from one application is allowed, the electronic device 100 can allow either the music application or the Huawei Video application to play audio in the background. The electronic device 100 can also display the playback control card of the music application or the playback control card of the Huawei Video application playing audio in the background.
[0172] If both the music app and the Huawei Video app meet the condition of playing sound in the background, in one possible implementation, the electronic device 100 can allow the most recently used app to play sound in the background; that is, the Huawei Video app can play sound in the background, while the music app plays sound while paused. In other possible implementations, the electronic device 100 can allow the app with higher priority to play sound in the background. If the Huawei Video app has a higher priority than the music app, the Huawei Video app can play sound in the background, while the music app plays sound while paused.
[0173] Optionally, instead of allowing playback of only one type of audio from one application, the electronic device 100 may also allow simultaneous playback of type 1 audio from multiple applications, and may also display playback control cards for multiple applications.
[0174] Figures 4A-4L illustrate schematic diagrams of the electronic device 100 displaying the first control when the first application is running in the background and making a sound.
[0175] For example, the first application could be a map application.
[0176] For example, as shown in FIG4A, the electronic device 100 displays a desktop, which is similar to the desktop shown in FIG3A, except that the desktop shown in FIG4A also includes an icon for a map application.
[0177] As shown in Figure 4A, the electronic device 100 can receive user input operations on the map application icon, such as a click operation. In response to the user's input operation, the electronic device 100 can display the navigation interface shown in Figure 4B. The navigation interface shown in Figure 4B includes the navigation route, total distance, total duration, estimated arrival time, and current driving voice prompts. The voice content may include "Go straight for 1.1 kilometers to enter the first highway". The map application can broadcast driving route information intermittently / periodically.
[0178] In some embodiments, the electronic device 100 may receive user input to switch the first application to run in the background.
[0179] For example, as shown in FIG4B, electronic device 100 can receive a swipe operation by the user at the bottom of the display screen, such as an upward swipe operation. In response to the user's swipe operation, electronic device 100 can display the desktop shown in FIG4C, and the map application is switched to run in the background.
[0180] If the conditions for continuing to play route information in the background are met, the map application can continue playing route information in the background after switching to background operation. If the conditions for continuing to play route information in the background are not met, the music application must stop playing audio in the background after the map application switches to background operation.
[0181] Optionally, in addition to the swipe-up action at the bottom of the screen that switches the map application to run in the background, users can also switch the map application to run in the background through other operations, which are not limited in this application.
[0182] Optionally, after the map application is switched to run in the background, the electronic device 100 is not limited to displaying the desktop; the electronic device 100 may also display other user interfaces, which is not limited in this application.
[0183] To prompt the user to play audio in the background in a music application, the electronic device 100 may display a primary control. Since the user cannot control the driving route information played in a map application, the electronic device 100 may only display the primary control, thus saving display space on the electronic device 100.
[0184] Optionally, the electronic device 100 may display the first control in the control center. The electronic device 100 may also display the first control in other areas, such as on the negative one screen; this application does not limit this to such displays.
[0185] For example, as shown in FIG4C, electronic device 100 can receive a swipe operation by a user on the top of the display screen, such as a downward swipe operation. In response to the user's swipe operation, electronic device 100 can display the control center shown in FIG4D.
[0186] As shown in Figure 4D, the control center displays control 4101, which can be a speaker icon. Below control 4101 is displayed "Audio Occupied". Control 4101 is used to prompt the user that an application is continuing to play audio in the background. The user can use control 4101 to view the applications playing sound in the background.
[0187] In some embodiments, control 4101 may also be referred to as the first control.
[0188] As shown in Figure 4D, the electronic device 100 can receive user input operations on the control 4101, such as a click operation. In response to the user's input operation, the electronic device 100 can display the prompt box 4102 shown in Figure 4E. The prompt box 4102 displays the logo of the map application, which is used to prompt the user that the map application is currently playing audio in the background.
[0189] In some embodiments, in response to user input on control 4101, electronic device 100 may also display a prompt box 4102 as shown in FIG4F. The prompt box 4102 displays the map application's logo and option 4104. Option 4104 is displayed in a "play" state, which is used to prompt the user that the map application is playing audio in the background. The user can use option 4104 to stop the map application from playing audio in the background.
[0190] In some embodiments, in response to a user's input operation on control 4101, electronic device 100 may also display a prompt box 4102 as shown in FIG4G. The prompt box 4102 displays the logo of the map application and option 4103. The user can use option 4103 to stop the map application from playing audio in the background.
[0191] Optionally, it is also possible to allow the second type of audio from two or more applications to play in the background, in which case the identifiers of the two or more applications can be displayed in the prompt box 4102.
[0192] For example, in response to an input operation of the user control 4101, such as a click operation, the electronic device 100 may display a prompt box 4102 as shown in FIG4H. The prompt box 4102 displays the logos of the map application and the instant messaging application, which are used to prompt the user that the map application and the instant messaging application are currently playing audio in the background.
[0193] Figures 4I-4L show schematic diagrams of another electronic device 100 displaying control 4101.
[0194] For example, as shown in FIG4I, electronic device 100 displays a control center that displays volume control options. Electronic device 100 can receive user input operations regarding the volume control options, such as a click operation. In response to the user's input operation, electronic device 100 can display the interface shown in FIG4J. As shown in FIG4J, electronic device 100 displays volume control options and control 4101. Electronic device 100 can receive and respond to user input operations regarding control 4101, and electronic device 100 can also display a prompt box 4102 as shown in FIG4E, FIG4F, FIG4G, or FIG4H.
[0195] Optionally, not only in the control center, but also in the message notification interface and lock screen, electronic device 100 may display control 4101.
[0196] For example, as shown in Figure 4K, the electronic device 100 displays a lock screen interface that displays the time and date. The lock screen interface also displays a control 4101 to indicate to the user that an application is running in the background and playing a second type of audio.
[0197] For example, as shown in Figure 4L, the electronic device 100 displays a message notification interface that shows an SMS notification message. The message notification interface also displays a control 4101 to prompt the user that the application is running in the background and playing a second type of audio.
[0198] Figures 5A-5E show schematic diagrams of an electronic device 100 simultaneously displaying a playback card of a first application and a first control.
[0199] For example, the first application could be a music application, and the second application could be a map application.
[0200] If a music application is running in the background and making a sound, and a map application is also running in the background and making a sound, the electronic device 100 can display the playback control card of the music application, or it can display the first control.
[0201] For example, as shown in Figure 5A, the electronic device 100 can display the control center shown in Figure 5A. This control center displays a playback control card 3101 and a control 4101. The playback control card 3101 is used to notify the user that a music application is running in the background and producing sound. The control 4101 is used to notify the user that an application is playing a first type of audio in the background. The user can use the control 4101 to see which application is playing the first type of audio in the background.
[0202] For example, as shown in Figure 5B, the electronic device 100 can display the control center shown in Figure 5B, which displays a playback control card 3101. The electronic device 100 can receive user input operations on the playback control card 3101 and display the playback control card 3102 and control 4101 of the music application shown in Figure 5C. The playback control card 3101 and playback control card 3102 are used to prompt the user that the music application is running in the background and playing sound, and the control 4101 is used to prompt the user that an application is playing a second type of audio in the background. The user can use the control 4101 to see which application is playing the second type of audio in the background.
[0203] Optionally, in addition to displaying the broadcast control card 3101 and control 4101 in the control center, the electronic device 100 may also display the broadcast control card 3101 and control 4101 in the message notification interface and the lock screen interface.
[0204] For example, as shown in Figure 5D, the electronic device 100 displays a lock screen interface, which displays the time and date. The lock screen interface also displays a playback control card 3101 and a control 4101 to indicate to the user that an application is running in the background and playing a first type of audio and a second type of audio.
[0205] For example, as shown in Figure 5E, the electronic device 100 displays a message notification interface, which shows an SMS notification message. The message notification interface also displays a playback control card 3101 and a control 4101 to prompt the user that the application is running in the background and playing the first type of audio and the second type of audio.
[0206] Optionally, the electronic device 100 may also display the broadcast control card 3101 and control 4101 in the message notification interface and lock screen interface as shown in Figures 5B and 5C, which will not be described in detail here.
[0207] Figure 6 shows a schematic diagram of the process of the first application playing audio after it is turned on.
[0208] As shown in Figure 6, the electronic device 100 includes an audio service module, an audio and video session control module, a background task management module, and an audio playback unit. The audio playback unit may include, but is not limited to, a receiver, a speaker, and Bluetooth.
[0209] The methods for playing audio after the first application is launched include, but are not limited to, the following steps:
[0210] S601, The first application receives user input to play audio A.
[0211] S602, The first application sends audio file A to the audio service module (audio kit).
[0212] S603, the audio service module (audio kit) sends audio file A to the audio playback unit.
[0213] S604, the audio playback unit plays audio A based on audio file A.
[0214] The first application can receive a user operation to start playing audio. In response to the user operation to play audio A, the first application can send audio file A to the audio playback unit through the audio service module (audio kit). After obtaining audio file A, the audio playback unit can play audio A.
[0215] For example, the first application could be a music application, and audio A could be music “AAA”.
[0216] For example, the first application could be a music application, and audio A could be navigation route information.
[0217] S605, The first application creates an AV Session through the audio & video session control service module (audio & video session kit).
[0218] Optionally, the first application can create an AV Session with the audio & video session kit. This allows the first application to continue playing audio after it switches to background operation. If the first application does not create an AV Session with the audio & video session kit, it will not be able to continue playing audio after switching to background operation.
[0219] S606, The first application sends the playback control information of the first application to the audio & video session service module.
[0220] In some embodiments, the first application may also send its playback control information to the audio & video session kit. The playback control information may include pause / resume playback options and options for switching to other audio. Thus, after receiving the playback control information from the first application, the audio & video session kit can display the first audio being played by the first application on the playback control card. If the audio & video session kit does not receive the playback control information from the first application, it cannot display the first audio being played by the first application on the playback control card; it only displays the first control.
[0221] Optionally, if different applications have different playback control information, then the audio playback control options displayed in the playback control cards of different applications will be different.
[0222] S607, The first application applies for long-term tasks through the background task management module.
[0223] Optionally, the first application can request a long-running task from the background task management module. This allows the background task management module to keep the first application's process running in the background after it switches to background operation. If the first application does not request a long-running task from the background task management module, the module must close the first application's process after it switches to background operation, and the first application will not be able to run in the background.
[0224] Optionally, the first application may also omit executing S605 and / or S606 and / or S607.
[0225] It should be noted that the steps in Figure 6 are only used to explain this application, and this application does not limit the execution order of the steps in Figure 6.
[0226] Figure 7 illustrates the process of the first application continuing to play audio after switching to background operation.
[0227] As shown in Figure 7, the electronic device 100 includes a first application, a broadcast control center, an application management module, an audio service module (audio kit), an audio and video broadcast control service module (audio & video session kit), and a background task management module.
[0228] Methods for the first application to continue playing audio after switching to background operation include, but are not limited to, the following steps:
[0229] S701, The first application receives user commands to switch to background operation.
[0230] When the first application is running in the foreground, it can receive user input to play audio A. For example, refer to the description in the embodiment shown in Figure 6.
[0231] In some embodiments, the first application may also receive user input and switch to run in the background.
[0232] For example, the first application can be a music application, and the user operation that switches the music application to run in the background can be an upward swipe operation at the bottom of the display screen as shown in Figure 3C.
[0233] For example, the first application can be a map application, and the user operation that switches the map application to run in the background can be an upward swipe operation at the bottom of the display screen as shown in Figure 4B.
[0234] S702, The application management module sends the identifier of the first application to the audio & video session kit.
[0235] When the application management module detects that the first application has switched to background operation, it can send the identifier of the first application to the audio & video session kit. The identifier of the first application is used by the audio & video session kit to confirm whether the first application can continue to play audio in the background. If the first application can continue to play audio in the background, the audio & video session kit also needs to confirm whether to display the first application's control card or the first application's identifier.
[0236] S703, the audio & video session kit module obtains the task type of the first application.
[0237] After receiving the identifier of the first application, the audio & video session kit can obtain the task type of the first application from the background task management module.
[0238] For example, upon receiving the identifier of the first application, the audio & video session kit can send a message to the background task management module. This message instructs the background task management module to obtain the task type of the first application and send it to the audio & video session kit. Optionally, the message may carry the identifier of the first application, allowing the background task management module to obtain the task type of the first application based on the identifier.
[0239] The task types of the first application can include long-duration task types and non-long-duration task types.
[0240] If the first application requests a long-running task from the background task management module, the process of the first application can be kept alive when the first application is switched to the background. In other words, the process of the first application can continue to run in the background and will not be closed.
[0241] If the first application requests a non-long-running task from the background task management module, the process of the first application cannot be kept alive when the first application is switched to the background. In other words, the process of the first application cannot continue to run in the background and will be closed.
[0242] S704. Confirm whether the first application has registered an AV Session.
[0243] After receiving the identifier of the first application, the audio & video session kit can confirm whether the first application has registered an AV session.
[0244] S705, the audio & video session kit, confirms whether the first application meets the conditions for continuing to play audio in the background.
[0245] Optionally, conditions for continuing to play audio in the background may include: the first application registering an AV Session with the audio & video session control service module (audio & video session kit) or the first application requesting a long-running task from the background task management module.
[0246] If the first application registers an AV Session with the audio & video session control service module (audio & video session kit) and also applies for a long-running task with the background task management module, then the first application meets the conditions to continue playing audio in the background. The first application can continue playing audio in the background and execute S706.
[0247] If the first application does not register an AV Session with the audio & video session kit, and / or the first application does not request a long-running task from the background task management module, then the first application does not meet the conditions for continuing to play audio in the background, and the first application cannot continue to play audio in the background, thus executing S707.
[0248] S706, The broadcast control center displays the broadcast control card and / or the first control of the first application based on the audio type of audio A.
[0249] If the first application meets the conditions for continuing to play audio in the background, the audio & video session kit needs to determine whether audio A is type 1 audio or type 2 audio.
[0250] When audio A is of type 1 audio, the audio & video session kit can control the broadcast control center to display the broadcast control card of the first application. Users can not only identify the application playing audio in the background as the first application through the broadcast control card of the first application, but also control the audio played by the first application through the broadcast control card of the first application.
[0251] For example, if audio A is of type 1 audio, the audio & video session kit can send message A to the broadcast control center. Message A instructs the broadcast control center to display the broadcast control card of the first application. Optionally, message A may carry audio information of the audio played by the first application, including but not limited to any one or more of the following: type 1 audio, identifier of the first application, audio name, audio content, total audio duration, audio playback progress, etc.
[0252] The playback control card of the first application may display one or more information such as the audio information played by the first application and options for controlling the audio played by the first application. The options for controlling the audio played by the first application may include, but are not limited to, any one or more of the following: pause playback option, continue playback option, switch to play other audio options, etc.
[0253] Optionally, before displaying the playback control card of the first application, the playback control center needs to confirm whether it has obtained the playback control information of the first application. The playback control information of the first application can be sent to the playback control center by the audio & video session kit. If the playback control center has obtained the playback control information of the first application, and if audio A is of the first type of audio and the first application meets the condition of continuing to play audio in the background, the playback control center can display the playback control card of the first application based on the playback control information. The playback control card of the first application displays options for controlling the audio played by the first application. If the playback control center has not obtained the playback control information of the first application, in one possible implementation, the playback control center can also display the playback control card of the first application, but the playback control card of the first application does not display options for controlling the audio played by the first application. In other possible implementations, the playback control center can display a first control.
[0254] Optionally, the broadcast control center can display the broadcast control card of the first application in the control center. For example, the first application can be a music application, and the broadcast control card of the first application can be the broadcast control card 3101 shown in Figure 3D, or the broadcast control card 3102 shown in Figure 3E.
[0255] Optionally, in addition to displaying the broadcast control card of the first application in the control center, the electronic device 100 may also display the broadcast control card of the first application in the message notification interface or the lock screen interface, as described in the embodiments of Figures 3F and 3G.
[0256] For example, the audio & video session kit can send message A and playback control information of the first application to the media notification management module. The media notification management module can display the playback control card 3101 on the message notification interface or the lock screen interface based on the first type of audio and the playback control information of the first application carried in message A.
[0257] Optionally, while the music application is running in the background and continuing to play music, the electronic device 100 can receive a user operation to open the Huawei Video application and play video through the Huawei Video application. If the Huawei Video application also switches to running in the background, and if only one application is allowed to play Type 1 audio in the background, the electronic device 100 can allow either the music application or the Huawei Video application to play sound in the background. The electronic device 100 can also display the playback control card of the music application or the playback control card of the Huawei Video application playing sound in the background.
[0258] If both the music app and the Huawei Video app meet the condition of playing sound in the background, in one possible implementation, the electronic device 100 can allow the most recently used app to play sound in the background; that is, the Huawei Video app can play sound in the background, while the music app plays sound while paused. In other possible implementations, the electronic device 100 can allow the app with higher priority to play sound in the background. If the Huawei Video app has a higher priority than the music app, the Huawei Video app can play sound in the background, while the music app plays sound while paused.
[0259] Optionally, and not limited to allowing only one application to play Type I audio in the background, electronic device 100 may also allow multiple applications to play Type I audio in the background simultaneously, and electronic device 100 may also display playback control cards for multiple applications.
[0260] In this way, when the audio A played by the first application is of the first type, the electronic device 100 can display the playback control card of the first application. The user can control the audio played by the first application through the playback control card of the first application, such as pausing / resuming the playback of the audio in the first application, switching to play other audio in the first application, etc.
[0261] When audio A is of type II, the audio & video session kit can control the broadcast control center to display the first control, and the user can use the first control to identify the application playing audio in the background as the first application.
[0262] For example, if audio A is of the second type, the audio & video session kit can send message B to the control center, which instructs the control center to display the first control. Optionally, message B may carry the identifier of the second type of audio and the first application.
[0263] Optionally, the broadcast control center can display the first control in the control center. After the first control is displayed, the electronic device 100 can receive user operations on the first control, and the electronic device 100 can display the identifier of the first application.
[0264] For example, the first application may be a map application, and the identifier of the first application may be the identifier of the map application displayed in the prompt box 4102 shown in Figure 4E, Figure 4F, or Figure 4G.
[0265] Optionally, in addition to displaying the first control in the control center, the electronic device 100 may also display the first control in the message notification interface or the lock screen interface, as described in the embodiments of Figures 4K and 4L.
[0266] For example, the audio & video session kit can send message B to the media notification management module. In response to message B, the media notification management module can display a first control on the message notification interface or the lock screen interface based on the second type of audio carried in message B.
[0267] In this way, when the audio A played by the first application is of the second type, the electronic device 100 can display only the first control, thereby saving display area space of the electronic device 100.
[0268] Optionally, instead of allowing only one application to play the second type of audio in the background, the electronic device 100 may also allow multiple applications to play the second type of audio in the background simultaneously, and the electronic device 100 may also display the identifiers of multiple applications in the prompt box 4102.
[0269] Optionally, if audio A is a second type of audio, the electronic device 100 may not display an identifier for the application playing the second type of audio in the background.
[0270] S707, the audio service module (audio kit) controls the audio playback unit to stop playing the audio of the first application.
[0271] If it is confirmed that the first application does not meet the conditions for continuing to play audio in the background, the audio and video session kit can send message C to the audio service module (audio kit). Message C is used to instruct the audio service module (audio kit) to control the audio playback unit to stop playing the audio of the first application.
[0272] It should be noted that the steps in Figure 7 are only used to explain this application, and this application does not limit the execution order of the steps in Figure 7.
[0273] Optionally, if an application is playing the first type of audio and the second type of audio in the background at the same time, the electronic device 100 can simultaneously display the first control of the application's playback control card.
[0274] For example, as shown in Figure 5A, the electronic device 100 can display the control center shown in Figure 5A, which displays a playback control card 3101 and a control 4101. The user can view the application playing the second type of audio in the background through the control 4101.
[0275] For example, as shown in Figure 5B, electronic device 100 can display the control center shown in Figure 5B, which displays a playback control card 3101. Electronic device 100 can receive user input operations on playback control card 3101 and display playback control card 3102 and control 4101 of the music application shown in Figure 5C. The user can use control 4101 to view the application playing a second type of audio in the background.
[0276] Optionally, in addition to displaying the broadcast control card 3102 and control 4101 in the control center, the electronic device 100 may also display the first control in the message notification interface or the lock screen interface, as described in the embodiments of Figures 5D and 5E.
[0277] Optionally, the electronic device 100 may not include an audio / video broadcast control service module. The first application can obtain the software development kit (SDK) of the broadcast control center or media notification management module. The first application can communicate directly with the broadcast control center or media notification management module. When the first application switches to background operation, if audio A is a first audio type, the first application can send message A and its playback control information to the broadcast control center or media notification management module. The broadcast control center or media notification management module can display the first application's playback card based on the first audio type carried in message A and the first application's playback control information. If audio A is a second audio type, the first application can send message B to the broadcast control center or media notification management module. The broadcast control center or media notification management module can display a first control based on the second audio type carried in message B.
[0278] 2. In response to a user's operation on the playback control card or the identifier of the first application, the electronic device 100 can control the first application to stop playing audio in the background.
[0279] Figures 8A-8G illustrate schematic diagrams showing how electronic device 100 can control a first application to stop playing audio in the background.
[0280] For example, the first application could be a music application.
[0281] For example, as shown in FIG8A, electronic device 100 displays a playback control card 3101 for a music application. Electronic device 100 can receive user input operations for the play / pause playback options in the playback control card 3101, such as a click operation. In response to the user's input operation, electronic device 100 can change the display state of the play / pause playback options and display the display state shown in FIG8B. The display state shown in FIG8B is the "pause playback" state, which is used to prompt the user that the music application has paused playing sound in the background.
[0282] Optionally, after the display state of the play / pause playback option is switched to the "pause playback" state shown in Figure 8B, the electronic device 100 can stop displaying the music application's playback control card 3101. For example, the electronic device 100 can display the control center shown in Figure 8C, which is used to prompt the user that the music application has paused playing sound in the background.
[0283] For example, the first application could be a map application.
[0284] For example, as shown in Figure 8D, the electronic device 100 displays a prompt box 4102, which displays the identifier of the map application. As shown in Figure 8D, the electronic device 100 can receive user input operations for option 4104, such as a click operation. In response to the user's input operation, the electronic device 100 can change the display state of option 4104 and display the display state shown in Figure 8E. The display state shown in Figure 8E is a "paused playback" state, which is used to prompt the user that the map application has paused playback in the background.
[0285] Optionally, after the display state of option 4104 is switched to the "pause playback" state shown in Figure 8E, the electronic device 100 can stop displaying control 4101. For example, the electronic device 100 can display the control center shown in Figure 8C, which is used to prompt the user that the map application has been paused in the background.
[0286] For example, as shown in Figure 8F, the electronic device 100 displays a prompt box 4102, which displays the identifier of the map application. The electronic device 100 can receive user input operations for option 4103, such as a click operation. In response to the user's input operation, the electronic device 100 can display the control center shown in Figure 8G, and the electronic device 100 stops displaying control 4101, which is used to prompt the user that the map application has stopped playing audio in the background.
[0287] Optionally, in response to user input on option 4103, electronic device 100 may also close the map application process.
[0288] Figure 9 shows a schematic diagram of the process by which electronic device 100 controls the first application to stop playing audio in the background.
[0289] As shown in Figure 9, the electronic device 100 includes an application layer, an application framework layer, and a hardware layer. The application layer includes a first application and a broadcast control center; the application framework layer includes an audio service module (audio kit); and the hardware layer includes an audio playback unit, which may include, but is not limited to, a receiver, a speaker, and Bluetooth.
[0290] The method by which electronic device 100 controls a first application to stop playing audio in the background includes, but is not limited to, the following steps:
[0291] S901, The audio playback unit plays audio A in the first application.
[0292] S902, The broadcast control center displays the broadcast control card or the first control of the first application.
[0293] When the first application is running in the background and making sounds, the electronic device 100 can display the playback control card or the identifier of the first application to remind the user that the application making sounds in the background is the first application.
[0294] For example, when the audio A played by the first application is of the first type, the playback control card of the first application can be the playback control card 3101 shown in Figure 3D, or the playback control card 3102 shown in Figure 3E.
[0295] For example, when the audio A played by the first application is of the second type, the identifier of the first application can be the identifier of the map application displayed in the prompt box 4102 shown in Figure 4E, Figure 4F, or Figure 4G.
[0296] S903, the broadcast control center receives user commands that cause the first application to stop playing audio.
[0297] For example, when the audio A played by the first application is of the first type, the user operation that causes the first application to stop playing the audio can be the input operation for the play / pause playback option in the playback control card 3101, as shown in Figure 8A.
[0298] For example, when the audio A played by the first application is of the second type, the user operation that causes the first application to stop playing the audio can be the input operation for option 4104 shown in FIG8D, or it can be the input operation for option 4103 shown in FIG8F.
[0299] S904, The broadcast control center sends message D to the audio service module (audio kit).
[0300] S905, the audio service module (audio kit) controls the audio playback unit to stop playing audio A in the first application.
[0301] In response to a user action that causes the first application to stop playing audio, the broadcast control center can send message D to the audio service module (audio kit), which instructs the audio playback unit to stop playing audio A in the first application.
[0302] For example, in response to message D, the audio service module (audio kit) can send message E to the audio playback unit. Upon receiving message E, the audio playback unit can stop playing audio A in the first application.
[0303] Optionally, when the electronic device 100 receives a user operation to stop the first application from playing sound in the background, the process of the first application remains in a keep-alive state and is not closed. When the first application switches to the foreground again, in one possible implementation, the first application can automatically resume playing the driving route information. In other possible implementations, the first application pauses playing the driving route information, and resumes playing the driving route information after receiving a user operation.
[0304] S906, The broadcast control center stops displaying the broadcast control card or the first control of the first application.
[0305] Optionally, in response to a user action that causes the first application to stop playing audio, the broadcast control center may stop displaying the first application's broadcast control card or first control to notify the user that the first application has stopped playing audio in the background.
[0306] Optionally, S906 may not be executed. In response to a user operation that causes the first application to stop playing audio, the broadcast control center may continue to display the first application's broadcast control card or first control.
[0307] Using the method shown in Figure 9, electronic device 100 can receive user operations in the broadcast control center to control the first application running in the background to stop playing audio.
[0308] It should be noted that the steps in Figure 9 are only used to explain this application, and this application does not limit the execution order of the steps in Figure 9.
[0309] Third, in response to a user's operation on the identifier of the first application, the electronic device 100 may display the user interface in the first application.
[0310] Figures 10A-10B show schematic diagrams of an electronic device 100 displaying a user interface in a first application in response to a user's operation of an identifier for a first application.
[0311] For example, as shown in FIG10A, the electronic device 100 displays a prompt box 4102, which displays an icon for the map application. As shown in FIG10A, the electronic device 100 can receive user input operations on the icon for the map application, such as a click operation. In response to the user's input operation, the electronic device 100 can display the user interface of the map application, such as the user interface shown in FIG10B.
[0312] Optionally, in response to the user's input operation on the identifier of the map application in the prompt box 4102, the user interface of the map application displayed by the electronic device 100 may be the user interface displayed when the map application was previously run in the foreground, or the default user interface of the map application (such as the main interface or home page of the map application), or the user interface of the map application containing the audio information played by the map application. This application does not limit which user interface of the map application is displayed by the electronic device 100.
[0313] Optionally, after the user interface of the map application is displayed on the electronic device 100, the electronic device 100 may stop displaying the control 4101.
[0314] Figure 11 shows a flowchart of an electronic device 100 displaying a user interface in a first application in response to a user's operation on an identifier of a first application.
[0315] As shown in Figure 11, the electronic device 100 includes an application layer and a hardware layer. The application layer includes a first application and a broadcast control center, and the hardware layer includes an audio playback unit, which may include, but is not limited to, a receiver, a speaker, and Bluetooth.
[0316] The method by which electronic device 100 displays a user interface in the first application in response to a user's operation on an identifier of the first application includes, but is not limited to, the following steps:
[0317] S1101, The audio playback unit plays audio A in the first application.
[0318] S1102. The broadcast control center displays the first control, receives operations on the first control, and displays the identifier of the first application.
[0319] When the first application is running in the background and making a sound, the electronic device 100 can display a first control to notify the user that an application is playing a second type of audio in the background.
[0320] The broadcast control center can receive and respond to user operations on the first control. The broadcast control center can display the identifier of the first application to indicate to the user which application is playing the second type of audio in the background.
[0321] For example, the first application may be a map application, and the identifier of the first application may be the identifier of the map application displayed in the prompt box 4102 shown in Figure 4E, Figure 4F, or Figure 4G.
[0322] S1103, The broadcast control center receives user operations for the identifier of the first application.
[0323] For example, a user action for the identifier of the first application can be an input action for the identifier of the map application, as shown in Figure 10A.
[0324] S1104, The broadcast control center sends message F to the first application.
[0325] S1105, The first application displays the user interface of the first application.
[0326] In response to a user action targeting the first application, the broadcast control center can send message F to the first application, which instructs the first application to display the user interface in the first application.
[0327] Optionally, in response to a user's input operation on the identifier of the map application, the user interface of the map application displayed by the electronic device 100 may be the user interface displayed when the map application was previously run in the foreground, or the default user interface of the map application (such as the main interface or homepage of the map application), or the user interface of the map application containing audio information played by the map application. This application does not limit which user interface of the map application is displayed by the electronic device 100.
[0328] Optionally, users can also switch the first application to run in the foreground through the background task management application, that is, switch the first application to run in the foreground through the background task management module.
[0329] Optionally, after the user interface of the first application is displayed on the electronic device 100, if the electronic device 100 receives another user operation to display the control center, the electronic device 100 may stop displaying the identifier of the first application in the control center to indicate that the first application is running in the foreground and playing audio.
[0330] Using the method shown in Figure 11, the electronic device 100 can receive a user's operation on the identifier of the first application, enabling the electronic device 100 to switch to displaying the user interface of the first application. The audio playback unit can continue playing audio A from the first application.
[0331] It should be noted that the steps in Figure 11 are only used to explain this application, and this application does not limit the execution order of the steps in Figure 9.
[0332] Figure 12 is a schematic diagram of the method flow of a display method provided in this application.
[0333] S1201, The electronic device plays the first audio in the first application.
[0334] S1202, The electronic device receives the user's first operation.
[0335] S1203, In response to the first operation, the first application is switched from the foreground to the background. When the first application is running in the background, the electronic device continues to play the first audio.
[0336] S1204. After the first application runs in the background, the electronic device displays a first interface. The first interface includes a first playback control card and a first control. The first control is used to indicate that the first audio is playing in the background, and the first playback control card is used to display the second audio played by the second application.
[0337] Both the first playback control card and the first control are used to instruct the first and second audio to play in the background.
[0338] This method allows electronic devices to display different icons to indicate different audio being played in the background, thus improving the display effect of the electronic device.
[0339] For example, the first application may be a map application, the first audio may be navigation route information, and the first control may be control 4101 shown in Figures 5C-5E.
[0340] For example, the second application can be a music application, the second audio can be music, and the first broadcast control card can be broadcast control card 3101 or broadcast control card 3102 shown in Figures 5C-5E.
[0341] In one possible implementation, the electronic device includes an audio / video broadcast control service module; before the electronic device displays the first interface, the method further includes: the audio / video broadcast control service module acquiring audio information of a first audio and audio information of a second audio; the electronic device displays the first interface, specifically including: the audio / video broadcast control service module displaying a first broadcast control card and a first control on the first interface based on the audio information of the first audio and the audio information of the second audio.
[0342] Optionally, the audio information of the first audio file may be sent to the audio / video playback control service module when the first application starts or when the first audio file is played. Similarly, the audio information of the second audio file may be sent to the audio / video playback control service module when the second application starts or when the second audio file is played.
[0343] In one possible implementation, the audio information of the first audio includes the audio type of the first audio, and the audio information of the second audio includes the audio type of the second audio and the playback control information of the second audio; wherein, the audio type of the first audio is a second type of audio, the audio type of the second audio is a first type of audio, and the playback control information of the second audio includes any one or more of the following: pause / resume playback option information, switch to play other audio option information.
[0344] If the first audio is of the second type, the audio information of the first audio may include the second type of audio. Optionally, the audio information of the first audio may also include the identifier of the first application.
[0345] When the second audio is of the first type, the audio information of the second audio may include playback control information for both the first and second audio types. Optionally, the audio information of the second audio may also include the identifier of the first application, audio name, audio content, total audio duration, and audio playback progress. The playback control information of the second audio may include pause / resume playback options and options for switching to other audio types.
[0346] In one possible implementation, the electronic device is playing the second audio or has stopped playing the second audio when the first playback control card is displayed.
[0347] In one possible implementation, the first playback control card includes options for controlling the audio played by the first application. These options may include any one or more of the following: pause / resume playback options, and switch to play other audio options.
[0348] Optionally, the electronic device displays options for controlling the audio played by the first application in the first playback control card based on the playback control information of the second audio.
[0349] Optionally, if playback control information for the second audio is not obtained, in one possible implementation, the electronic device may not display the option for controlling the audio playback of the first application in the first playback control card. In other possible implementations, the electronic device may display the first control.
[0350] In this way, for the second audio of the first type of audio, the electronic device can display options in the first playback control card for controlling the audio played by the first application. The user can control the audio of the first type of audio played by the first application based on these options, such as switching to playing other audio of the first type of audio, pausing the playback of the second audio of the first type of audio, etc.
[0351] For example, the options for controlling the audio played by the first application may be options such as switching to play the previous / next audio track, pausing playback of the second audio track, and adjusting the volume, as shown in the playback control card 3101 or playback control card 3102.
[0352] In one possible implementation, the first interface includes a control center interface, or a volume adjustment interface, or a message notification interface, or a lock screen interface.
[0353] For example, the control center interface can be the interface shown in Figures 3D, 4D-4I, and 5A-5C.
[0354] For example, the volume control interface can be the interface shown in Figure 4J.
[0355] For example, the message notification interface can be the interface shown in Figure 3G, Figure 4L, and Figure 5E.
[0356] For example, the lock screen interface can be the interface shown in Figure 3F, Figure 4K, and Figure 5D.
[0357] In one possible implementation, the first type of audio includes any of the following: music audio, video audio, e-book audio; the second type of audio includes any of the following: navigation audio, live broadcast audio, call audio, news playback audio, game audio.
[0358] In conjunction with the first aspect, in one possible implementation, after the electronic device displays the first control, the method further includes: the electronic device receiving a second operation from the user on the first control, and in response to the second operation, the electronic device displaying an identifier of the first application.
[0359] In this way, users can use the first control to see which application is playing the second type of audio in the background.
[0360] For example, the second operation on the first control could be an input operation on control 4101 as shown in Figure 4D. The identifier of the first application could be the icon of the map application shown in Figure 4E.
[0361] In one possible implementation, the method further includes: after receiving a second operation, the electronic device displays a first option of a first application; the electronic device receives a third operation from the user regarding the first option; and in response to the third operation, the electronic device stops playing the first audio.
[0362] In this way, users can control the first application to stop playing the first audio in the background through the first option.
[0363] For example, the first option could be option 4104 as shown in Figure 8D.
[0364] For example, the first option could also be option 4103 as shown in Figure 8F.
[0365] In one possible implementation, the method further includes: in response to a third operation, the electronic device closes the process of the first application.
[0366] In this way, the user can close the process of the first application running in the background using the first option. After closing the process of the first application, the first application will stop playing the first audio in the background.
[0367] For example, the third operation for the first option can be the input operation for option 4103 shown in FIG8F.
[0368] In one possible implementation, the method further includes: after the electronic device stops playing the first audio, the electronic device stops displaying the first control.
[0369] Thus, after the electronic device stops playing the first audio, the electronic device stops displaying the first control to indicate that the first application is not playing the second type of audio in the background.
[0370] In one possible implementation, the method further includes: after the electronic device stops playing the first audio, the electronic device receives a fourth operation; in response to the fourth operation, the first application switches from the background to the foreground; while the first application is running in the foreground, the electronic device continues to play the first audio.
[0371] In this way, after the first application stops playing the first audio in the background, the electronic device can receive user input to bring the first application to the foreground. When the first application is running in the foreground, the electronic device can continue playing the first audio.
[0372] Optionally, when the first application is running in the foreground, the electronic device can automatically play the first audio.
[0373] Optionally, when the first application is running in the foreground, the electronic device can automatically play the first audio after receiving a user action.
[0374] In one possible implementation, the method further includes: the electronic device receiving a fifth operation from a user targeting a first application, and in response to the fifth operation, the electronic device displaying a second interface from the first application.
[0375] In one possible implementation, the second interface is the homepage of the first application, or the second interface is an interface related to the second audio in the first application, or the second interface is an interface displayed in the foreground before the first application switches to background operation.
[0376] In this way, users can quickly display the second interface of the first application on their electronic devices by using the identifier of the first application, saving users time and effort.
[0377] For example, the identifier of the first application could be the identifier of the map application shown in Figure 10A. The second interface of the first application could be the navigation interface shown in Figure 10B.
[0378] In one possible implementation, after the electronic device displays the first interface, the method further includes: the electronic device playing a third audio from a third application; the electronic device receiving a sixth operation from the user; in response to the sixth operation, the third application switching from foreground to background operation; the electronic device receiving a seventh operation from the user on a first control; and in response to the seventh operation, the electronic device displaying the identifiers of the first application and the third application.
[0379] In this way, when an electronic device allows multiple applications to play audio of the second type of audio in the background, the electronic device can display the identifiers of those multiple applications to indicate to the user which applications are playing the second type of audio in the background.
[0380] For example, the identifier of the first application may be the icon of the map application shown in Figure 4H, and the identifier of the third application may be the icon of the instant messaging application shown in Figure 4H.
[0381] This application provides an electronic device, which includes a memory and a processor. The memory is used to store computer programs, and the processor is used to invoke the computer programs to cause the electronic device to execute a display method as shown in FIG12.
[0382] This application provides an apparatus including a unit or module for performing any of the methods in the first aspect, or for performing a display method shown in FIG12.
[0383] This application provides a readable storage medium storing a program or instructions that, when executed on a device, cause an electronic device to perform a display method as shown in FIG12.
[0384] This application provides a chip system including one or more processors, which are used to invoke computer instructions to cause an electronic device to execute a display method shown in FIG12.
[0385] This application provides a program product, which includes computer instructions that, when executed on an electronic device, cause the electronic device to perform a display method as shown in FIG12.
[0386] It is understood that the user interfaces described in the embodiments of this application are merely example interfaces and do not constitute a limitation on the solution of this application. In other embodiments, the user interface may adopt different interface layouts, may include more or fewer controls, and may add or remove other functional options, as long as they are based on the same inventive concept provided in this application, they are all within the protection scope of this application.
[0387] It should be noted that, without causing contradictions or conflicts, any feature in any embodiment of this application, or any part of any feature, can be combined, and the combined technical solution is also within the scope of the embodiments of this application.
[0388] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit it. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.
Claims
1. A display method, characterized in that, The method includes: The electronic device plays the first audio file in the first application. The electronic device receives the user's first operation. In response to the first operation, the first application switches from foreground to background operation. When the first application is running in the background, the electronic device continues to play the first audio. After the first application runs in the background, the electronic device displays a first interface, which includes a first playback control card and a first control. The first control is used to instruct the first audio to play in the background, and the first playback control card is used to display the second audio played by the second application.
2. The method according to claim 1, characterized in that, The electronic device includes an audio and video broadcast control service module; Before the electronic device displays the first interface, the method further includes: The audio and video broadcast control service module obtains the audio information of the first audio and the audio information of the second audio. The electronic device displays a first interface, specifically including: The audio and video playback control service module displays the first playback control card and the first control on the first interface based on the audio information of the first audio and the audio information of the second audio.
3. The method according to claim 2, characterized in that, The audio information of the first audio includes the audio type of the first audio, and the audio information of the second audio includes the audio type of the second audio and the playback control information of the second audio. Wherein, the audio type of the first audio is the second type of audio, the audio type of the second audio is the first type of audio, and the playback control information of the second audio includes any one or more of the following: pause / continue playback option information, switch to play other audio option information.
4. The method according to claim 1 or 2, characterized in that, When the electronic device displays the first playback control card, the electronic device is playing the second audio, or has stopped playing the second audio.
5. The method according to any one of claims 1-4, characterized in that, The first playback control card includes options for controlling the audio played by the first application. These options may include any one or more of the following: pause / resume playback options, and switch to play other audio options.
6. The method according to any one of claims 1-5, characterized in that, The first interface may include a control center interface, or a volume adjustment interface, or a message notification interface, or a lock screen interface.
7. The method according to claim 3, characterized in that, The first type of audio includes any one of the following: music audio, video audio, and e-book audio; The second type of audio includes any of the following: navigation audio, live broadcast audio, call audio, news playback audio, and game audio.
8. The method according to any one of claims 1-7, characterized in that, After the electronic device displays the first control, the method further includes: The electronic device receives a second operation from the user on the first control. In response to the second operation, the electronic device displays the identifier of the first application.
9. The method according to claim 8, characterized in that, The method further includes: Upon receiving the second operation, the electronic device displays the first option of the first application; The electronic device receives a third operation from the user for the first option; In response to the third operation, the electronic device stops playing the first audio.
10. The method according to claim 9, characterized in that, The method further includes: In response to the third operation, the electronic device closes the process of the first application.
11. The method according to claim 9 or 10, characterized in that, The method further includes: After the electronic device stops playing the first audio, the electronic device stops displaying the first control.
12. The method according to claim 9, characterized in that, The method further includes: After the electronic device stops playing the first audio, the electronic device receives a fourth operation; In response to the fourth operation, the first application switches from the background to the foreground. When the first application is running in the foreground, the electronic device continues to play the first audio.
13. The method according to claim 8, characterized in that, The method further includes: The electronic device receives a fifth operation from the user targeting the identifier of the first application. In response to the fifth operation, the electronic device displays the second interface of the first application.
14. The method according to claim 13, characterized in that, The second interface is the homepage of the first application, or the second interface is an interface related to the second audio in the first application, or the second interface is the interface displayed in the foreground before the first application switches to background operation.
15. The method according to any one of claims 1-7, characterized in that, After the electronic device displays the first interface, the method further includes: The electronic device plays a third audio from a third application; The electronic device receives the user's sixth operation; In response to the sixth operation, the third application switches from foreground to background operation; The electronic device receives a seventh operation from the user on the first control; In response to the seventh operation, the electronic device displays the identifier of the first application and the identifier of the third application.
16. An electronic device, characterized in that, The electronic device includes a memory and a processor, wherein the memory is used to store a computer program; and the processor is used to invoke the computer program to cause the electronic device to perform the method according to any one of claims 1-15.
17. A computationally readable storage medium, comprising instructions, characterized in that, When the instructions are executed on an electronic device, the electronic device performs the method of any one of claims 1-15.
18. A computer program product, characterized in that, The computer program product includes computer instructions that, when executed on an electronic device, cause the electronic device to perform the method of any one of claims 1-15.
Citation Information
Patent Citations
Playing method and electronic equipment
CN111078186A
Application management method and terminal
CN114115509A
Retaining user selected screen area on user equipment
US20160259533A1