Interface processing method and electronic equipment
Patent Information
- Application Number
- CN202480047938.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2023-12-27
- Filing Date
- 2024-07-23
- Publication Date
- 2026-02-27
AI Technical Summary
In the prior art, the waiting time is long when starting a new application, and the user can clearly perceive the slow response speed of the display process, resulting in poor user interaction experience.
By setting the first attribute in the electronic device, it is instructed that the startup window is not displayed during the application jump process, the activity of the first application is suspended, the window screen data of the second application is immediately processed, and the dynamic sliding of the startup window is added during the jump process to ensure a quick response.
It reduces the waiting time during application jump, improves the response speed and continuity of the user interface, and improves the user interaction experience.
Smart Images

Figure CN121586887A_ABST
Abstract
Description
Interface processing method and electronic equipment
[0001] This application claims priority to the Chinese patent application filed with the China Patent Office on December 27, 2023, with application number 202311837659.8 and application name “An interface processing method and electronic device”, the entire contents of which are incorporated by reference into this application. Technical Field
[0002] The present application relates to the technical field of terminal devices, and in particular to an interface processing method and electronic equipment. Background Art
[0003] When users interact with electronic devices, they use different applications. If a new application needs to be launched for display, the new application must be displayed after the application interface is drawn. The waiting time for launching and drawing the new application is long, and users can clearly perceive the slow response speed and high latency of the display process, resulting in a poor user interaction experience.
[0004] Summary of the Invention
[0005] The embodiments of the present application provide an interface processing method and an electronic device for accelerating the response speed of motion effect processing and display, thereby improving the user interaction experience.
[0006] In a first aspect, an embodiment of the present application provides an interface processing method, wherein the electronic device is installed with a first application and a second application, and the method includes: the electronic device runs the first application, and receives a first operation of the user to start the second application when the user interface of the electronic device displays a first window screen of the first application; when a first attribute is set in the first application, the electronic device, in response to the first operation to start running the second application, displays a startup window and a second window screen of the second application in the user interface in sequence, wherein the startup window is an intermediate interface for starting the second application; the first attribute is used to indicate that the startup window is not displayed.
[0007] The startup window is a window displayed before the window screen of the second application is displayed during the startup process of the second application. The startup window can be a window including the second application icon, a splash screen advertisement, or a logo screen, etc., which is not limited in this application.
[0008] In the embodiment of the present application, the response waiting time of the electronic device is shortened, and a startup window is added during the response process, so that the user does not perceive obvious freezes in the screen, thereby improving the user experience.
[0009] In one possible implementation, the first attribute includes at least one of a transparent attribute, a disabled floating attribute, and a disabled wallpaper attribute; the transparent attribute indicates that the startup window is displayed in a transparent state, the disabled floating attribute indicates that the startup window is not displayed in a floating form, and the disabled wallpaper attribute indicates that the startup window is not displayed in a wallpaper form. In this way, the setting of the first attribute indicates that the first application jumps to other applications, and the startup windows of other applications are not displayed during the jump. The form or setting of the startup window generally includes opaque, floating, and wallpaper presentation. The first attribute is a disabled state of the above state, which can limit the startup window from being displayed during the jump. The above settings are just ignored here to ensure response speed.
[0010] In one possible implementation, the method further includes: in response to the first operation, sequentially displaying the startup window and the second window screen when the first attribute is not set in the first application. Thus, when the first attribute is not set, the startup window is added as usual, ensuring a faster startup response and a better user experience.
[0011] In one possible implementation, the method further includes: in response to the first operation, the electronic device determining whether the first application is set with the first attribute; if the first application stores setting information for the first attribute, the first application is set with the first attribute; if the first application stores setting information for the first attribute, the first application is not set with the first attribute. This ensures that the effects of the first attribute on the display are fully implemented; if the first attribute exists, the first attribute can be ignored and the startup window drawing and display can be started, ensuring a fast response during the application jump process and improving the user experience.
[0012] In one possible implementation, the method further includes: in response to the first operation, the electronic device setting the second window screen to be visible and the first window screen to be non-visualized; wherein the visual display indicates that the window screen is displayed, and the non-visual display indicates that the window screen is not displayed. In this way, the electronic device can immediately execute the processing of the first window screen after pausing the first activity, ensuring the speed and timeliness of the dynamic effect response.
[0013] In one possible implementation, before setting the second window screen to be visible and the first window screen to be non-visualized, the method further includes: pausing the first activity of the first application. In this way, after pausing the first activity, the electronic device can immediately process the window screens of both applications, ensuring the timeliness of the animation effect.
[0014] In one possible implementation, after pausing the first activity of the first application, the method further includes: starting the second activity of the second application, obtaining first frame data for starting the second application; and drawing image information of the second window screen upon obtaining the first frame data. In this way, after pausing the first activity, the electronic device can immediately process the window screens of both applications and draw the window screen of the second application, allowing multiple tasks to be processed simultaneously, ensuring display continuity and timely response.
[0015] In a possible embodiment, the electronic device also includes a system service, and suspending the first activity of the first application includes: after the first application receives the first operation of the user to start the second application, the system service suspends the first activity of the first application; the method also includes: the system service sends a process start request to the second application, the process start request is used to request to start the process of the second application, and the second application starts the first process; setting the second window screen to be visual and the first window screen to be non-visual includes: the system service sets the second window screen to be visual and the first window screen to be non-visual; starting the second activity of the second application and obtaining the first frame data for starting the second application includes: the system service starts the second activity of the second application and obtains the first frame data for starting the second application.
[0016] In a possible implementation, the electronic device further includes a system service and a system library, and the electronic device determines whether the first application is set with the first attribute, including: the system service determines whether the first application is set with the first attribute; the method further includes: when the first attribute is set in the first application, the system service requests the system library to draw image information of the startup window.
[0017] In this way, when it is obtained that the first attribute needs to be used, the first attribute can be ignored and the drawing and display of the startup window can be started, thereby ensuring a fast response during the application jump process and improving the user experience.
[0018] In one possible implementation, sequentially displaying the startup window and the second window of the second application on the user interface includes: at a first moment, displaying the user interface including a portion of the first window and a portion of the startup window; at a second moment, displaying the user interface including the startup window but excluding the first window; and at a third moment, displaying the user interface including the second window. This increases the smoothness of the sliding process, ensures display continuity, and enhances the user's sense of interaction.
[0019] In a second aspect, an embodiment of the present application provides an electronic device, comprising one or more processors and one or more memories; the one or more processors are coupled to the one or more memories, the one or more memories are used to store computer program code, and the computer program code comprises computer instructions, and when the one or more processors execute the computer instructions, the electronic device executes an interface processing method described in the first aspect or any possible implementation method of the first aspect.
[0020] In a third aspect, an embodiment of the present application provides a computer program product comprising instructions, which, when run on an electronic device, enables the electronic device to execute an interface processing method as described in the first aspect or any possible implementation of the first aspect.
[0021] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium comprising instructions, which, when executed on an electronic device, enables the electronic device to execute an interface processing method as described in the first aspect or any possible implementation of the first aspect.
[0022] In the fifth aspect, an embodiment of the present application provides a chip system, which is applied to an electronic device, and the chip system includes one or more processors, which are used to call computer instructions to enable the electronic device to execute an interface processing method as described in the first aspect or any possible implementation method of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] FIG1A is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application;
[0024] FIG1B is a schematic diagram of the software structure of an electronic device proposed in an embodiment of the present application;
[0025] 2A to 2F are schematic diagrams of a set of user interfaces proposed in an embodiment of the present application;
[0026] FIG3 is a flow chart of a method for displaying an interface provided by an embodiment of the present application;
[0027] 4A and 4B are timing diagrams of a set of user interface displays proposed in an embodiment of the present application;
[0028] 5A and 5B are another set of user interface schematic diagrams proposed in an embodiment of the present application;
[0029] FIG6 is a flow chart of another method for displaying an interface proposed in an embodiment of the present application;
[0030] 7A and 7B are a set of application jump processing timing diagrams proposed in an embodiment of the present application. DETAILED DESCRIPTION
[0031] The terms used in the following examples of the present application are for the purpose of describing specific embodiments only and are not intended to limit the present application. As used in the specification and appended claims of the present application, the singular expressions "a," "an," "said," "above," "the," and "this" are intended to include plural expressions as well, unless the context clearly indicates otherwise. It should also be understood that the term "and / or" used in the present application refers to and encompasses any or all possible combinations of one or more of the listed items.
[0032] The embodiments of the present application disclose an application jump method and an electronic device for accelerating the response speed of interface display and improving the user interaction experience.
[0033] In response to a user operation, the user interface of an electronic device may jump from one application's user interface to another application's user interface. For example, a user may be viewing a shared video link in a communication app. The user may click on the video link to view the video. In response to the user clicking on the video link, the electronic device may display the user interface for the video, which may include a jump request window. The user may click on a control for jumping to the video application. In response to the jump operation, the electronic device may launch the video application, thereby jumping the display screen from one application's user interface to another application's user interface.
[0034] The electronic device in the embodiments of the present application can be a mobile phone, a tablet computer, a desktop computer, a laptop computer, a handheld computer, a smart bracelet, a super mobile personal computer, a netbook, a personal phone, a personal data assistant, an augmented reality (AR) / virtual reality (VR) and other touch screen devices. The present application does not limit the specific form of the electronic device.
[0035] The following describes the device involved in the embodiments of the present application.
[0036] FIG1A is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application.
[0037] The electronic device 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, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, a sensor module 180, a display screen 194, etc. The sensor module 180 may include a touch sensor 180K, etc.
[0038] It is understood that the structures illustrated in the embodiments of the present application do not constitute specific limitations on the electronic device. In other embodiments of the present application, the electronic device may include more or fewer components than shown, or may combine or separate certain components, or arrange the components differently. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0039] The processor 110 may include one or more processing units. For example, the processor 110 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU). The different processing units may be independent devices or integrated into one or more processors.
[0040] The controller can be the nerve center and command center of the electronic device. The controller can generate operation control signals based on instruction operation codes and timing signals to complete the control of instruction fetching and execution.
[0041] Processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in processor 110 is a cache memory. This memory can store instructions or data that have just been used or are being recycled by processor 110. If processor 110 needs to use the same instruction or data again, it can directly access the memory. This avoids duplicate accesses, reduces processor 110 latency, and thus improves system efficiency.
[0042] It is understood that the interface connection relationship between the modules illustrated in the embodiments of the present application is only for illustrative purposes and does not constitute a structural limitation on the electronic device. In other embodiments of the present application, the electronic device may also adopt different interface connection methods from the above embodiments, or a combination of multiple interface connection methods.
[0043] The charging management module 140 is configured to receive charging input from a charger. The charger can be either a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 can receive charging input from the wired charger via the USB interface 130. In some wireless charging embodiments, the charging management module 140 can receive 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 provide power to the electronic device via the power management module 141.
[0044] The power management module 141 is used to connect 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 and provides power to the processor 110, the internal memory 121, the external memory, the display 194, and the wireless communication module 160. The power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle count, and battery health status (leakage, impedance). In some other embodiments, the power management module 141 can also be set in the processor 110. In other embodiments, the power management module 141 and the charging management module 140 can also be set in the same device.
[0045] The wireless communication function of the electronic device can be implemented through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modem processor and baseband processor.
[0046] The electronic device implements display functionality through a GPU, display screen 194, and an application processor. A GPU is a microprocessor for image processing that connects display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs that execute program instructions to generate or modify display information.
[0047] Display screen 194 is used to display images, videos, and the like. Display screen 194 includes a display panel. The display panel can 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 MiniLED, a MicroLED, a Micro-oLed, or a quantum dot light-emitting diode (QLED). In some embodiments, electronic device 100 may include one or N display screens 194, where N is a positive integer greater than one.
[0048] The touch sensor 180K, also known as a "touch panel," can be mounted on the display screen 194. The touch sensor 180K and the display screen 194 form a touch screen, also known as a "touch screen." The touch sensor 180K is used to detect touch operations applied to or near the touch sensor.
[0049] In an embodiment of the present application, the electronic device 100 can detect user operations via the touch sensor 180K. User operations can include user touch events, such as a user clicking to jump from one application to another. The display 194 can display the application interface and the screen during the jump process.
[0050] Optionally, the user operation may be an air operation. For example, the electronic device may be equipped with a gesture sensor that can detect the user's air operation. The air operation may be an operation such as launching an application or jumping between applications. The electronic device may determine the air operation through the gesture sensor.
[0051] FIG1B is a schematic diagram of the software structure of an electronic device provided in an embodiment of the present application.
[0052] As shown in FIG1B , the software framework of the electronic device involved in the present application may include an application layer, an application framework layer (framework, FWK), a system library, an Android runtime, a hardware layer and a kernel layer (kernel).
[0053] The application layer may include a series of application packages, such as gallery, email, text messages, camera, communication software, video software, call and other applications (also referred to as applications, some of which are not shown). In the embodiment of the present application, the application can be any application in the application layer, and the user can open and close the application and perform operations in the application.
[0054] The application framework layer provides an application programming interface (API) and programming framework for applications in the application layer. The application framework layer includes some predefined functions.
[0055] As shown in FIG. 1B , the application framework layer may include system services and input framework modules, etc.
[0056] System services are a set of core functional services provided by the FWK layer to support various application needs. These functional services can be called by other modules and applications. System services can include the Window Manager Service (WMS) and the Activity Manager Service (AMS).
[0057] WMS is used to manage window programs. WMS manages all windows, including creation, deletion, and modification.
[0058] AMS is mainly responsible for tracking and managing the activity status of the application. In other words, AMS can manage the life cycle of the activity.
[0059] An activity is an interface for interacting with the user, providing a window for the user to complete related operations. For example, when a user clicks the icon of the first application on the electronic device's desktop, the electronic device needs to launch the first application. The electronic device then creates and launches the main process of the first application. The main process of the first application then loads an activity corresponding to an interface 1. The user interacts with the activity's corresponding interface 1 to display a new interface. Window states can include visible and invisible. A visible window is not user-interactive; an invisible window is user-interactive.
[0060] The Android system manages activities through the Activity stack, while activities themselves are managed through lifecycle methods. A typical activity lifecycle involves user interaction, with the activity going through the normal lifecycle process of creation, running, stopping, and destruction. Different lifecycles correspond to different states. The following are some specific activity states:
[0061] Active / running state: The activity is at the top of the stack and is visible and can be interacted with by the user.
[0062] Paused: When an activity loses focus, or is placed on the top of the stack by a new, non-full-screen activity or a transparent activity, it enters the Paused state. At this point, the activity cannot interact with the user, and all its state information and member variables are retained. It may only be recycled by the system if system memory is low.
[0063] Stopped state: When an Activity is completely covered by another Activity, the covered Activity will enter the Stopped state. At this time, the Activity is invisible and retains all its state information and its member variables.
[0064] Killed state: When the Activity is recycled by the system, the Activity is in the Killed state.
[0065] The above-mentioned Activity life cycle states are introduced. The following describes the execution method of converting different state life cycles and explains its calling process.
[0066] onStart: This method callback indicates that the activity is starting. The activity is already visible, but it has not yet been displayed in the foreground, so it cannot interact with the user. It can be understood as the activity is displayed but the user has not yet seen it.
[0067] onResume: When this method is called back, the Activity is already visible in the foreground and can interact with the user (in Active / Running state).
[0068] onPause: This method is called back to indicate that the Activity is stopping and is in the Paused state.
[0069] onStop: Usually executed after onPause is completed, indicating that the Activity is about to stop or is completely covered (Stopped). At this time, the Activity is invisible and only runs in the background.
[0070] onDestroy: The Activity is being destroyed and is in the Killed state. It is also the last execution method in the life cycle.
[0071] The main thread of the application can be responsible for handling the drawing and display of the animation. After the application receives the jump event, it can execute the animation settings and schedule the view system to execute the jump image drawing to facilitate the display of subsequent animation images.
[0072] The input framework module can receive user actions reported by touch sensors or gesture sensors and report them to the application. For example, a touch sensor can detect touch events. Touch events can include jump events. The touch sensor reports the touch events to the input framework module, which then reports the touch events to the application.
[0073] The Android runtime includes the core library and the virtual machine. The Android runtime is responsible for scheduling and management of the Android system.
[0074] The core library consists of two parts: one is the function that needs to be called by the Java language, and the other is the Android core library.
[0075] The application layer and application framework layer run in a virtual machine. The virtual machine executes Java files in the application layer and application framework layer as binary files. The virtual machine manages object lifecycles, stack management, thread management, security and exception management, and garbage collection.
[0076] The system library can include multiple functional modules, such as a surface manager, media libraries, a 3D image processing library (e.g., OpenGL ES), a 2D graphics engine (e.g., SGL), and an image rendering module.
[0077] The surface manager is used to manage the display subsystem and provide fusion of 2D and 3D layers for multiple applications.
[0078] The media library supports playback and recording of a variety of common audio and video formats, as well as static image files. The media library can support a variety of audio and video encoding formats, such as MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
[0079] The 3D image processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.
[0080] A 2D graphics engine is a drawing engine for 2D drawings.
[0081] The image drawing module can draw the window layer in the dynamic image.
[0082] The kernel layer is the foundation of the Android operating system, and all of the Android operating system's ultimate functionality is implemented through the kernel layer. The kernel layer includes at least the display driver. The display driver retrieves rendered and synthesized image frames from the buffer and controls the display to display them sequentially.
[0083] The hardware layer may include a display, graphics processing unit (GPU), touch sensor, memory, and so on. The touch sensor can detect jump events caused by a user's touch operation. The display can display the image frame of the startup window. The graphics processor can perform image rendering and compositing. The central processing unit (CPU) can draw the image.
[0084] It should be noted that the software structure diagram of the electronic device shown in FIG1B provided in this application is merely an example and does not limit the specific module divisions within the different layers of the Android operating system. For details, please refer to the introduction of the Android operating system software structure in conventional technology. In addition, the shooting method provided in this application can also be implemented based on other operating systems, and this application will not cite examples one by one.
[0085] 2A to 2F are a set of user interface schematic diagrams exemplarily disclosed in an embodiment of the present application.
[0086] FIG2A exemplarily shows a user interface diagram of an electronic device. A user turns on their electronic device, and the display screen of the electronic device displays the desktop of the electronic device, i.e., the user interface 210. As shown in FIG2A , the user interface 210 may include an icon of at least one application (e.g., a clock, a calendar, a gallery, a memo, a file manager, an email, music, a calculator, a communication software 211, sports health, weather, a browser, a camera, an address book, a phone call, and text messages, etc.). The position of the application icon and the corresponding application name can be adjusted according to the user's preferences, and this application is not limited thereto.
[0087] It should be noted that the interface diagram of the electronic device shown in FIG2A is an exemplary display of an embodiment of the present application. The interface diagram of the electronic device may also be in other styles, and the present application does not limit this.
[0088] 2A , a user may click on a communication software 211 control in a user interface 210. In response to the user's operation of clicking on the communication software 211 control, a user interface 220 for opening the communication software 211 control may be displayed.
[0089] As shown in FIG2B , user interface 220 is a chat list interface of the communication software. The chat list interface includes a MAC option 221. A user clicks MAC option 221 to open a chat interface with the MAC. As shown in FIG2C , in response to the user clicking MAC option 221, the electronic device may display user interface 230.
[0090] As shown in FIG2C , the MAC shares a video link 231 in the user interface 230. If the user wants to view the video, the user can click on the video link 231. In response to the user's operation of clicking on the video link 231, the electronic device can display a user interface 240.
[0091] As shown in FIG2D , a control 241 for jumping to a video application is displayed in user interface 240. When a user clicks control 241 for jumping to a video application, the electronic device may display a startup window in response to the above operation. It should be noted that the user may also click other locations on user interface 240, and the electronic device may display a startup window (user interface 250). This application does not limit the specific user operation.
[0092] As shown in Figure 2E , in response to the operation in user interface 240, the electronic device may display user interface 250, which includes a startup window 251. Startup window 251 may include a message requesting a redirection: "You are about to leave the communication software and open the video software," as well as a "Cancel" control and an "Allow" control. The "Cancel" control is used to avoid redirection and maintain the display of the communication software; the "Allow" control is used to switch from the communication software to the video software. If the user clicks the "Allow" control, the electronic device switches from the communication software to the video software in response to the above operation.
[0093] As shown in FIG2F , in response to clicking the “Allow” control, the electronic device displays a user interface 260. The user interface 260 may include a first video, which is the video corresponding to the video link 231. The user can click the play control in the user interface 260 to watch the first video.
[0094] After the user clicks the "Allow" control, the electronic device will continue to display user interface 240 for a period of time, and then directly display user interface 260. The user can clearly perceive the period of time during which user interface 240 is displayed. Therefore, the screen remains unchanged for a long time during the response waiting period, and the user can perceive the lag during the device response jump process, which is a poor user experience.
[0095] The specific content of the operations and displays during the above-mentioned application interface jump process is merely an exemplary description. The applications before and after the jump can also be other applications, and this application does not limit this. In addition, the user's operation type is a click touch operation, but it can also be other methods, for example, the operation method can also be a user gesture, voice, etc., and this application does not limit this. In addition, the process before and after the jump in Figures 2A to 2F is merely an exemplary description, and this application does not limit this.
[0096] As shown in Figure 3, in combination with the application interface jump process of Figures 2A to 2F, the embodiment of the present application discloses a flow chart of a method for interface display. As shown in Figure 3, the application jump method may include but is not limited to the following steps:
[0097] This embodiment of the present application involves a jump between two applications. A first application is currently running, the electronic device's user interface displays the first application's window, and the system service contains activity 1 of the first application, which is active. The electronic device is not running a second application, and no activity of the second application exists in the electronic device's task stack.
[0098] S301: The touch sensor detects a first operation.
[0099] The first operation is an operation that triggers a jump from the first application to the second application. For example, in Figure 2E , the user clicks the "Allow" control. The specific method of the first operation for jumping between different applications varies. This application is only an example and does not limit this.
[0100] As shown in FIG4B , at time T1 , the electronic device displays a first window screen of a first application. The user clicks a control for jumping to a second application, and the touch sensor detects a first operation.
[0101] S302: The touch sensor sends a first event to the input framework module.
[0102] The touch sensor sends a first event to the input framework module. Correspondingly, the input framework module receives the first event from the touch sensor. The first event may include, among other things, the touch location (coordinates). After receiving the first event, the input framework module determines that the first event should be handled by the first application based on the current display window being the display window of the first application.
[0103] S303: The input framework module sends a first event to the first application.
[0104] After receiving the first event, the input framework module may send the first event to the first application. Correspondingly, the first application receives the first event from the input framework module.
[0105] S304: The first application sends jump event information to the system service.
[0106] After receiving the first event, the first application determines that a process of the second application needs to be started based on the first event, that is, starts the jump processing process.
[0107] The first application can send a jump event message to the system service. Correspondingly, the system service can receive the jump event message from the first application. The jump event message is used to indicate the exit of the first application window to the paused state. For example, the cover of the video corresponding to the link in Figure 2C.
[0108] S305: The first application sends a second application startup request to the system service.
[0109] The first application can also send a second application startup request to the system service. Correspondingly, the system service receives the second application startup request from the first application. The second application startup request is used to request the startup of the second application.
[0110] S306: The system service starts activity scheduling based on the second application start request.
[0111] After receiving the jump event information, the system service can call the start activity inner function (start request start activity scheduling). The start activity inner function is used to start the next application, that is, to start the second application.
[0112] S307: The system service suspends the first activity activity1.
[0113] After receiving the redirect event, the system service can pause the main thread of the current first application and activity 1. The system service can execute the onPaused callback on activity 1, causing activity 1 to change from the active state to the paused state. The user interface of the electronic device displays the window of the first application in a non-interactive state.
[0114] After the system service suspends the first activity, it may determine that it needs to jump from the first application to the second application. The system service needs to determine whether there is subject information indicated as the first attribute. In the case that there is subject information indicated as the first attribute (the first application is set with the first attribute), the system service determines that there is no need to display the startup window between the first application and the second application. In the case that there is no subject information indicated as the first attribute (the first application is not set with the first attribute), the system service determines that it is necessary to display the startup window between the first application and the second application. In the embodiment of the present application, since the first application is set with the first attribute to jump to other applications. When the system service of the electronic device determines that the API of the first application is set with the first attribute, the system service does not add the startup window corresponding to starting other applications during the jump process. Among them, the first attribute is the setting attribute of not displaying the startup window (of other applications) when jumping from the first application to other applications (starting and displaying the window of other applications).
[0115] For example, because the system service reads the first attribute, the system service cannot generate a startup window.
[0116] S308: The system service sends a process start request to the second application.
[0117] After receiving the second application startup request, the system service needs to send a process startup request to the second application. Correspondingly, the second application receives the process startup request from the system service. The process startup request is used to instruct the second application to start.
[0118] S309: The second application starts the first process.
[0119] After the second application receives the process start request from the system service, it can create a first process of the second application, which can be a process in the main thread of the second application. Afterwards, the electronic device can call the bind application function to initialize and fill in the first process.
[0120] S310: The second application processes the second window screen of the first process.
[0121] After the second application starts the first process, it may first execute a process of starting the first window screen of the first process.
[0122] Specifically, the second application starts the lifecycle of the second activity acitivity2, calling the onStart function and the onResume function. After acitivity2 is started, the window of the second application is adjusted to a visible state. Currently, because the second window screen of the second application has not yet been displayed, the user cannot interact with the second application.
[0123] The second window screen is the first frame window screen displayed by the second application.
[0124] S311: The second application obtains the first frame data when the second application is started.
[0125] After the activation of the second application is complete, the first frame data of the second application screen can be obtained. Specifically, the second application can call the doFrame function.
[0126] S312: The second application sends a preparation completion notification to the system service.
[0127] The second application can send a preparation completion notification to the system service. Correspondingly, the system service can receive the preparation completion notification from the second application. The preparation completion notification is used to notify the system service to start drawing the image.
[0128] S313: The system service determines that the process is ready based on the preparation completion notification.
[0129] After receiving the preparation completion notification, the system service can determine that the second application is ready to be processed and can start displaying.
[0130] S314: The system service sends image drawing information to the image processing module.
[0131] After the system service is ready, it can send image drawing information to the image processing module. Correspondingly, the image processing module can receive image drawing information from the system service. The image drawing information may include information for drawing and processing images, such as window size, etc.
[0132] The image drawing information is used to instruct drawing a second window screen of the second application.
[0133] S315: The image processing module performs image rendering based on the image rendering information to obtain image information.
[0134] After receiving the image drawing information, the image processing module can generate, render, and synthesize the image based on the image drawing information to obtain image information. The image processing module can be a system library including a media library, a 2D image engine, a surface manager, and a 3D image processing library. The image processing module can complete the rendering of the image drawn by the application (the actual processing hardware can be a GPU) and synthesize the rendered layers (specifically, this can be performed by SurfaceFlinger) to obtain image information. After obtaining the image information, the image information can be cached in a display buffer and wait for display.
[0135] At this time, the image information is image information of the second window screen of the second application.
[0136] S316: The image processing module sends a display notification to the display.
[0137] After the image processing module completes the drawing, it can send a display notification to the display. The display can receive the display notification from the image processing module. The display notification can indicate that the image processing module has completed the drawing and can start displaying.
[0138] S317: The display performs display based on the image information.
[0139] After the display receives the dynamic image display instruction, it can obtain the dynamic image from the display buffer and display the dynamic image in the buffer. After the electronic device displays the second window screen, the user can interact with the second application.
[0140] As shown in FIG. 2F , the screen currently displayed on the display is the user interface 260 .
[0141] In the embodiment of Figure 3 , after the first operation, the electronic device needs to pause the activity of the first application. Because the first attribute information has been pre-set in the first application, the electronic device cannot immediately respond to the first operation. Instead, it must wait until the first frame of the second window of the second application is drawn before it can display the screen switched from the first application to the second application. The startup window cannot be displayed during the switching process.
[0142] 4A and 4B are a set of timing diagrams of user interface displays.
[0143] As shown in Figure 4A, before time T1, the electronic device displays the first application. At time T1, the user performs a first operation (the click operation can refer to the relevant description of Figure 2E, which is not repeated here). In response to the first operation, the electronic device needs to wait for a first duration. During the first duration, the electronic device continues to display the user interface of the communication software (first application) (as shown in Figure 2D). Starting from time T2, the electronic device begins to respond to the first operation and displays the user interface of the video software (second application) (as shown in Figure 2F). The electronic device completes the process of jumping from the user screen of the first application to the second window screen of the second application.
[0144] In the electronic device display process in FIG4A , a first waiting time, for example, 900ms, is required from the user initiating the first operation to the display interface starting to change. If the first waiting time is too long, the user can clearly perceive the display process as a lag, resulting in a poor user experience.
[0145] To address the above-mentioned issues, embodiments of the present application provide an interface display method and electronic device. When the electronic device receives a jump event for a first operation, the electronic device can display the waiting time for the response display, thereby avoiding display freezes and improving the user's interactive experience.
[0146] For example, as shown in Figure 4B, before time T1, the first application interface includes a startup window (as shown in Figure 2E). At time T1, the user performs the first operation (the click operation can refer to the relevant description of Figure 2E, which is not repeated here). After time T1, in response to the first operation, the electronic device needs to wait for a second duration. During the second duration, the electronic device continues to display the user interface of the communication software (first application) (as shown in Figure 2D). Starting from time T3, the electronic device begins to respond to the first operation and displays the jump dynamic screen. The first window screen of the first application begins to slide to the left, followed by the second window screen of the second application on the right, until the jump interface is fully displayed. Starting from time T2, the electronic device begins to display the user interface of the video software (second application) (as shown in Figure 2F), and the electronic device completes the process of jumping from the user screen of the first application to the second window screen of the second application. For example, the second duration is 90ms, and the waiting time for display is greatly shortened. With a waiting time of 90ms, the user can hardly feel the lag.
[0147] Comparing the display processes of FIG. 4A and FIG. 4B , the response waiting time of the electronic device is shortened, and a startup window is added during the response process, so that the user does not perceive obvious freezes in the screen, thereby improving the user experience.
[0148] FIG5A and FIG5B are a set of user interface schematic diagrams exemplarily disclosed in an embodiment of the present application.
[0149] In the embodiment of the present application, the display interface of the electronic device in the communication software (first application) and the video software (second application) is the same as Figures 2A to 2E. After Figure 2E, in response to the first operation in Figure 2E, as shown in Figure 5A, the electronic device may first display the user interface 510. The startup window of the user interface 510 may include a startup icon 511 for the second application. Of course, different types of software will display different screen contents of the user interface 260 of the video application.
[0150] Optionally, in response to the first operation in FIG2E , during the switching process, the user interface of the electronic device may display a portion of the first window screen and a portion of the startup window screen; the user interface of the electronic device may then display the startup window but not the first window screen; and finally, the user interface of the electronic device may display the second window screen. This increases the smoothness of the sliding process, ensures display continuity, and enhances the user's sense of interaction.
[0151] Specifically, as shown in Figure 5B, the electronic device may first display the switching effect from the first application to the startup window (user interface 520 in Figure 5B), then display the complete startup window (user interface 510 in Figure 5A), and finally display the second window screen of the second application (user interface 260 in Figure 2F). This is equivalent to the user interface 240 (first window screen) of the first application starting to slide to the left, accompanied by the user interface 520 of the startup window starting to slide from the right into the display window. During the switching effect process, as shown in Figure 5B, the user interface 520 may include a window screen 522 and a window screen 521. The window screen 522 is the right part of the first window screen of the first application, and the window screen 521 is the left part of the startup window. When the switching effect display ends, the electronic device displays the user interface 510, which does not include the window screen 522, but includes the complete window screen 521 (the screen of the startup window). Afterwards, the second application display interface of the electronic device is loaded and the user interface 260 in Figure 2F can be displayed.
[0152] The screen of the startup window can be a screen for launching the second application, an application icon screen, a floating screen, a wallpaper screen, a splash screen advertisement, etc. This application does not limit the specific display content of the startup window.
[0153] FIG6 is a flow chart of another method for interface display disclosed in an embodiment of the present application.
[0154] The method of FIG. 6 is described in detail below with reference to FIG. 2A to FIG. 2E , FIG. 3 , FIG. 5A and FIG. 5B . The interface processing method may include but is not limited to the following steps:
[0155] Similarly, in an embodiment of the present application, an electronic device has a first application and a second application installed, and a jump is required between the two applications. The first application is currently in an activated state, the first user interface displays the interface of the first application, and the system service has activity 1 of the first application, and activity 1 is in an active state. The electronic device is not running the second application, that is, no activity of the second application is running in the background of the electronic device.
[0156] S601: The touch sensor detects a first operation.
[0157] S602: The touch sensor sends a first event to the input framework module.
[0158] S603: The input framework module sends a first event to the first application.
[0159] S604: The first application sends jump event information to the system service.
[0160] S605: The first application sends a second application startup request to the system service.
[0161] S606: The system service starts activity scheduling based on the second application start request.
[0162] S607: The system service suspends the first activity.
[0163] Among them, the relevant descriptions of S601 to S607 can refer to the relevant descriptions of S301 to S307, and this application will not repeat them here.
[0164] S608: The system service sends a process start request to the second application.
[0165] S609: The second application starts the first process.
[0166] Among them, the relevant descriptions of S608 to S609 can refer to the relevant descriptions of S308 to S309, and this application will not go into details here.
[0167] S610: Add a startup window for the system service.
[0168] After the system service receives the process start request, it can add a starting window, that is, it can call the add starting window function.
[0169] S611: The system service starts and sets the second window screen to be visualized.
[0170] The system service can start the second window screen and set the second window screen to a visible state. Specifically, the system service can call a shuoldbevisible function.
[0171] The second window screen is a window interface displayed by the second application.
[0172] The visualization means displaying the corresponding window screen; the non-visualization means not displaying the corresponding window screen.
[0173] S612: The system service sets the first window screen to be non-visualized.
[0174] The system service sets the first window screen to a non-visual state. The first window screen is the user interface displayed by the first application. After the system service sets the first window screen to be non-visual, the electronic device can overlay other window screens on the first window screen, for example, overlaying a blank window on the first window screen, or overlaying a startup window on the first window screen. The first window screen is the window screen displayed by the first application.
[0175] During the execution of S611 and S612, the electronic device may immediately execute the processing process for the first window screen after pausing the first activity, so as to ensure the speed and timeliness of the motion effect response.
[0176] S613: The system service determines whether the first attribute is set in the first application. If the first attribute is set, the first attribute is ignored and the execution continues to S614; if the first attribute is not set, no processing is performed and the execution continues to S614.
[0177] Among them, the first attribute includes at least one of a transparent attribute (window is translucent), a disabled floating attribute (window is floating) and a disabled wallpaper attribute (window show wallpaper). Among them, the first attribute is a setting attribute for not displaying the startup window (of other applications) when jumping from the first application to other applications (starting and displaying the windows of other applications). For example, as shown in Figure 4A, the electronic device jumps from the first application to the second application, does not display the startup interface of the second application, but directly waits until the second window screen starts. The transparent attribute indicates that the startup window is displayed in a transparent state, the disabled floating attribute indicates that the startup window is not displayed in a floating form, and the disabled wallpaper attribute indicates that the startup window is not displayed in a wallpaper form. Among them, each attribute in the first attribute indicates that the startup window is not displayed.
[0178] Specifically, if the first application stores setting information for a first attribute, the first application is set with the first attribute; if the first application stores setting information for the first attribute, the first application is not set with the first attribute. The setting information for the first attribute can be understood as any one of a transparent attribute, a disabled floating attribute, and a disabled wallpaper attribute.
[0179] The first application is configured with an API open to other applications, and the first application can jump to the second application through the API. The first application can be configured with a first attribute for jumping to other applications. If the system service of the electronic device determines that the first application is configured with the first attribute, during the jump process, the system service does not add a startup window corresponding to launching the other application.
[0180] For example, if the communication software sets the attribute of jumping to the first activity as transparent, when jumping from the communication software to the video software, the electronic device determines that the transparent attribute is set, and can delete or ignore the transparent attribute and continue to execute S614.
[0181] S614: The system service determines that the jump is ready.
[0182] When the second application is started and the first attribute of the first application is completed, the system service determines that the jump is ready and can start requesting to draw the startup window.
[0183] S615: The system service sends first image drawing information to the image processing module.
[0184] The first image drawing information is drawing information requesting a startup window of the second application.
[0185] S616: The image processing module performs image rendering based on the image rendering information to obtain first image information.
[0186] The first image information may include image information including a startup window.
[0187] In the embodiment of the present application, the startup window and the start window are both intermediate screens when the window screen of the first application jumps to the window screen of the second application, and can be the startup screen displayed when the second application is started.
[0188] S617: The image processing module sends a first display notification to the display.
[0189] S618: The display displays the first image information.
[0190] The electronic device may display a startup window, such as the user interface 510 shown in FIG5A . Of course, the first image information may be a plurality of continuous dynamic effect pictures, and the electronic device may display the dynamic effect process of switching from the first window picture (user interface 520) to the startup window (user interface 510).
[0191] The processing of S614 to S618 may refer to the relevant contents of S313 to S317 and will not be described in detail.
[0192] S619: The second application processes the second window screen of the first process.
[0193] S620: The second application obtains the first frame data when the second application is started.
[0194] S621: The second application sends a preparation completion notification to the system service.
[0195] S622: The system service determines that the process is ready based on the preparation completion notification.
[0196] S623: The system service sends the second image drawing information to the image processing module.
[0197] S624: The image processing module performs image rendering based on the second image rendering information to obtain second image information.
[0198] S625: The image processing module sends a second display notification to the display.
[0199] S626: The display performs display based on the second image information.
[0200] Among them, the relevant descriptions of S619 to S626 can refer to the relevant descriptions of S310 to S317 in Figure 3, and are not repeated here.
[0201] In the above-mentioned implementation, when the electronic device switches from the first application to the second application, the first attribute set by the first application can be ignored. For the jump process of the second application that has not yet been run, the electronic device can add a startup window to respond to user operations more quickly, ensuring faster response speed, shorter delay, and better user experience.
[0202] FIG7A and FIG7B are a set of application jump processing timing diagrams exemplarily disclosed in an embodiment of the present application.
[0203] As shown in FIG7A , combined with the method flow of FIG3 , the processing of the electronic device in each process is described as follows in the time sequence from time K1 to time K4:
[0204] At time K1, the electronic device receives a first operation, starts processing the touch event of the first operation after time K1, and completes the processing before time K2.
[0205] After K2, based on the touch event, the electronic device pauses the first activity of the first application, determines that the first application has the first attribute set, cannot add a startup window, and needs to wait for the first frame data for starting the second application. The jump process can be displayed only after the drawing is completed.
[0206] After time K3, the electronic device may confirm that the drawing is completed and notify the user to start displaying the second window screen of the second application.
[0207] After time K4, the electronic device may start to display the second window screen.
[0208] 3 and 7A , the electronic device needs to wait from time K1 to time K4 after receiving the first user operation, which takes about 900ms or more. If the interface of the second window is more complex, the time taken will be even longer.
[0209] As shown in FIG7B , combined with the method flow of FIG6 , the processing of the electronic device in each process is described as follows in the time sequence from time K1 to time K4:
[0210] At time K1, the electronic device receives a first operation, starts processing the touch event of the first operation after time K1, and completes the processing before time K2.
[0211] After the K2 moment, based on the touch event, the electronic device pauses the first activity of the first application and needs to wait for the first frame data for starting the second application. The jump process can be displayed only after the drawing is completed.
[0212] After time K5, it is determined that the first application is set with the first attribute, the first attribute is ignored, the startup window is still added, and the startup window of the second application begins to be displayed.
[0213] After time K3, the electronic device may confirm that the drawing of the first frame of the second window screen is completed, and notify the user to start displaying the second window screen of the second application.
[0214] After time K4, the electronic device may start to display the second window screen.
[0215] Combined with the display processing corresponding to Figures 6 and 7B, the electronic device needs to wait from moment K1 to moment K5 after receiving the user's first operation, which takes about 90ms. The waiting time is shortened to about one-tenth of the original time. Generally, users can feel the time when the display interface is stuck at about 155ms. As a result, the response time is shortened, and users cannot perceive the situation of response processing being stuck, which significantly improves the user interaction experience.
[0216] As used in the above embodiments, the term “when…” may be interpreted to mean “if…” or “after…” or “in response to determining…” or “in response to detecting…”, depending on the context. Similarly, the phrases “upon determining…” or “if (stated condition or event) is detected” may be interpreted to mean “if determining…” or “in response to determining…” or “upon detecting (stated condition or event)” or “in response to detecting (stated condition or event)”, depending on the context.
[0217] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) method. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrations. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk).
[0218] Those skilled in the art will appreciate that all or part of the process steps in the above-described method embodiments can be implemented by a computer program instructing the relevant hardware. The program can be stored in a computer-readable storage medium, and when executed, the program can include the process steps in the above-described method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as ROM or random access memory (RAM), magnetic disks, or optical disks.
Claims
1. An interface processing method, characterized in that, The method is applied to an electronic device, which is installed with a first application and a second application. The method includes: The electronic device runs the first application. When a first window screen of the first application is displayed on the user interface of the electronic device, a first operation by the user to start the second application is received. When a first attribute is set in the first application, during the process of the electronic device starting and running the second application in response to the first operation, the user interface sequentially displays a startup window and a second window screen of the second application. The startup window is an intermediate interface for starting the second application. The first attribute is used to indicate that the startup window is not displayed.
2. The method according to claim 1, wherein The first attribute includes at least one of a transparency attribute, a floating-disabling attribute, and a wallpaper-disabling attribute. The transparency attribute means that the startup window is displayed in a transparent state. The floating-disabling attribute means that the startup window is not displayed in a floating form. The wallpaper-disabling attribute means that the startup window is not displayed as a wallpaper form.
3. The method according to claim 1 or 2, characterized in that, The method further includes: When the first attribute is not set in the first application, in response to the first operation, the startup window and the second window screen are sequentially displayed.
4. The method according to claim 1 or 2, characterized in that, The method further includes: In response to the first operation, the electronic device determines whether the first application is set with the first attribute. When the first application stores setting information of the first attribute, the first application is set with the first attribute. When the first application stores setting information of the first attribute, the first application is not set with the first attribute.
5. The method according to any one of claims 1 to 4, characterized in that, The method further includes: The electronic device, in response to the first operation, sets the second window screen to be visual and sets the first window screen to be non-visual. Wherein, the visual is used to indicate the display of a window screen. The non-visual is used to indicate the non-display of a window screen.
6. The method according to claim 5, wherein Before setting the second window screen to be visual and setting the first window screen to be non-visual, the method further includes: Pausing a first activity of the first application.
7. The method according to claim 6, wherein After pausing the first activity of the first application, the method further includes: Starting a second activity of the second application and obtaining first frame data for starting the second application. When the first frame data is obtained, the image information of the second window screen is drawn.
8. The method according to claim 7, wherein The electronic device further includes a system service. Pausing the first activity of the first application includes: After the first application receives the first operation by the user to start the second application, the system service pauses the first activity of the first application. The method further includes: The system service sends a process startup request to the second application. The process startup request is used to request starting the process of the second application, and the second application starts a first process. Setting the second window screen to be visual and setting the first window screen to be non-visual includes: The system service sets the second window screen to be visual and sets the first window screen to be non-visual. Starting the second activity of the second application and obtaining first-frame data for starting the second application includes: The system service starts the second activity of the second application and obtains first-frame data for starting the second application.
9. The method according to claim 4, characterized in that The electronic device further includes a system service and a system library. The electronic device determines whether the first application is set with the first attribute, including: The system service determines whether the first application is set with the first attribute; The method further includes: When the first application is set with the first attribute, the system service requests the system library to draw image information of the startup window.
10. The method according to any one of claims 1-9, characterized in that, Successively displaying the startup window and the second window screen of the second application on the user interface includes: At a first moment, displaying a partial screen including the first window screen and a partial screen of the startup window on the user interface; At a second moment, displaying the startup window on the user interface, excluding the first window screen; At a third moment, displaying the second window screen on the user interface.
11. An electronic device, characterized in that, Including: One or more processors and one or more memories; the one or more processors are coupled to the one or more memories, and the one or more memories are used to store computer program code. The computer program code includes computer instructions. When the one or more processors execute the computer instructions, the electronic device executes the method according to any one of claims 1-10.
12. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program. When the computer program is executed by a processor, the method according to any one of claims 1-10 is implemented.