A method, apparatus, device, and storage medium for switching application interfaces.
By creating a resident image carrier and display controller in the Android automotive project, a seamless switching of the application interface was achieved, solving the problem of multi-application integration, providing a smooth visual experience and reducing system resource consumption.
Patent Information
- Application Number
- CN202411853044.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-16
- Publication Date
- 2026-01-30
- Estimated Expiration
- 2044-12-16
AI Technical Summary
In Android automotive projects, existing technologies struggle to provide users with a smoother and more immersive visual experience when switching between applications without integrating multiple applications into a single application. Traditional methods may result in a black background or a splash screen, negatively impacting the visual experience.
By creating a resident image carrier and a corresponding display controller, the first application interface is displayed on the terminal device screen, and when switching to the second application interface, the carrier level is raised and a preset animation is played, achieving a seamless switching effect.
Without modifying the operating system source code, it provides a smoother and cooler application switching experience, reduces the consumption of the central processing unit and graphics processing unit, and reduces memory usage.
Smart Images

Figure CN119781886B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of vehicles, the technical field of operating systems, and the technical field of computers, and in particular relates to an application interface switching method and device, an electronic device, and a storage medium. BACKGROUND
[0002] In an Android (an operating system) vehicle project, a one-shot-to-end animation effect for switching between applications is an important requirement. For example, a 3D vehicle model image is displayed in both a Launcher (a desktop launcher of the Android system) desktop and a 360 ring shadow parking application, and when the applications are switched, it is expected that a Kanzi (a 3D human-computer interaction solution), a Unity (a cross-platform development engine), a Cocos (a series of development frameworks and tools), or even a common video player plays an animation to show a cool and smooth one-shot-to-end switching effect. The traditional application switching effect may first display a black background when the Android picture is not loaded, or first display a start page of the application, and then display the vehicle model image, so that the transition picture switching is very abrupt and the visual experience is not smooth.
[0003] In the related art, a page requiring a one-shot-to-end switching effect is generally integrated into an application, and a SurfaceView (an image picture, a carrier for drawing a Surface in an application) is used as an application background. A 3D picture is drawn or a switching animation is played on the SurfaceView. However, due to business relations or code maintenance considerations, many times, multiple applications cannot be integrated into one application to realize the one-shot-to-end switching effect.
[0004] Therefore, how to realize a more smooth and cool visual experience for a user when switching between applications without integrating multiple applications into one application is an urgent problem to be solved. SUMMARY
[0005] Embodiments of the present application provide an application interface switching method and device, an electronic device, and a storage medium, to solve the problem of how to realize a more smooth and cool visual experience for a user when switching between applications without integrating multiple applications into one application.
[0006] To solve the above problems, the embodiment of the present application discloses a switching method of application interface, which is applied to interface display service, and the method comprises the following steps: creating a resident image carrier; the resident image carrier has a corresponding resident display controller, and the resident image carrier has a corresponding carrier level on the screen of a terminal device; displaying a first application interface on the screen through the resident display controller; in the case of switching the first application interface to a second application interface, increasing the carrier level to the upper layer of the first application interface, and playing a preset animation on the screen through the resident image carrier; switching the first application interface to the second application interface; displaying the second application interface on the screen through the resident display controller.
[0007] The embodiment of the present application further discloses a switching device of application interface, which is applied to interface display service, and the device comprises the following modules: a resident image carrier creating module, which is used to create a resident image carrier; the resident image carrier has a corresponding resident display controller, and the resident image carrier has a corresponding carrier level on the screen of a terminal device; a first application interface displaying module, which is used to display a first application interface on the screen through the resident display controller; a preset animation playing module, which is used to increase the carrier level to the upper layer of the first application interface in the case of switching the first application interface to a second application interface, and play a preset animation on the screen through the resident image carrier; an application interface switching module, which is used to switch the first application interface to the second application interface; a second application interface displaying module, which is used to display the second application interface on the screen through the resident display controller.
[0008] The embodiment of the present application further discloses an electronic device, which comprises a processor and a memory having executable code stored thereon, when the executable code is executed, the processor executes the switching method of application interface as described in one or more embodiments of the present application.
[0009] The embodiment of the present application further discloses one or more machine readable media having executable code stored thereon, when the executable code is executed, the processor executes the switching method of application interface as described in one or more embodiments of the present application.
[0010] The method provided by the embodiment of the present application has the following advantages:
[0011] In the embodiment of the present application, a resident image carrier is created; the resident image carrier has a corresponding resident display controller, and the resident image carrier has a corresponding carrier level on the screen of the terminal device; the first application interface is displayed on the screen through the resident display controller; in the case where the first application interface needs to be switched to the second application interface, the carrier level is raised to the upper layer of the first application interface, and a preset animation is played on the screen through the resident image carrier; the first application interface is switched to the second application interface; the second application interface is displayed on the screen through the resident display controller. The embodiment of the present application realizes a more smooth and cool visual experience for users when switching applications without integrating multiple applications into one application. The embodiment of the present application also avoids modification of the source code of the operating system, realizes the one-shot effect of the application switching animation through the background interface display service, and has less impact on the safety of the operating system. The 3D vehicle model picture that needs to be displayed by each application can be enabled by the interface display service, which is simple to implement. If the same 3D resource file needs to be displayed in different applications, the interface display service only needs to load one 3D resource file, without the need to integrate each application separately, thereby reducing the memory occupation. The embodiment of the present application only needs to render one resident image carrier, and the consumption of the central processing unit and the graphics processing unit is low. BRIEF DESCRIPTION OF DRAWINGS
[0012] Figure 1 is a step flowchart of an application interface switching method embodiment of the present application;
[0013] Figure 2 is a resident image carrier schematic diagram of an application interface switching method embodiment of the present application;
[0014] Figure 3 is an application switching schematic diagram of an application interface switching method embodiment of the present application;
[0015] Figure 4 is a first application interface display schematic diagram of an application interface switching method embodiment of the present application;
[0016] Figure 5 is an application interface display schematic diagram of an application interface switching method embodiment of the present application;
[0017] Figure 6 is an image picture schematic diagram of different application interfaces of an application interface switching method embodiment of the present application;
[0018] Figure 7 is a second application interface display schematic diagram of an application interface switching method embodiment of the present application;
[0019] Figure 8The software development kit of the application interface switching method embodiment of the application provides a resident image carrier schematic diagram;
[0020] Figure 9 The system structure diagram of the application interface switching method embodiment of the application;
[0021] Figure 10 The system architecture diagram of the application interface switching method embodiment of the application;
[0022] Figure 11 The logic flow diagram of the application interface switching method embodiment of the application;
[0023] Figure 12 The structural block diagram of the application interface switching device embodiment of the application;
[0024] Figure 13 The structural schematic diagram of the device provided by the embodiment of the application. DETAILED DESCRIPTION
[0025] In order to make the above objectives, characteristics and advantages of the application more apparent, comprehensible and easier to understand, the application will be further described in detail below with reference to the drawings and specific embodiments.
[0026] Referring to Figure 1 The step flow diagram of the application interface switching method embodiment of the application includes the following steps:
[0027] Step 101, a resident image carrier is created; the resident image carrier has a corresponding resident display controller, and the resident image carrier has a corresponding carrier level on the screen of the terminal device.
[0028] The application interface switching method shown in the embodiment of the application can be applied to a vehicle-mounted Android operating system. In the embodiment of the application, the application interface switching method can be applied to an interface display service of the Android system. In an embodiment, a Java service can be provided on the vehicle-mounted Android operating system as the interface display service to execute the application interface switching method.
[0029] In step 101, a resident image carrier (Surface) and a corresponding resident display controller (SurfaceControl) can be created in the interface display service, and the resident image carrier has a corresponding carrier level on the screen of the terminal device, that is, a level of displaying images on the resident image carrier on the screen.
[0030] Referring to Figure 2 The resident image carrier schematic diagram of the application interface switching method embodiment of the application.
[0031] As shown in FIG. 1, a resident Surface and a corresponding SurfaceControl are created in a Java service. Figure 2
[0032] Step 102, displaying a first application interface on the screen by the resident display controller.
[0033] In step 102, the first application interface is displayed on the screen by the resident display controller. In an embodiment, the interface display service has a corresponding image data provider, which can draw the display content of the first application interface by the resident image carrier.
[0034] Step 103, in case of switching the first application interface to a second application interface, raising the carrier level of the resident image carrier to the upper layer of the first application interface and playing a preset animation on the screen by the resident image carrier.
[0035] In step 103, when the user needs to switch the first application to the second application, i.e. needs to switch the first application interface to the second application interface, the carrier level of the resident image carrier is raised to the upper layer of the first application interface and a preset animation is played on the screen by the resident image carrier to cover the application switching action below the resident image carrier.
[0036] In an embodiment, a command can be sent to the Java service through Binder (an inter-process communication mechanism in Android system), and after receiving the command information, the Java service raises the carrier level to the upper layer of the first application interface and plays a preset animation on the screen by the resident image carrier.
[0037] Step 104, switching the first application interface to the second application interface.
[0038] In step 104, while the preset animation is played on the screen by the resident image carrier, the first application interface is switched to the second application interface under the cover of the resident image carrier.
[0039] Step 105, displaying the second application interface on the screen by the resident display controller.
[0040] In step 105, the second application interface after switching is displayed on the screen by the resident display controller. In an embodiment, the interface display service has a corresponding image data provider, which can draw the display content of the second application interface by the resident image carrier.
[0041] Referring to Figure 3 FIG. 1 is an application switching schematic diagram of an application interface switching method embodiment of the present application.
[0042] As shown in FIG. 1, when the first application interface needs to be switched to the second application interface, the carrier level of the resident image carrier (3D Surface) is raised to the upper layer of the first application interface, and a preset animation is played on the screen through the resident image carrier to cover the original application switching animation (Original Animation) under the resident image carrier. Figure 3
[0043] In the embodiment of the present application, the resident image carrier is created; the resident image carrier has a corresponding resident display controller, and the resident image carrier has a corresponding carrier level on the screen of the terminal device; the first application interface is displayed on the screen through the resident display controller; in the case where the first application interface needs to be switched to the second application interface, the carrier level is raised to the upper layer of the first application interface, and a preset animation is played on the screen through the resident image carrier; the first application interface is switched to the second application interface; the second application interface is displayed on the screen through the resident display controller. The embodiment of the present application realizes a more smooth and cool visual experience for users when switching applications without integrating multiple applications into one application. The embodiment of the present application also avoids the modification of the operating system source code, realizes the one-shot effect of the application switching animation through the background interface display service, and has less impact on the safety of the operating system. The 3D vehicle model picture that needs to be displayed by each application can be enabled by the interface display service, which is simple to implement. If the same 3D resource file needs to be displayed in different applications, the interface display service only needs to load one 3D resource file, without the need to integrate each application separately, thereby reducing the memory occupation. The embodiment of the present application only needs to render one resident image carrier, and the consumption of the central processing unit and the graphics processing unit is low.
[0044] In an optional embodiment of the present application, the method comprises:
[0045] creating a first image picture in the first application, wherein the first image picture comprises the first application interface;
[0046] using the interface of the first image picture, obtaining a first display controller corresponding to the first image picture;
[0047] receiving the first display controller transmitted by the first application.
[0048] In the embodiment, the SurfaceView (image picture) needs to be prefabricated in the application that has the one-shot switching demand.
[0049] For the first application, a first image surface (SurfaceView1) is created in the first application, and the first image surface includes a first application interface to be displayed. When the application process of the first application is started to the foreground display, the first application can use the public interface of the first image surface to obtain a first display controller (SurfaceControl1) corresponding to the first image surface, and communicate with the interface display service through the Binder mechanism, and pass the first display controller to the interface display service.
[0050] The embodiment of the present application creates a first image surface for the first application, and passes a corresponding first display controller to the interface display service, so as to display the first application interface on the screen of the terminal device through the resident display controller.
[0051] In an optional embodiment of the present application, the resident display controller has a corresponding parent level, and the step 102 comprises:
[0052] resetting the parent level of the resident display controller to the first display controller;
[0053] displaying the first image surface corresponding to the first display controller on the screen.
[0054] In the embodiment, when the first application interface needs to be displayed on the screen of the terminal device, the parent level of the resident display controller of the interface display service is reset to the first display controller of the first application by using the original public method of SurfaceControl, so as to display the first image surface corresponding to the first display controller on the screen. That is, by changing the parent level of the resident display controller to the first display controller of the first application, the first application interface is displayed on the screen.
[0055] Referring to Figure 4 is a first application interface display diagram of an application interface switching method embodiment of the present application.
[0056] As Figure 4 shown, a first image surface (SurfaceView1) is created in the first application, and the first image surface includes a first application interface to be displayed. The first image surface also has a corresponding first display controller (SurfaceControl1), and the first application can pass the first display controller to the interface display service through the Binder mechanism.
[0057] Referring to Figure 5 is an application interface display diagram of an application interface switching method embodiment of the present application.
[0058] As Figure 5When the application process of the first application is started to the foreground display, the parent level of the resident display controller of the interface display service is reparented to the first display controller of the first application, so that the first image picture corresponding to the first display controller is displayed on the screen through a surface flinger.
[0059] The embodiment of the present application only needs to reset the parent level of the resident display controller of the interface display service to the first display controller of the first application when the first application interface needs to be displayed, and does not need to create a new image carrier, so the consumption of the central processor and the graphic processor is low.
[0060] In an optional embodiment of the present application, the method comprises:
[0061] A second image picture is created in the second application, and the second image picture comprises the second application interface;
[0062] An interface of the second image picture is used to obtain a second display controller corresponding to the second image picture;
[0063] The second display controller transmitted by the second application is received.
[0064] In the embodiment, a SurfaceView (image picture) needs to be prefabricated in an application that has a mirror-to-bottom switching demand.
[0065] For the second application, a second image picture (SurfaceView2) is created in the second application, and the second image picture comprises the second application interface that needs to be displayed. When the application process of the second application is started to the foreground display, the second application can use the public interface of the second image picture to obtain a second display controller (SurfaceControl2) corresponding to the second image picture, and communicate with the interface display service through a Binder mechanism, and transmit the second display controller to the interface display service.
[0066] The embodiment of the present application creates a second image picture for the second application, and transmits a corresponding second display controller to the interface display service, so that the second application interface is displayed on the screen of the terminal device through the resident display controller.
[0067] In an optional embodiment of the present application, the resident display controller has a corresponding parent level, and the step 105 comprises:
[0068] The parent level of the resident display controller is reset to the second display controller;
[0069] The second image picture corresponding to the second display controller is displayed on the screen.
[0070] In this embodiment, when it is necessary to display the second application interface on the screen of the terminal device, the native public method of SurfaceControl is used to reset the parent level of the resident display controller of the interface display service to the second display controller of the second application, so as to display the second image screen corresponding to the second display controller on the screen. That is, by changing the parent level of the resident display controller to the second display controller of the second application, the second application interface is displayed on the screen.
[0071] Reference Figure 6 This is a schematic diagram of different application interfaces in an embodiment of the application interface switching method of this application.
[0072] like Figure 6 As shown, a SurfaceView needs to be pre-built in the application that requires a one-shot transition. When a one-shot transition is required between the first application and the second application, a first image screen (SurfaceView1) can be created in the first application, and a second image screen (SurfaceView2) can be created in the second application.
[0073] Reference Figure 7 This is a schematic diagram of the second application interface display according to an embodiment of the application interface switching method of this application.
[0074] like Figure 7 As shown, when the first application interface successfully switches to the second application interface, a second image screen (SurfaceView2) is created in the second application. The second image screen includes the second application interface to be displayed, and also has a corresponding second display controller (SurfaceControl2). The second application can pass the second display controller to the interface display service through the Binder mechanism. When the application process of the second application starts to be displayed in the foreground, the parent level of the resident display controller of the interface display service is reset to the second display controller of the second application, so that the second image screen corresponding to the second display controller can be displayed on the screen through the surface compositer.
[0075] In this embodiment of the application, when it is necessary to display the second application interface, it is only necessary to reset the parent level of the resident display controller of the interface display service to the second display controller of the second application, without creating a new image carrier, and the consumption of the central processing unit and graphics processor is low.
[0076] In one optional embodiment of this application, the screen includes system interface elements, each system interface element having a corresponding display area node, and the method further includes:
[0077] in a case where the first application interface needs to be switched to the second application interface, changing the parent level of the resident display controller to the display area node;
[0078] displaying the system interface element corresponding to the display area node on the screen.
[0079] In this embodiment, when switching the application interface, the parent level of the resident display controller is changed to the display area node of the screen, and the display area node corresponds to the system interface element, such as the navigation bar, the status bar interface, and the like of Android. When the carrier level of the resident image carrier of the interface display service is raised, the system interface element, such as the navigation bar, the status bar interface, and the like of Android, is not blocked, but the system interface element corresponding to the display area node is normally displayed on the screen.
[0080] In this embodiment, when switching the application interface, the parent level of the resident display controller is changed to the display area node of the screen, thereby avoiding the preset animation from blocking the system interface element.
[0081] In an optional embodiment of the present application, the interface display service has a corresponding image data provider, and the method further includes:
[0082] providing the resident image carrier to the image data provider;
[0083] displaying the system interface drawn by the image data provider through the resident image carrier.
[0084] In this embodiment, the interface display service can provide the resident image carrier to the image data provider, so that the image data provider can draw the system interface to be displayed through the resident image carrier, and display the system interface drawn by the image data provider through the resident image carrier on the screen.
[0085] For example, the first image picture corresponding to the first application can be drawn by the image data provider through the resident image carrier after the parent level of the resident display controller of the interface display service is reset to the first display controller of the first application, so as to display the first application interface on the screen. For another example, the second image picture corresponding to the second application can be drawn by the image data provider through the resident image carrier after the parent level of the resident display controller of the interface display service is reset to the second display controller of the second application, so as to display the second application interface on the screen.
[0086] The embodiment of the present application can use the image data provider to display the system interface drawn by the image data provider on the screen, thereby realizing the playing of the preset animation when switching the application.
[0087] In an optional embodiment of the present application, the step 103 comprises:
[0088] The image data provider is controlled to play the preset animation on the screen through the resident image carrier.
[0089] In the embodiment, when the application interface is switched, the interface display service can inform the image data provider to play the preset animation, so that the image data provider plays the preset animation on the screen through the resident image carrier. In an embodiment, the preset animation can be a smooth one-shot-to-end switching animation.
[0090] The embodiment of the present application informs the image data provider to play the preset animation when the application interface is switched, so as to realize the one-shot-to-end effect of the application switching animation and improve the user experience.
[0091] In an optional embodiment of the present application, the step of providing the resident image carrier to the image data provider comprises:
[0092] The resident image carrier is provided to the image data provider through a software development kit.
[0093] Reference Figure 8 is a schematic diagram of the software development kit for providing the resident image carrier in an embodiment of the application interface switching method.
[0094] In the embodiment, as shown in Figure 8 , the interface display service can provide the resident image carrier to the image data provider through a software development kit (SDK).
[0095] The embodiment of the present application can display the system interface drawn by the image data provider on the screen by using the image data provider, so as to realize the playing of the preset animation when the application is switched.
[0096] In an optional embodiment of the present application, the interface display service is applied to an Android operating system, the Android operating system comprises a surface compositor, and the method comprises: displaying the image picture corresponding to the resident display controller on the screen through the surface compositor.
[0097] The surface compositor (SurfaceFlinger) is a key component in the Android system, which is responsible for managing and compositing all application surfaces and outputting the final composite image to the display device. In the embodiment, since there is only one resident image carrier (Surface), it is only necessary to display the image picture currently corresponding to the resident display controller on the screen through the surface compositor.
[0098] The embodiment of the application only needs to display an image picture corresponding to a current resident display controller of a resident image carrier through a surface compositor, and the consumption of the central processor and the graphic processor is low.
[0099] In the embodiment of the application, a resident image carrier is created; the resident image carrier has a corresponding resident display controller, and the resident image carrier has a corresponding carrier level on the screen of the terminal device; a first application interface is displayed on the screen through the resident display controller; in the case where the first application interface needs to be switched to a second application interface, the carrier level is improved to the upper layer of the first application interface, and a preset animation is played on the screen through the resident image carrier; the first application interface is switched to the second application interface; and the second application interface is displayed on the screen through the resident display controller. The embodiment of the application realizes a more smooth and cool visual experience for a user when switching applications without integrating multiple applications into one application. The embodiment of the application also avoids the modification of the source code of the operating system, realizes the one-shot effect of the application switching animation through the background interface display service, and has a small influence on the safety of the operating system. The 3D vehicle model picture that needs to be displayed by each application can be enabled by the interface display service, and the implementation is simple. If the same 3D resource file needs to be displayed in different applications, the interface display service only needs to load one 3D resource file, and does not need to be integrated in each application, thereby reducing the memory occupation. The embodiment of the application only needs to render one resident image carrier, and the consumption of the central processor and the graphic processor is low.
[0100] On the basis of the above embodiment, in order for those skilled in the art to better understand the application embodiment of the application interface switching method, the application embodiment of the application interface switching method will be described in detail below.
[0101] Referring to Figure 9 , the system structure diagram of the application embodiment of the application interface switching method is shown.
[0102] As Figure 9 indicated, the Android system can include a Java service (that is, an interface display service), a SurfaceFlinger (surface compositor), an image data provider, a first application, and a second application.
[0103] A resident Surface and corresponding SurfaceControl are created in the interface display service, and the resident Surface is provided to the image data provider through the SDK. A first image SurfaceView1 is created in the first application, the first image SurfaceView1 includes the first application interface to be displayed, and the first image SurfaceView1 has a corresponding first SurfaceControl1, which is transmitted to the interface display service by the first application through the Binder mechanism. A second image SurfaceView2 is created in the second application, the second image SurfaceView2 includes the second application interface to be displayed, and the second image SurfaceView2 has a corresponding second SurfaceControl2, which is transmitted to the interface display service by the second application through the Binder mechanism.
[0104] When the first application interface or the second application interface needs to be displayed on the screen, the parent level of the resident SurfaceControl of the interface display service is reparented to the first SurfaceControl of the first application, so that the first image SurfaceView corresponding to the first SurfaceControl is displayed on the screen by the SurfaceFlinger; or the parent level of the resident SurfaceControl of the interface display service is reparented to the second SurfaceControl of the second application, so that the second image SurfaceView corresponding to the second SurfaceControl is displayed on the screen by the SurfaceFlinger.
[0105] Refer to Figure 10 FIG. 1 is a system architecture diagram of an application interface switching method embodiment of the present application.
[0106] As Figure 10 shown, the Java service (i.e., the interface display service) and the interactive business (such as the SDK, Applications, and the like, where the Applications include application programs such as the first application and the second application) are implemented in the Android application layer, without the need to modify any code of the Android system AOSP (Android Open Source Project, Android operating system open source project), and the SurfaceFlinger is part of the code of the AOSP.
[0107] Refer to Figure 11 FIG. 2 is a logic flow diagram of an application interface switching method embodiment of the present application.
[0108] As Figure 11As shown, the user starts up, and the Android SystemServer (system service manager) pulls up the Java service (i.e. the interface display service). A resident image carrier (Surface) is created in the interface display service, and a corresponding resident display controller (SurfaceControl) is provided, and the resident image carrier is provided to the image data provider for rendering.
[0109] When the user starts up the Android application 1 (i.e. the first application), a first image picture (SurfaceView1) is created in the first application, the first image picture includes the first application interface to be displayed, and the first image picture also has a corresponding first display controller (SurfaceControl1), which can be passed to the interface display service, and the parent level of the resident display controller of the interface display service is reset to the first display controller of the first application, so as to display the first image picture corresponding to the first display controller on the screen through the surface compositor.
[0110] When the user continues to start up the Android application 2 (i.e. the second application), the switching of the first application interface to the second application interface is triggered, and the interface display service is notified to trigger the "one shot to the bottom" switching effect. The interface display service raises the carrier level of the resident image carrier above the first application interface, and notifies the image data provider to play a preset animation to cover the application switching action below the resident image carrier.
[0111] At the same time, a second image picture (SurfaceView2) is created in the second application, the second image picture includes the second application interface to be displayed, and the second image picture also has a corresponding second display controller (SurfaceControl2), which can be passed to the interface display service. When the application process of the second application starts to display in the foreground, the parent level of the resident display controller of the interface display service is reset to the second display controller of the second application, so as to display the second image picture corresponding to the second display controller on the screen through the surface compositor.
[0112] In the embodiment of the present application, a resident image carrier is created; the resident image carrier has a corresponding resident display controller, and the resident image carrier has a corresponding carrier level on the screen of the terminal device; a first application interface is displayed on the screen through the resident display controller; in the case where the first application interface needs to be switched to a second application interface, the carrier level is raised to the upper layer of the first application interface, and a preset animation is played on the screen through the resident image carrier; the first application interface is switched to the second application interface; and the second application interface is displayed on the screen through the resident display controller. The embodiment of the present application realizes a more smooth and cool visual experience for users when switching applications without integrating multiple applications into one application. The embodiment of the present application also avoids modification of the operating system source code, realizes the one-shot effect of application switching animation through the background interface display service, and has less impact on the safety of the operating system. The 3D vehicle model picture that needs to be displayed by each application can be enabled by the interface display service, and the implementation is simple. If the same 3D resource file needs to be displayed in different applications, only one 3D resource file needs to be loaded by the interface display service, and there is no need to integrate each application separately, thereby reducing the memory occupation. The embodiment of the present application only needs to render one resident image carrier, and the consumption of the central processing unit and the graphics processing unit is low.
[0113] It should be noted that, for the method embodiments, in order to simply describe, they are all described as a series of action combinations, but those skilled in the art should know that the embodiments of the present application are not limited to the action sequence described, because according to the embodiments of the present application, certain steps can be performed in other sequences or at the same time. Secondly, those skilled in the art should know that the embodiments described in the specification all belong to preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present application.
[0114] On the basis of the above-mentioned embodiments, the present embodiment further provides a switching device of an application interface, which is applied to electronic devices such as terminal devices and servers.
[0115] Reference Figure 12 , a structural block diagram of an embodiment of a switching device of an application interface of the present application is shown, which can specifically include the following modules:
[0116] The resident image carrier creation module 1201 is configured to create a resident image carrier; the resident image carrier has a corresponding resident display controller, and the resident image carrier has a corresponding carrier level on the screen of the terminal device;
[0117] The first application interface display module 1202 is configured to display a first application interface on the screen through the resident display controller;
[0118] The preset animation playing module 1203 is configured to, in a case where it is necessary to switch the first application interface to the second application interface, increase the carrier level to an upper layer of the first application interface, and play a preset animation on the screen through the resident image carrier.
[0119] The application interface switching module 1204 is configured to switch the first application interface to the second application interface.
[0120] The second application interface display module 1205 is configured to display the second application interface on the screen through the resident display controller.
[0121] In an optional embodiment of the present application, the device comprises:
[0122] The first image picture creating module is configured to create a first image picture in a first application, the first image picture comprising the first application interface.
[0123] The first display controller obtaining module is configured to obtain a first display controller corresponding to the first image picture by using an interface of the first image picture.
[0124] The first display controller receiving module is configured to receive the first display controller transmitted by the first application.
[0125] In an optional embodiment of the present application, the resident display controller has a corresponding parent level, and the first application interface display module 1202 comprises:
[0126] The first parent level resetting submodule is configured to reset the parent level of the resident display controller to the first display controller.
[0127] The first image picture display submodule is configured to display the first image picture corresponding to the first display controller on the screen.
[0128] In an optional embodiment of the present application, the device comprises:
[0129] The second image picture creating module is configured to create a second image picture in a second application, the second image picture comprising the second application interface.
[0130] The second display controller obtaining module is configured to obtain a second display controller corresponding to the second image picture by using an interface of the second image picture.
[0131] The second display controller receiving module is configured to receive the second display controller transmitted by the second application.
[0132] In an optional embodiment of the present application, the resident display controller has a corresponding parent level, and the second application interface display module 1205 comprises:
[0133] A second parent level resetting submodule is configured to reset the parent level of the resident display controller to the second display controller.
[0134] A second image picture display submodule is configured to display the second image picture corresponding to the second display controller on the screen.
[0135] In an optional embodiment of the present application, the screen comprises a system interface element having a corresponding display area node, and the device further comprises:
[0136] A parent level changing module is configured to change the parent level of the resident display controller to the display area node when it is necessary to switch the first application interface to the second application interface.
[0137] A system interface element display module is configured to display the system interface element corresponding to the display area node on the screen.
[0138] In an optional embodiment of the present application, the interface display service has a corresponding image data provider, and the device further comprises:
[0139] A resident image carrier providing module is configured to provide the resident image carrier to the image data provider.
[0140] A system interface display module is configured to display a system interface drawn by the image data provider through the resident image carrier.
[0141] In an optional embodiment of the present application, the preset animation playing module 1203 comprises:
[0142] An image data provider animation playing submodule is configured to control the image data provider to play the preset animation on the screen through the resident image carrier.
[0143] In an optional embodiment of the present application, the resident image carrier providing module is further configured to:
[0144] The resident image carrier is provided to the image data provider through a software development kit.
[0145] In an optional embodiment of the present application, the interface display service is applied to an Android operating system, and the Android operating system comprises a surface compositor, and the device comprises:
[0146] a surface compositor module configured to display, by the surface compositor, an image frame corresponding to the persistent display controller on the screen.
[0147] In the embodiment of the present application, a persistent image carrier is created; the persistent image carrier corresponds to a persistent display controller, and the persistent image carrier has a carrier level on the screen of the terminal device; the first application interface is displayed on the screen by the persistent display controller; in the case where the first application interface needs to be switched to the second application interface, the carrier level is raised to the upper level of the first application interface, and a preset animation is played on the screen by the persistent image carrier; the first application interface is switched to the second application interface; and the second application interface is displayed on the screen by the persistent display controller. The embodiment of the present application realizes a more smooth and cool visual experience for users in the case where a plurality of applications are not integrated into one application. The embodiment of the present application also avoids modification of the source code of the operating system, realizes the one-shot effect of the application switching animation by the background interface display service, and has a small influence on the safety of the operating system. The 3D vehicle model frame that needs to be displayed by each application can be enabled by the interface display service, and the implementation is simple. If the same 3D resource file needs to be displayed in different applications, only one 3D resource file needs to be loaded by the interface display service, and there is no need to integrate each application separately, thereby reducing the memory occupation. The embodiment of the present application only needs to render one persistent image carrier, and the consumption of the central processing unit and the graphics processing unit is low.
[0148] The embodiment of the present application also provides a nonvolatile readable storage medium, the storage medium stores one or more programs, and the one or more programs can make a device execute instructions of each method step in the embodiment of the present application when the one or more programs are applied to the device.
[0149] The embodiment of the present application provides one or more machine readable media, and the one or more machine readable media store instructions, which, when executed by one or more processors, make an electronic device execute a method as described in one or more of the above embodiments. In the embodiment of the present application, the electronic device includes terminal devices, servers (clusters), and various types of devices.
[0150] The embodiment of the present application can be implemented as an apparatus configured in a desired manner using any appropriate hardware, firmware, software, or any combination thereof, and the apparatus can include terminal devices, servers (clusters), and electronic devices. Figure 13 An exemplary apparatus 1300 that can be used to implement various embodiments described in the present application is schematically shown.
[0151] For one embodiment, Figure 13An example apparatus 1300 is shown having one or more processors 1302, a control module (chipset) 1304 coupled to at least one of the processor(s) 1302, a memory 1306 coupled to the control module 1304, a non-volatile memory (NVM) / storage device 1308 coupled to the control module 1304, one or more input / output devices 1310 coupled to the control module 1304, and a network interface 1312 coupled to the control module 1304.
[0152] The processor(s) 1302 can include one or more single core or multi core processors, which can include any combination of general-purpose processors or dedicated processors (such as graphics processors, application processors, baseband processors, etc.). In some embodiments, the apparatus 1300 can function as a terminal device, a server (cluster), etc. as described in the embodiments herein.
[0153] In some embodiments, the apparatus 1300 can include one or more computer readable medium (such as the memory 1306 or the NVM / storage device 1308) having instructions 1314 and one or more processors 1302 incorporated with the one or more computer readable medium configured to execute the instructions 1314 to implement modules to perform the actions described in the present disclosure.
[0154] For one embodiment, the control module 1304 can include any suitable interface controllers appropriate for communicating with at least one of the processor(s) 1302 and / or any suitable devices or components in communication with the control module 1304.
[0155] The control module 1304 can include a memory controller module to provide an interface to the memory 1306. The memory controller module can be a hardware module, a software module, and / or a firmware module.
[0156] The memory 1306 can be used to, for example, load and store data and / or instructions 1314 for the apparatus 1300. For one embodiment, the memory 1306 can include any suitable volatile memory, such as suitable DRAM. In some embodiments, the memory 1306 can include double data rate type four synchronous dynamic random access memory (DDR4 SDRAM).
[0157] For one embodiment, the control module 1304 can include one or more input / output controllers to provide an interface to the NVM / storage device 1308 and the input / output device(s) 1310.
[0158] For example, NVM / storage 1308 can be used to store data and / or instructions 1314. NVM / storage 1308 can include any suitable non-volatile memory (e.g., flash memory) and / or can include any suitable non-volatile storage device(s) (e.g., one or more hard disk drives (HDDs), one or more compact disk (CD) drives, and / or one or more digital versatile disk (DVD) drives).
[0159] NVM / storage 1308 can include storage resources that are physically part of the device on which the apparatus 1300 is installed or that is accessed remotely and / or via a network, as described herein. For example, NVM / storage 1308 can be accessed via input / output device(s) 1310 through a network.
[0160] Input / output device(s) 1310 can provide an interface between apparatus 1300 and any suitable device for the receipt, processing, and / or transmission of data by apparatus 1300. Input / output device(s) 1310 can include communication components, audio components, sensor components, and so on. Network interface 1312 can provide an interface between apparatus 1300 and one or more networks, by which apparatus 1300 can communicate with one or more components of a wireless network, such as according to any of one or more wireless networking standards and / or protocols, such as to access a wireless network based on a communication standard, such as WiFi, 2G, 3G, 4G, 5G, and so on, or combinations thereof.
[0161] For one embodiment, at least one of processor(s) 1302 can be packaged together with logic for one or more controllers of control module 1304, such as a memory controller module. For one embodiment, at least one of processor(s) 1302 can be packaged together with logic for one or more controllers of control module 1304 to form a system in a package (SiP). For one embodiment, at least one of processor(s) 1302 can be fabricated together with logic for one or more controllers of control module 1304 on the same die. For one embodiment, at least one of processor(s) 1302 can be fabricated together with logic for one or more controllers of control module 1304 on the same die to form a system on a chip (SoC).
[0162] In various embodiments, the apparatus 1300 can be, but is not limited to, a server, a desktop computing device, or a mobile computing device (e.g., a laptop computing device, a handheld computing device, a tablet, a netbook, etc.) or the like. In various embodiments, the apparatus 1300 can have more or fewer components, and / or different architectures. For example, in some embodiments, the apparatus 1300 includes one or more cameras, a keyboard, a liquid crystal display (LCD) screen (including touch screen displays), non- volatile memory port, multiple antennas, a graphics chip, an application specific integrated circuit (ASIC), and a speaker.
[0163] In the detection device, a master control chip can be used as a processor or a control module, sensor data, position information, etc. are stored in a memory or NVM / storage device, a sensor group can be used as an input / output device, and a communication interface can include a network interface.
[0164] For the apparatus embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts are referred to the part of the method embodiments.
[0165] Each embodiment in the specification is described in a progressive manner, and each embodiment focuses on the difference from other embodiments. The same and similar parts between the embodiments are referred to each other.
[0166] Although the preferred embodiments of the present application have been described, those skilled in the art can make further changes and modifications to the embodiments once they know the basic inventive concept. Therefore, the appended claims are intended to cover all changes and modifications falling within the scope of the embodiments of the present application.
[0167] Finally, it should be noted that the relational terms herein, such as first and second, are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between or among the entities or operations. Moreover, the terms "comprises", "comprising", or any other variations thereof, are intended to cover a non-exclusive inclusion, so that a process, method, article, or terminal device including a list of elements does not include only those elements but can include other elements not expressly listed or inherent to such process, method, article, or terminal device. Without more limitations, an element defined by the statement "comprising a" does not exclude the existence of additional identical elements in the process, method, article, or terminal device including the element.
[0168] The switching method and device of the application interface, the electronic device and the storage medium are described in detail above, the principle and implementation manner of the application are described by applying specific examples in the present text, and the above example description is only used to help understand the method and core idea of the application; meanwhile, for those skilled in the art, according to the idea of the application, the specific implementation manner and application range will be changed, and the above description should not be understood as the limitation of the application.
Claims
1. A switching method of an application interface, characterized by, The method is applied to an interface display service, and the method comprises: creating a resident image carrier; the resident image carrier exists a corresponding resident display controller, the resident image carrier has a corresponding carrier level on a screen of a terminal device, and the resident display controller has a corresponding parent level; creating a first image picture in a first application, the first image picture comprising a first application interface; obtaining a first display controller corresponding to the first image picture by using an interface of the first image picture; receiving the first display controller transmitted by the first application; resetting the parent level of the resident display controller to the first display controller without creating a new image carrier; displaying the first image picture corresponding to the first display controller on the screen; creating a second image picture in a second application, the second image picture comprising a second application interface; obtaining a second display controller corresponding to the second image picture by using an interface of the second image picture; receiving the second display controller transmitted by the second application; in a case where the first application interface needs to be switched to the second application interface, raising the carrier level to an upper layer of the first application interface and playing a preset animation on the screen through the resident image carrier; switching the first application interface to the second application interface; resetting the parent level of the resident display controller to the second display controller without creating the image carrier; displaying the second image picture corresponding to the second display controller on the screen.
2. The method of claim 1, wherein, The screen comprises a system interface element having a corresponding display area node, and the method further comprises: in a case where the first application interface needs to be switched to the second application interface, changing the parent level of the resident display controller to the display area node; displaying the system interface element corresponding to the display area node on the screen.
3. The method of claim 1, wherein, The interface display service has a corresponding image data provider, and the method further comprises: providing the resident image carrier to the image data provider; displaying a system interface drawn by the image data provider through the resident image carrier; wherein the preset animation is played on the screen through the resident image carrier, which comprises: controlling the image data provider to play the preset animation on the screen through the resident image carrier.
4. The method according to any one of claims 1 to 3, characterized in that, The interface display service is applied to an Android operating system, and the Android operating system comprises a surface compositor, and the method comprises: displaying an image picture corresponding to the resident display controller on the screen through the surface compositor.
5. A switching device of an application interface, characterized by, The device is applied to an interface display service, and the device comprises: a resident image carrier creating module, configured to create a resident image carrier; the resident image carrier exists a corresponding resident display controller, the resident image carrier has a corresponding carrier level on a screen of a terminal device, and the resident display controller has a corresponding parent level; a first application interface display module, configured to display a first application interface on the screen through the resident display controller; The preset animation playing module is configured to, in a case where the first application interface needs to be switched to a second application interface, increase the carrier level to an upper layer of the first application interface, and play a preset animation on the screen through the resident image carrier. The application interface switching module is configured to switch the first application interface to the second application interface. The second application interface display module is configured to display the second application interface on the screen through the resident display controller. The device comprises: The first image picture creating module is configured to create a first image picture in a first application, the first image picture comprising the first application interface. The first display controller obtaining module is configured to obtain a first display controller corresponding to the first image picture by using an interface of the first image picture. The first display controller receiving module is configured to receive the first display controller transmitted by the first application. The first application interface display module comprises: The first parent level resetting submodule is configured to reset the parent level of the resident display controller to the first display controller without creating a new image carrier. The first image picture display submodule is configured to display the first image picture corresponding to the first display controller on the screen. The device further comprises: The second image picture creating module is configured to create a second image picture in a second application, the second image picture comprising the second application interface. The second display controller obtaining module is configured to obtain a second display controller corresponding to the second image picture by using an interface of the second image picture. The second display controller receiving module is configured to receive the second display controller transmitted by the second application. The second application interface display module comprises: The second parent level resetting submodule is configured to reset the parent level of the resident display controller to the second display controller without creating the image carrier. The second image picture display submodule is configured to display the second image picture corresponding to the second display controller on the screen.
6. An electronic device, comprising: The device comprises: A processor; and A memory having stored executable codes, which, when executed, cause the processor to perform the application interface switching method according to one or more of claims 1-4.
7. One or more machine readable media having stored executable codes, which, when executed, cause a processor to perform the application interface switching method according to one or more of claims 1-4.
Citation Information
Patent Citations
Image switching method and device, electronic equipment and storage medium
CN110069313A
Display method and apparatus, and electronic device
WO2024114051A1