Card display method and electronic equipment
By responding to application business changes in electronic devices, determining card views and creating embedded window layers, the problem of not being able to effectively display application notification information in the prior art is solved, and a more intuitive and efficient user experience and notification information timeliness is achieved.
Patent Information
- Application Number
- CN202311087384.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-24
- Publication Date
- 2025-03-04
AI Technical Summary
When existing electronic devices display notification information of applications, they cannot effectively and intuitively display the business status of different applications, resulting in a low user experience.
By implementing the card display method in an electronic device, responding to the business changes of the application, determining the card view, and creating an embedded window layer, embedded in the interface of other applications, displaying the card view including progress bars and segmented progress bars.
It realizes the notification information of the application more efficiently and intuitively on electronic devices, improves the user experience, and improves the cross-process data transmission speed through embedded window layers, ensuring the timeliness of notification information.
Smart Images

Figure CN119556836A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of electronic devices, and in particular to a card display method and electronic device. Background Art
[0002] Currently, electronic devices (such as mobile phones, etc.) usually display notification information of an application to users in the form of cards. The notification information may be notification information of applications with notification permissions, such as text messages, itinerary information, taxi information, food delivery information, etc. Summary of the invention
[0003] The embodiments of the present application provide a card display method and an electronic device, which can optimize the process of displaying notification information of an application by an electronic device.
[0004] In order to achieve the above purpose, the embodiment of the present application adopts the following technical solution:
[0005] In a first aspect, an embodiment of the present application provides a card display method, which is applied to an electronic device. The card display method may include: in response to a change in the business of a first application in the electronic device, the electronic device determines a first view of a first card of the first application; the electronic device creates a first embedded window layer corresponding to a second application based on the first view; in response to a first operation of switching to the second application, the electronic device displays a first interface, the first interface including an embedded window of the second application, wherein the first embedded window layer is displayed in the embedded window of the second application to display the first card including the first view in the first interface.
[0006] Based on the method described in the first aspect, when the business of the first application in the electronic device changes, in response to the business change of the first application, the electronic device can determine the first view of the first card of the first application, and create the first embedded window layer corresponding to the second application according to the first view, so that the electronic device can embed the first embedded window layer into the embedded window of the second application. Afterwards, when the electronic device receives the first operation of switching to the second application, in response to the first operation, the electronic device can display the first interface corresponding to the second application. Since the first interface of the second application displayed by the electronic device includes the embedded window of the second application, the first embedded window layer embedded in the embedded window of the second application can be displayed while the electronic device displays the first interface corresponding to the second application, and then the first card including the first view can be displayed in the first interface. That is, when the second application of the electronic device displays the first card, the first card can be displayed by displaying the embedded window of the second application instead of directly displaying the first card. In this way, the electronic device can determine the first view of the first card according to the business type of the first application, and then display the first card including the first view on the first interface, which can more effectively and intuitively display the business status of the first application, and provide a better user experience.
[0007] In combination with the first aspect, in another possible implementation, the above-mentioned card display method may also include: in response to a change in the business of the first application in the electronic device, the electronic device determines the second view of the first card of the first application, and the second view is different from the first view; the electronic device creates a second embedded window layer corresponding to the third application based on the second view; after the electronic device displays the first interface in response to the first operation of switching to the second application, the above-mentioned card display method may also include: in response to the second operation of switching to the third application, displaying the second interface, the second interface including the embedded window of the third application, wherein the second embedded window layer is displayed in the embedded window of the third application to display the first card including the second view in the second interface.
[0008] Based on this possible implementation, when the business of the first application in the electronic device changes, in response to the change in the business of the first application, the electronic device can determine the second view of the first card of the first application, and create a second embedded window layer corresponding to the third application according to the second view, so that the electronic device can embed the second embedded window layer into the embedded window of the third application. That is, when the business of the first application changes, the electronic device can determine the card view that can be displayed in each application according to the characteristics of different applications. Then, when the electronic device receives the second operation of switching to the third application, in response to the second operation, the display interface of the electronic device can be switched from the first interface corresponding to the second application to the second interface corresponding to the third application. And, because the second interface of the third application displayed by the electronic device includes the embedded window of the third application. Therefore, when the display interface of the electronic device is switched from the first interface corresponding to the second application to the second interface corresponding to the third application, the first card in the display interface of the electronic device is switched from the first card including the first view to the first card including the second view. That is, the electronic device can display the first card adapted to each application according to the characteristics of different applications, thereby ensuring that the first cards displayed in different applications of the electronic device have good display effects.
[0009] In combination with the first aspect, in another possible implementation, the above-mentioned first view includes a progress bar, which is used to indicate the progress status of the business of the first application; the progress bar includes a first icon, a second icon, and a third icon, wherein the first icon is used to indicate the starting point of execution of the business of the first application, and the second icon is used to indicate the end point of execution of the business of the first application; the third icon is used to indicate that the progress status of the business of the first application has changed, and when the progress status of the business of the first application has changed, the position of the third icon between the first icon and the second icon changes accordingly.
[0010] Based on this possible implementation method, the first view may include a progress bar for indicating the progress status of the business of the first application. In this way, when the electronic device displays the first card including the first view on the first interface, the progress status of the business of the first application can be more intuitively displayed through the progress bar in the first view, providing a better user experience.
[0011] In combination with the first aspect, in another possible implementation, the business stage of the above-mentioned first application includes a first business stage and a second business stage; the first view includes a segmented progress bar, and the segmented progress bar is used to indicate the progress status of the business of the first application in different business stages; the segmented progress bar includes a fourth icon, a fifth icon, a sixth icon and a seventh icon located between the fourth icon and the fifth icon; wherein the fourth icon is used to indicate the execution starting point of the first business stage of the first application; the fifth icon is used to indicate the execution end point of the second business stage of the first application; the sixth icon is used to indicate the execution end point of the first business stage of the first application and the execution starting point of the second business stage of the first application; the seventh icon is used to indicate a change in the business progress of the second application, and when the progress of the business of the second application changes in the first business stage, the position of the seventh icon between the fourth icon and the sixth icon changes accordingly; or, when the progress of the business of the second application changes in the second business stage, the position of the seventh icon between the sixth icon and the fifth icon changes accordingly.
[0012] Based on this possible implementation method, the first view may include a segmented progress bar for indicating the progress status of the business of the first application at different business stages. In this way, when the electronic device displays the first card including the first view on the first interface, the segmented progress bar in the first view can more intuitively display the current business stage of the business of the first application and the progress status corresponding to the business stage, providing a better user experience.
[0013] In combination with the first aspect, in another possible implementation method, the above-mentioned electronic device determines the first view of the first card of the first application, which may include: the electronic device obtains identification information of the second application; the electronic device determines the identification information of the first view based on the identification information of the second application; the electronic device determines the first view based on the identification information of the first view.
[0014] Based on this possible implementation method, the electronic device can pre-create a card view of the first card corresponding to each application. In this way, when the electronic device determines the first view, the electronic device can determine the identification information of the first view based on the identification information of the second application, and determine the first view based on the identification information of the first view, so that the card view can be quickly acquired, thereby improving the processing efficiency of the electronic device.
[0015] In combination with the first aspect, in another possible implementation method, before the above-mentioned electronic device determines the first view of the first card of the first application, the above-mentioned card display method may also include: the electronic device generates a placeholder view based on the card size information of the second application; the electronic device creates a placeholder embedded window layer corresponding to the placeholder view based on the placeholder view; the electronic device mounts the placeholder embedded window layer to the embedded window of the second application.
[0016] Based on this possible implementation method, before the electronic device determines the first view of the first card of the first application, the electronic device can generate a placeholder view based on the card size information of the second application, and create a placeholder embedded window layer corresponding to the placeholder view based on the placeholder view, so as to mount the placeholder embedded window layer in the embedded window of the second application. This can avoid the electronic device displaying cards of other applications except the first application during the process of the electronic device determining the card view of the first card of the first application.
[0017] In combination with the first aspect, in another possible implementation method, the above-mentioned electronic device creates a placeholder embedded window layer corresponding to the placeholder view based on the placeholder view, which may include: when a third embedded window layer is stored in the electronic device, obtaining status information of the third embedded window layer, wherein the third embedded window layer is an embedded window layer created based on the card view of the second card of the first application, and the progress status of the business of the first application indicated by the second card is different from that of the first card; when the status information indicates that the third embedded window layer is valid, updating the card view of the second card in the third embedded window layer to the placeholder view to obtain the placeholder embedded window layer.
[0018] Based on this possible implementation method, when a third embedded window layer is stored in the cache of an electronic device, the electronic device can update the card view of the second card in the third embedded window layer to a placeholder view to obtain a placeholder embedded window layer. This eliminates the need to recreate the placeholder embedded window layer, thereby improving the processing efficiency of the electronic device.
[0019] In combination with the first aspect, in another possible implementation method, the above-mentioned electronic device creates a first embedded window layer corresponding to the second application based on the first view, which may include: updating the placeholder view in the placeholder embedded window layer to the first view to obtain the first embedded window layer corresponding to the second application.
[0020] Based on this possible implementation method, the electronic device can update the placeholder view in the placeholder embedded window layer to the first view to obtain the first embedded window layer corresponding to the second application. This does not require re-creating the first embedded window layer, which can improve the processing efficiency of the electronic device.
[0021] In combination with the first aspect, in another possible implementation, the display content corresponding to the second view is different from the display content corresponding to the first view, and / or the display size corresponding to the second view is different from the display size corresponding to the first view.
[0022] Based on this possible implementation, when the business of the first application changes, the electronic device can generate card views corresponding to each application according to the characteristics of different applications, wherein the display content and / or display size of the card views corresponding to different applications are different. In this way, the electronic device can generate first cards adapted to each application according to the characteristics of different applications, and then when the electronic device switches to any application, it can display the interface corresponding to the application, and display the first card including the card view corresponding to the application on the interface corresponding to the application, so as to ensure that the first cards displayed in different applications of the electronic device have good display effects.
[0023] In combination with the first aspect, in another possible implementation method, the second application is a desktop, notification center, lock screen, screen off, negative one screen or banner notification; the third application is a desktop, notification center, lock screen, screen off, negative one screen or banner notification.
[0024] Based on this possible implementation method, when an application running in the foreground of an electronic device switches between the desktop, notification center, lock screen, screen off, negative one screen, or banner notification, a first card including different card views can be displayed. This can ensure that the first card displayed on the desktop, notification center, lock screen, screen off, negative one screen, or banner notification has a better display effect.
[0025] In combination with the first aspect, in another possible implementation, the display size corresponding to the second view is different from the display size corresponding to the first view, and the display size includes a display height and a display width; wherein the second application is a desktop, the third application is a notification center, and the display height corresponding to the second view is smaller than the display height corresponding to the first view.
[0026] Based on this possible implementation method, when an application running in the foreground of an electronic device is switched from the desktop to the notification center, a first card including a second view can be displayed in the notification center, and the display height corresponding to the second view is smaller than the display height corresponding to the first view. This can reduce the space occupied by the first card, so that the notification center of the electronic device can display more notification information cards. Users do not need to flip through all notification information cards to view them, thereby improving the efficiency of human-computer interaction.
[0027] In combination with the first aspect, in another possible implementation, the display size corresponding to the second view is different from the display size corresponding to the first view, and the display size includes a display height and a display width; wherein the second application is a desktop, the third application is a lock screen, the display width corresponding to the second view is smaller than the display width corresponding to the first view, and the display height corresponding to the second view is smaller than the display height corresponding to the first view.
[0028] Based on this possible implementation method, when an application running in the foreground of an electronic device switches from the desktop to the lock screen, a first card including a second view can be displayed in the notification center, and the display width corresponding to the second view is smaller than the display width corresponding to the first view, and the display height corresponding to the second view is smaller than the display height corresponding to the first view. In this way, the space occupied by the first card can be reduced, so that the lock screen of the electronic device can display more notification information cards. Users do not need to flip through all notification information cards to view them, which can improve the efficiency of human-computer interaction.
[0029] In combination with the first aspect, in another possible implementation method, the display size corresponding to the second view is different from the display size corresponding to the first view, and the display size includes a display height and a display width; wherein, the second application is a lock screen, the third application is an off screen, the display width corresponding to the second view is smaller than the display width corresponding to the first view, and the display height corresponding to the second view is smaller than the display height corresponding to the first view.
[0030] Based on this possible implementation, since the display space of the screen-off interface of the electronic device is limited, when the application running in the foreground of the electronic device switches from the lock screen to the screen-off interface, the first card including the second view can be displayed on the screen-off interface, and the display width corresponding to the second view is smaller than the display width corresponding to the first view, and the display height corresponding to the second view is smaller than the display height corresponding to the first view, so that the display size of the first card can be reduced, and the space occupied by the first card can be minimized to avoid the card corresponding to the second application being unable to be fully displayed. In addition, since the screen-off interface of the electronic device is in a constantly lit state, displaying a smaller first card on the screen-off interface can reduce the power consumption of the electronic device.
[0031] In a second aspect, an embodiment of the present application provides a card display device, which can be applied to an electronic device to implement the method in the first aspect. The functions of the card display device can be implemented by hardware, or by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above functions, such as a determination module, a creation module, and a display module.
[0032] The determination module may be used to determine a first view of a first card of a first application in response to a change in the service of the first application in the electronic device.
[0033] The creation module can be used to create a first embedded window layer corresponding to the second application according to the first view.
[0034] The display module can be used to display a first interface in response to a first operation of switching to a second application, wherein the first interface includes an embedded window of the second application, wherein a first embedded window layer is displayed in the embedded window of the second application to display a first card including a first view in the first interface.
[0035] In a third aspect, an electronic device is provided, which has the function of implementing the method described in the first aspect. The function can be implemented by hardware, or by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above functions.
[0036] In a fourth aspect, an electronic device is provided, comprising: a processor and a memory; the memory is used to store computer execution instructions, and when the electronic device is running, the processor executes the computer execution instructions stored in the memory to enable the electronic device to perform a card display method as described in any one of the above-mentioned first aspects.
[0037] In a fifth aspect, an electronic device is provided, comprising: a processor; the processor is used to couple with a memory, and after reading instructions in the memory, execute the card display method as described in any one of the above-mentioned first aspects according to the instructions.
[0038] In a sixth aspect, an embodiment of the present application provides a computer-readable storage medium having computer program instructions stored thereon. When the computer program instructions are executed by an electronic device, the electronic device implements a card display method as described in any one of the first aspect or possible implementations of the first aspect.
[0039] In a seventh aspect, an embodiment of the present application provides a computer program product, comprising a computer-readable code, which, when executed in an electronic device, enables the electronic device to implement a card display method as described in any one of the first aspect or possible implementations of the first aspect.
[0040] In an eighth aspect, a device (for example, the device may be a chip system) is provided, the device including a processor for supporting an electronic device to implement the functions involved in the first aspect above. In one possible design, the device also includes a memory for storing program instructions and data necessary for the electronic device. When the device is a chip system, it may be composed of a chip, or may include a chip and other discrete devices.
[0041] It should be understood that the beneficial effects of the second to eighth aspects mentioned above can be found in the relevant description of the first aspect mentioned above, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] Figure 1 A schematic diagram of the software structure of an electronic device in the related art;
[0043] Figure 2 A schematic diagram of a scene in which an electronic device displays a card in the related art;
[0044] Figure 3 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application;
[0045] Figure 4 One of the software structure diagrams of an electronic device provided in an embodiment of the present application;
[0046] Figure 5 A second schematic diagram of a software structure of an electronic device provided in an embodiment of the present application;
[0047] Figure 6 A third schematic diagram of a software structure of an electronic device provided in an embodiment of the present application;
[0048] Figure 7 One of the schematic diagrams of a progress bar provided in an embodiment of the present application;
[0049] Figure 8 One of the scene schematic diagrams of a card display method provided in an embodiment of the present application;
[0050] Fig. 9 A second schematic diagram of a scene of a card display method provided in an embodiment of the present application;
[0051] Fig.10 A second schematic diagram of a progress bar provided in an embodiment of the present application;
[0052] Fig.11 A third scene diagram of a card display method provided in an embodiment of the present application;
[0053] Fig.12A fourth scene diagram of a card display method provided in an embodiment of the present application;
[0054] Fig.13 A third schematic diagram of a progress bar provided in an embodiment of the present application;
[0055] Fig.14 A fifth scene diagram of a card display method provided in an embodiment of the present application;
[0056] Fig.15 A sixth scene diagram of a card display method provided in an embodiment of the present application;
[0057] Fig.16 One of the flowcharts of a card display method provided in an embodiment of the present application;
[0058] Fig.17 The second flowchart of a card display method provided in an embodiment of the present application. DETAILED DESCRIPTION
[0059] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0060] The terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of this application, unless otherwise specified, "plurality" means two or more.
[0061] Currently, in order to more intuitively display notification information corresponding to a certain application to users, electronic devices (such as mobile phones, etc.) can display notification information corresponding to the application (application, APP) to users in the form of cards (or widgets, parts, components, etc.) on the display interface.
[0062] The application that displays notification information to the user in the form of a card can be an application in the electronic device that needs to publish notification information. The application can be an application that comes with the electronic device or a third-party application.
[0063] When an electronic device displays a card corresponding to an application, the electronic device can create a card corresponding to the notification information of the application according to the predefined native card elements, and display the card corresponding to the notification information of the application. Among them, the native card elements are usually interface elements predefined according to the native Android card framework. That is to say, for any application, when the electronic device displays the card corresponding to the application, the card corresponding to the application can only include native card elements and cannot carry the custom card elements of the application.
[0064] However, the native card elements supported by the native Android card framework are limited. For example, the native card elements supported by the native Android card framework include text elements and picture elements. Therefore, when an electronic device creates a card corresponding to the notification information of a certain application according to the native card elements, the electronic device can create a card including different text elements and picture elements according to the notification information of the application, and then display the notification information of the application to the user through the text elements and picture elements displayed on the card. However, the electronic device cannot create a card including custom card elements according to the notification information of the application, that is, the application of the electronic device cannot create different cards according to demand, and it is difficult to effectively and intuitively display the notification information of the application to the user.
[0065] Next, combine Figure 1 The process of an electronic device displaying a card corresponding to notification information of an application according to native card elements is described.
[0066] Take the electronic device as a mobile phone and the notification information as the notification information of a taxi-hailing application as an example for illustration. Figure 1 As shown, when the electronic device displays the card corresponding to the notification information of the taxi-hailing application, the taxi-hailing application running on the electronic device creates a card (view) corresponding to the notification information of the taxi-hailing application according to the native card elements, and serializes the card corresponding to the notification information of the taxi-hailing application according to preset rules to obtain the card data (view data) of the card (view) corresponding to the notification information of the taxi-hailing application.
[0067] The taxi-hailing application running on the electronic device can send card data (view data) of a card (view) corresponding to the notification information of the taxi-hailing application to the host application of the electronic device. The host application can be an application on the electronic device that can display cards, such as the desktop, notification center, banner notification, lock screen, off screen or negative one screen of the electronic device.
[0068] After receiving the card data of the card corresponding to the notification information of the taxi-hailing application, the host application of the electronic device creates and displays the card corresponding to the notification information of the taxi-hailing application according to the card data. The card corresponding to the notification information of the taxi-hailing application can only include native card elements (such as text elements and image elements) supported by the native Android card framework.
[0069] In addition, if Figure 1 As shown, the taxi-hailing application of the electronic device can call predefined functions, such as the set text function and the set translation function. Correspondingly, the host application of the electronic device can also call predefined functions, such as the set text function and the set translation function. Among them, the electronic device can pre-establish the corresponding relationship between the set text function that can be called by the taxi-hailing application and the set text function that can be called by the host application, and pre-establish the corresponding relationship between the set translation function that can be called by the taxi-hailing application and the set translation function that can be called by the host application.
[0070] In this way, the taxi-hailing application of the electronic device can call the set text (settext) function of the taxi-hailing application to update the text elements in the card (view). When the taxi-hailing application of the electronic device calls the set text (set text) function of the taxi-hailing application to update the text elements in the card (view), based on the pre-established correspondence, the set text (set text) function that can be called by the host application corresponding to the set text (set text) function of the taxi-hailing application can be first determined. Thus, the host application of the electronic device can call the set text (set text) function corresponding to the host application to update the text elements in the card (view).
[0071] The following example takes the card corresponding to the notification information of the taxi application as an example, which includes text elements and image elements, and the host application is the notification center of the electronic device. Figure 2 The update of the text elements included in the card corresponding to the notification information of the taxi-hailing application displayed on the electronic device is schematically explained.
[0072] After the taxi-hailing application of the electronic device generates a taxi order, the taxi-hailing application of the electronic device will issue a taxi task and wait for the driver to accept the order. Figure 2 As shown in (a) of FIG. 1 , the electronic device may display a card 11 corresponding to the taxi-hailing application in the notification center 10 . The card 11 may be used to remind the user that a taxi-hailing order of the taxi-hailing application has been generated and is waiting for the driver to accept the order. Figure 2 As shown in (a) in FIG. 1 , the card 11 may include an icon 111 of a taxi-hailing application and a text 112 of “waiting for the driver to accept the order”.
[0073] Afterwards, when the taxi-hailing application on the electronic device detects that the driver has accepted the order and drives to the user's departure location according to the taxi order, Figure 2 As shown in (b) of FIG. 1 , the electronic device may display a card 12 corresponding to the taxi-hailing application in the notification center 10 . The card 12 may be used to remind the user that the driver has accepted the order and is heading to the departure point. Figure 2 As shown in (b) in FIG. 1 , the card 12 may include an icon 121 of a taxi-hailing application and a text 122 indicating that the driver has accepted the order and is on his way.
[0074] Afterwards, when the taxi-hailing application on the electronic device detects that the driver has arrived at the departure location, Figure 2 As shown in (c) of FIG. 1 , the electronic device may display a card 13 corresponding to the taxi-hailing application in the notification center 10 . The card 13 may be used to remind the user that the driver has arrived at the departure location and is waiting for the user to get in the car. Figure 2 As shown in (c) in FIG. 1 , the card 13 may include an icon 131 of a taxi-hailing application and a text 132 of “The driver has arrived, please get in the car”.
[0075] After that, after the driver picks up the user, when the driver drives to the destination according to the taxi order, Figure 2 As shown in (d) in FIG. 1 , the electronic device may display a card 14 corresponding to the taxi-hailing application in the notification center 10 , and the card 14 may be used to remind the user that the user is about to drive to the destination. Figure 2 As shown in (d) in FIG. 1 , the card 14 may include an icon 141 of a taxi-hailing application and a text 142 of “driving to destination”.
[0076] That is, when the text elements included in the card corresponding to the taxi-hailing application are updated, the text elements included in the card corresponding to the taxi-hailing application displayed in the notification center of the electronic device are updated.
[0077] Of course, the taxi-hailing application of the electronic device can also call the set translation function of the taxi-hailing application to update the display position of the card (view). When the taxi-hailing application of the electronic device calls the set translation function of the taxi-hailing application to update the display position of the card (view), based on the pre-established correspondence, the set translation function that can be called by the host application corresponding to the set translation function of the taxi-hailing application can be determined first. Thus, the host application of the electronic device can call the set translation function corresponding to the host application to update the display position in the card (view).
[0078] However, when the electronic device displays the card corresponding to the notification information of the taxi-hailing application, the electronic device can only display the card corresponding to the notification information of the taxi-hailing application according to the native card elements supported by the native Android card framework. The style of the card displayed in this way is relatively simple, and it is difficult to intuitively and effectively display the notification information of the taxi-hailing application to the user.
[0079] In summary, it can be seen that in the related technology, electronic devices can only display cards corresponding to applications according to native card elements supported by the native Android card framework, and cannot display cards including custom card elements according to the notification information of the application. The style of the displayed cards is relatively simple, and it is difficult to display the notification information of the application to the user intuitively and effectively, resulting in a low user experience.
[0080] In response to the above problems, an embodiment of the present application provides a card display method, which is applied to an electronic device. When the electronic device displays the notification information of an application in the form of a card, the application running on the electronic device can create a card view, and generate an embedded window layer corresponding to the card according to the card view, and send the embedded window layer corresponding to the card to the host application of the electronic device, so that the host application of the electronic device displays the embedded window layer corresponding to the card. That is, when the host application of the electronic device displays the notification information of the application in the form of a card, the host application of the electronic device displays the embedded window layer hanging below it, instead of directly displaying the card view. Therefore, the application of the electronic device can create a card view including a custom card element according to demand, and generate an embedded window layer including a custom card element according to the card view, so that when the host application of the electronic device displays the notification information of the application, the host application of the electronic device can display a card view including different custom card elements, which can more effectively and intuitively display the notification information of the application to the user.
[0081] Furthermore, when an electronic device displays the card corresponding to an application, displaying the card corresponding to the application based on the embedded window layer can increase the speed of cross-process data transmission and enable real-time refresh of the card corresponding to the application, thereby ensuring the timeliness of the notification information of the application and providing a better user experience.
[0082] The card display method provided in the embodiment of the present application is described below.
[0083] The card display method provided in the embodiment of the present application can be applied to electronic devices. In some embodiments, the electronic device can be an electronic device for application programs such as a mobile phone, a tablet computer, a handheld computer, a personal computer (PC), a cellular phone, a personal digital assistant (PDA), a wearable device, etc. The embodiment of the present application does not limit the specific form of the electronic device.
[0084] For example, taking the electronic device as a mobile phone, Figure 3 A schematic structural diagram of an electronic device provided in an embodiment of the present application is shown.
[0085] like Figure 3 As shown, the electronic device may include a processor 310, an external memory interface 320, an internal memory 321, a universal serial bus (USB) interface 330, a charging management module 340, a power management module 341, a battery 342, an antenna 1, an antenna 2, a mobile communication module 350, a wireless communication module 360, an audio module 370, a speaker 370A, a receiver 370B, a microphone 370C, an earphone interface 370D, a sensor module 380, a button 390, a motor 391, an indicator 392, a camera 393, a display screen 394, and a subscriber identification module (SIM) card interface 395, etc. Among them, the sensor module 380 may include a pressure sensor 380A, a gyroscope sensor 380B, an air pressure sensor 380C, a magnetic sensor 380D, an acceleration sensor 380E, a distance sensor 380F, a proximity light sensor 380G, a fingerprint sensor 380H, a temperature sensor 380J, a touch sensor 380K, an ambient light sensor 380L, a bone conduction sensor 380M, etc.
[0086] It is to be understood that the structure illustrated in this embodiment does not constitute a specific limitation on the electronic device. In other embodiments, the electronic device may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
[0087] In the embodiment of the present application, the display screen 394 can be used to display Figure 8 , Fig. 9 , Fig.11 , Fig.12 , Fig.14 and Fig.15 Electronic device display interface.
[0088] Of course, it is understandable that the above Figure 3 The figure is only an exemplary description when the electronic device is in the form of a mobile phone. If the electronic device is in the form of a tablet computer, a handheld computer, a PC, a PDA, a wearable device (such as a smart watch, a smart bracelet), etc., the structure of the electronic device may include Figure 3 The structure shown in the figure is less than Figure 3 More structures are shown in the figure, which are not limited here.
[0089] It is understandable that, generally speaking, the realization of electronic device functions requires not only hardware support but also software cooperation.
[0090] The software system of the electronic device may adopt a layered architecture, an event-driven architecture, a micro-core architecture, a micro-service architecture, or a cloud architecture. The embodiment of the present application takes the Android system of the layered architecture as an example to exemplify the software structure of the electronic device.
[0091] Figure 4 It is a software structure block diagram of the electronic device provided in the embodiment of the present application.
[0092] The layered architecture divides the software into several layers, each with clear roles and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, from top to bottom: the application layer, the application framework layer (framework, FWK), the Android runtime (android runtime) and the system library (also called the Native layer), and the kernel layer.
[0093] In some examples, in order to implement the card display method provided in the embodiments of the present application, the application layer may also include a host application (such as the desktop, negative one screen, notification center, banner notification, screen off, lock screen, etc. of the electronic device) and an application that provides a card. The application that provides a card is an application in the electronic device that can provide a card, which may be a third-party application, such as a travel application (such as a taxi application, a map application, etc.), a delivery application (such as a takeaway application, a courier application, etc.) in the electronic device. The application that provides a card may also be an application of the system of the electronic device.
[0094] The following combination Figure 5 The card display method provided in the embodiment of the present application is schematically described. It should be noted that the specific application mentioned in the embodiment of the present application is used as an example only to facilitate the description of the technical solution and does not limit the scope of the solution of the present application.
[0095] For example, if the application that provides the card is a taxi-hailing application, such as Figure 5 As shown, the card display method provided in the embodiment of the present application includes the following process: when the electronic device displays the card corresponding to the notification information of the taxi-hailing application, the taxi-hailing application of the electronic device can generate an embedded window (i.e., SurfaceControlViewHost) layer corresponding to the card view (i.e., view) corresponding to the notification information of the taxi-hailing application, and the embedded window layer includes a SurfaceControl layer.
[0096] Afterwards, the taxi-hailing application of the electronic device can encapsulate the embedded window layer corresponding to the card view, obtain the data packet of the embedded window layer corresponding to the card view (i.e., SurfacePackage), and transmit the data packet of the embedded window layer corresponding to the card view across processes to the host application of the electronic device.
[0097] After the host application of the electronic device receives the data packet of the embedded window layer corresponding to the card view, the host application of the electronic device can obtain the embedded window layer corresponding to the card view according to the data packet of the embedded window layer corresponding to the card view. The host application of the electronic device can mount (or embed) the embedded window layer corresponding to the card view on its own host layer (i.e., SurfaceView), that is, the host application of the electronic device can embed the SurfaceControl layer into its own host layer. In other words, the SurfaceControl layer actually embedded in the host layer of the host application of the electronic device and the SurfaceControl layer included in the embedded window layer generated by the taxi application of the electronic device are the same layer. In other words, the host layer of the host application of the electronic device and the embedded window layer of the taxi application of the electronic device both point to the high-performance rendering (graphic) layer (i.e., SurfaceControl layer). Therefore, the host application of the electronic device and the taxi application of the electronic device display the same object, that is, the host application of the electronic device can display the card corresponding to the notification information of the taxi application.
[0098] Furthermore, combined Figure 5 As shown, when the electronic device displays the card corresponding to the notification information of the taxi-hailing application, the host application of the electronic device displays the SurfaceControl layer embedded in its own host layer (that is, the embedded window layer generated by the taxi-hailing application). Therefore, when the taxi-hailing application of the electronic device generates the embedded window layer, the taxi-hailing application of the electronic device can generate a card view including custom card elements, and based on the card view, generate an embedded window layer corresponding to the card view including custom card elements. In this way, the host application of the electronic device can display the embedded window layer corresponding to the card view including custom card elements, that is, the host application of the electronic device can display the taxi-hailing application card including custom card elements.
[0099] Furthermore, since the card view corresponding to the notification information of the taxi-hailing application running on the electronic device is created in the process of the taxi-hailing application. Therefore, when the notification information of the taxi-hailing application running on the electronic device changes (i.e., the business of the taxi-hailing application changes), the taxi-hailing application can call the relevant function to adjust the card view corresponding to the notification information of the taxi-hailing application, and the SurfaceControl layer corresponding to the card view can be synchronously updated according to the adjusted card view, i.e., the embedded window layer corresponding to the card view can be synchronously updated according to the adjusted card view. Furthermore, since the SurfaceControl layer actually embedded in the host layer of the host application of the electronic device and the SurfaceControl layer included in the embedded window layer generated by the taxi-hailing application of the electronic device are the same layer, the SurfaceControl layer displayed by the host application of the electronic device is also updated accordingly, i.e., the card corresponding to the taxi-hailing application displayed by the host application of the electronic device is also updated accordingly.
[0100] In some examples, in order to implement the card display method provided in the embodiments of the present application, such as Figure 6 As shown, the application layer may also include management plug-ins corresponding to the application, specifically, management plug-ins corresponding to the application providing the card and management plug-ins corresponding to the host application.
[0101] The management plug-in corresponding to the application can be AAR (android archive) or JAR (Java Archive). In the embodiment of the present application, the specific type of the management plug-in corresponding to the application is not limited. In the embodiment of the present application, the management plug-in corresponding to the application is AAR as an example for illustration.
[0102] The AAR may include an AAR corresponding to the application providing the card and an AAR corresponding to the host application.
[0103] The AAR (also called card kit) corresponding to the application that provides the card can serve as a bridge for interaction between the application that provides the card and the card management service of the electronic device. That is, the card kit can integrate the relevant interfaces of the card display, so that the application that provides the card can establish a communication connection with the card management service through the relevant interfaces of the card display integrated by the card kit, and then interact with the card management service through the card kit. In other words, the application that provides the card does not need to understand the card management service of the electronic device, and can implement functions such as card access, timed refresh, card cache, card acquisition and card destruction by simply calling the relevant interfaces provided by the card kit.
[0104] It should be noted that the card kit can be integrated into the application program that provides cards in the electronic device, that is, all the applications that provide cards in the electronic device can integrate the card kit. For example, the taxi application program of the electronic device can integrate the card kit. For another example, the food delivery application program of the electronic device can also integrate the card kit.
[0105] The AAR corresponding to the host application (also called Host AAR) can serve as a bridge for interaction between the host application of the electronic device and the card management service. That is, the Host AAR can integrate the relevant interfaces of the card display, so that the host application can establish a communication connection with the card management service through the relevant interfaces of the card display integrated by the Host AAR. In this way, the host application can quickly access the card management service through the Host AAR to help the host application realize functions such as host access, request to show / hide, obtain HostView (host view), size change, configuration (config) change, etc.
[0106] It should be noted that Host AAR can be integrated into the host application of the electronic device, that is, each host application of the electronic device can integrate Host AAR. For example, the desktop of the electronic device can integrate Host AAR. For another example, the notification center of the electronic device can integrate Host AAR. For another example, the negative first screen of the electronic device can integrate Host AAR.
[0107] like Figure 6 As shown, the application framework layer may also include a card display service (DisplayService), a card management service (LiveClipManagerService) and a system service (Service), etc.
[0108] The card display service can be used as the initiator of the relevant instructions for card display. The card display service is used to receive relevant notifications sent by the decision-making center (i.e., the application that comes with the electronic device) to control the host application to display the card, and in response to the relevant notifications of controlling the host application to display the card, notify the host application to display the card, hide the card, or destroy the card.
[0109] The card management service can be a bridge connecting the card process and the host process. That is, the card management service can implement functions such as card lifecycle management, power consumption control, data caching, and exception recovery. The card management service can be used to obtain relevant notifications of the host application's card display, and use the system service to send relevant notifications of card display to the card kit to notify the card kit to obtain the embedded window layer corresponding to the card view from the application that provides the card. The card management service can also be used to use the system service to establish a communication connection with the Host AAR, and send the embedded window layer corresponding to the obtained card view to the host application through the Host AAR for the host application to display the card.
[0110] System services have the basic capabilities of Android native services, that is, system services can provide cross-process data transmission channels.
[0111] Combine the following Figure 6 , taking the application that provides the card as a taxi-hailing application as an example, the card display method provided in the embodiment of the present application is further schematically illustrated.
[0112] like Figure 6 As shown, a card display method provided by an embodiment of the present application may include S601-S609.
[0113] S601. Upon receiving a service notification sent by a taxi-hailing application of an electronic device, the card display service of the electronic device sends a card display notification to a host application of the electronic device.
[0114] The service notification is used to indicate that the service of the taxi-hailing application of the electronic device has changed (such as the driver accepting an order), and the card display notification is used to instruct the host application to display the taxi-hailing application card. The host application may include the electronic device's desktop, negative one screen, notification center, banner notification, screen off, lock screen, etc.
[0115] After the electronic device is turned on, the host application (desktop, negative one screen, notification center, banner notification, screen off and lock screen, etc.) registers the business changes of the taxi application (not shown in the figure). When the business of the taxi application changes, the card display service sends a card display notification to these host applications to notify the host applications of the electronic device that they currently need to display the taxi application card.
[0116] For example, after a user places a taxi order using a taxi application on an electronic device, when the service of the taxi application changes (such as a driver accepting an order), the taxi application can send a service notification to the card display service of the electronic device, that is, the taxi application notifies the card display service that the taxi application card currently needs to be displayed. After the card display service of the electronic device receives the service notification sent by the taxi application, it can send a card display notification to the host application of the electronic device (such as the desktop, negative one screen, notification center, banner notification, screen off, lock screen) to notify the host application of the electronic device that the taxi application card needs to be displayed. Thus, when the electronic device switches to the desktop, the desktop of the electronic device can display the taxi application card. When the electronic device switches to the notification center, the notification center of the electronic device can display the taxi application card.
[0117] S602: The host application of the electronic device receives a card display notification and sends a first request to a Host AAR corresponding to the host application, where the first request is used to request display of a taxi application card.
[0118] It should be noted that since the card display service of the electronic device can send a card display notification to the host applications of all registered taxi-hailing applications of the electronic device with business changes, after each host application of all registered taxi-hailing applications with business changes receives the card display notification sent by the card display service, each host application can send a first request to the Host AAR corresponding to the host application.
[0119] S603. The Host AAR corresponding to the host application receives the first request and sends a second request to the card management service of the electronic device, where the second request is used to request display of the taxi application card.
[0120] After the Host AAR corresponding to the host application receives the first request, the Host AAR corresponding to the host application uses the system service of the electronic device to establish cross-process communication with the card management service of the electronic device, and sends a second request to the card management service of the electronic device to request the card management service of the electronic device to display the taxi application card.
[0121] It should be noted that, since each host application among all host applications with business changes registered for taxi applications can send a first request to the Host AAR corresponding to the host application after receiving the card display notification sent by the card display service, therefore, after the Host AAR corresponding to each host application receives the first request, the Host AAR corresponding to each host application can send a second request to the card management service of the electronic device.
[0122] S604. The card management service receives the second request and sends a third request to the card kit corresponding to the taxi-hailing application. The third request is used to request to obtain the embedded window layer corresponding to the taxi-hailing application card.
[0123] After the card management service of the electronic device receives the second request, the card management service can use the system service of the electronic device to establish cross-process communication with the card kit corresponding to the taxi-hailing application, and send a third request to the card kit corresponding to the taxi-hailing application to obtain the embedded window layer corresponding to the taxi application card from the card kit corresponding to the taxi-hailing application.
[0124] It should be noted that since the Host AAR corresponding to each host application can send a second request to the card management service of the electronic device, after the card management service receives the second request sent by the Host AAR corresponding to each host application, the card management service can send a third request to the card kit corresponding to the taxi application.
[0125] S605. The card kit corresponding to the taxi-hailing application receives the third request and sends a fourth request to the taxi-hailing application. The fourth request is used to request to obtain the card view corresponding to the taxi-hailing application card.
[0126] The fourth request includes a card view identifier (ie, view id). The card view identifier can uniquely identify a card view in a card that can be displayed by the host application.
[0127] When the host application of the electronic device displays a card, the host application running in the foreground of the electronic device may change, so that a corresponding card view may be displayed according to the display content of the host application. That is, for the same service of the taxi-hailing application, when different host applications display the taxi-hailing application card, the card views of the taxi-hailing application cards displayed by different host applications are different, and the card view identifiers of different card views are different.
[0128] For example, continuing with the example that the host application of the electronic device may include the desktop, notification center, lock screen, screen off, negative one screen, and banner notification, for the same service of the taxi application (such as the driver accepting an order), the view id of the card view of the taxi application card corresponding to the desktop is 1, the view id of the card view of the taxi application card corresponding to the notification center is 2, the view id of the card view of the taxi application card corresponding to the lock screen is 3, the view id of the card view of the taxi application card corresponding to the screen off is 4, the view id of the card view of the taxi application card corresponding to the negative one screen is 5, and the view id of the card view of the taxi application card corresponding to the banner notification is 6.
[0129] It should be noted that since the card management service can send a third request to the card kit corresponding to the taxi application after receiving the second request sent by the Host AAR corresponding to each host application, after the card kit corresponding to the taxi application receives the third request sent by the card management service when it receives the second request sent by the Host AAR corresponding to a host application, the card kit corresponding to the taxi application can send a fourth request to the taxi application, and the fourth request includes the card view identifier corresponding to the host application.
[0130] S606. The taxi application receives the fourth request, and obtains the card view corresponding to the taxi application card according to the card view identifier, and sends the card view corresponding to the taxi application card to the card kit corresponding to the taxi application.
[0131] S607. The card kit corresponding to the taxi application receives the card view corresponding to the taxi application card, generates the embedded window layer corresponding to the taxi application card according to the card view corresponding to the taxi application card, and sends the embedded window layer corresponding to the taxi application card to the card management service.
[0132] After receiving the card view corresponding to the taxi application card, the card kit corresponding to the taxi application can generate an embedded window layer corresponding to the taxi application card according to the card view corresponding to the taxi application card. Furthermore, the card kit corresponding to the taxi application can encapsulate the embedded window layer corresponding to the taxi application card to obtain a data packet of the embedded window layer corresponding to the taxi application card, and send the data packet of the embedded window layer corresponding to the taxi application card to the card management service by using the cross-process channel provided by the system service of the electronic device.
[0133] S608. The card management service receives the embedded window layer corresponding to the taxi-hailing application card, and sends the embedded window layer corresponding to the taxi-hailing application card to the Host AAR corresponding to the host application.
[0134] After the card management service of the electronic device receives the data packet of the embedded window layer corresponding to the taxi application card, the card management service uses the cross-process channel provided by the system service of the electronic device to send the data packet of the embedded window layer corresponding to the taxi application card to the Host AAR corresponding to the host application.
[0135] S609. The Host AAR corresponding to the host application receives the embedded window layer corresponding to the taxi-hailing application card, and sends the embedded window layer corresponding to the taxi-hailing application card to the host application.
[0136] The Host AAR corresponding to the host application can send a data packet of the embedded window layer corresponding to the taxi application card to the host application of the electronic device. After the host application of the electronic device receives the data packet of the embedded window layer corresponding to the taxi application card, it can mount the embedded window layer corresponding to the taxi application card on its own host layer (i.e., SurfaceView). Afterwards, when the electronic device runs the host application, the host application of the electronic device can display the embedded window layer corresponding to the taxi application card, that is, the host application of the electronic device displays the taxi application card.
[0137] Because when an electronic device displays a card corresponding to an application that provides a card, the application that provides a card running on the electronic device can create a card view, generate an embedded window layer corresponding to the card based on the card view, and send the embedded window layer corresponding to the card to the host application of the electronic device, so that the host application of the electronic device displays the embedded window layer corresponding to the card. That is, when the host application of the electronic device displays the card corresponding to the application that provides a card, the host application of the electronic device displays its own embedded window layer instead of directly displaying the card corresponding to the application that provides the card. Therefore, the application of the electronic device can create a card view including custom card elements according to demand, and generate an embedded window layer including custom card elements based on the card view, so that when the host application of the electronic device displays notification information of the application, the host application of the electronic device can display a card view including different custom card elements.
[0138] In some examples, when the application providing the card is a travel application (such as a taxi application, a map application, etc.) or a delivery application (such as a food delivery application, a courier application, etc.), the custom card element may include a progress bar, which can be used to prompt the processing progress of the order of the travel application or the delivery application.
[0139] The following is combined with Figure 7 , taking the taxi application card displayed on the lock screen of an electronic device as an example, the above progress bar is schematically explained.
[0140] After the taxi-hailing application of the electronic device generates a taxi-hailing order, the lock screen interface of the electronic device may display the taxi-hailing application card. Figure 7 As shown, the taxi application card 20 may include a progress bar 21. The progress bar 21 may be used to prompt the user of the processing progress of the taxi order. The progress bar 21 may include a first identifier 01 and a second identifier 02. The first identifier 01 may be used to indicate the starting point (i.e., the location of the order-receiving vehicle when the driver accepts the order), i.e., the first identifier 01 may be used to indicate the start of the taxi order. The second identifier 02 may be used to indicate the destination of the taxi order, i.e., the second identifier 02 may be used to indicate that the taxi order has been completed. The progress bar 21 may also include a connecting line 03 between the first identifier 01 and the second identifier 02, and the vehicle identifier 04 displayed on the connecting line 03 may indicate that a driver has accepted the order. And, after the driver accepts the order, the distance between the vehicle identifier 04 and the second identifier 02 may indicate the distance between the order-receiving vehicle and the destination of the taxi order, i.e., the processing progress of the taxi order.
[0141] It should be noted that the first mark 01 and the second mark 02 can be located at the left and right ends of the progress bar 21 respectively. Figure 7 As shown, the first mark 01 can be located at the left end of the progress bar 21, and the second mark 02 can be located at the right end of the progress bar 21. Of course, the first mark 01 can also be located at the right end of the progress bar 21, and the second mark 02 can also be located at the left end of the progress bar 21.
[0142] In addition, since the congestion conditions of the driving routes corresponding to the taxi orders are different, the colors of the connecting line 03 between the first mark 01 and the second mark 02 may be different, so that different colors can prompt the user of different congestion conditions. For example, the color of a certain section of the connecting line 03 between the first mark 01 and the second mark 02 may be red, and the red line segment may indicate that the driving section corresponding to the line segment is severely congested. For another example, the color of a certain section of the connecting line 03 between the first mark 01 and the second mark 02 may be yellow, and the yellow line segment may indicate that the driving section corresponding to the line segment is relatively congested. For another example, the color of a certain section of the connecting line between the first mark 01 and the second mark 02 may be green, and the green line segment may indicate that the driving section corresponding to the line segment is severely congested and relatively unobstructed.
[0143] Combine the following Figure 8 and Fig. 9 , taking the case where the application providing the card is a taxi-hailing application, the host application is a lock screen, and the taxi-hailing application card includes a progress bar as an example, the card display process of an embodiment of the present application is schematically illustrated.
[0144] For example, after a user opens a taxi-hailing application on an electronic device, Figure 8 As shown in (a) of FIG. 1 , the electronic device displays an interface 31 corresponding to the taxi-hailing application. The interface 31 corresponding to the taxi-hailing application may include a departure input box 32 and a destination input box 33. The user may input the departure place and the destination in the departure input box 32 and the destination input box 33, respectively. After the electronic device receives the departure place and the destination input by the user, as shown in FIG. Figure 8 As shown in (b) in FIG. 3 , the electronic device displays a vehicle call interface 34. The vehicle call interface 34 may include a vehicle model selection control 35, a departure time selection control 36, a passenger number selection control 37, a payment method selection control 38, and a call control 39. The user can set the type of vehicle for receiving the order through the vehicle model selection control 35, such as the user can select vehicle model A. The user can set the departure time through the departure time selection control 36, such as the user can set the departure time to the current time. The user can set the number of passengers through the passenger number selection control 37, such as the user can select 2 people to take the vehicle. The user can select a payment method through the payment method selection control 38, such as the user selects online payment. After the user selects the vehicle, departure time, passenger number, and payment method, the user can click the call control 39. When the electronic device receives the user's trigger operation on the call control 39, in response, the taxi application of the electronic device generates a taxi order and publishes the taxi order to wait for the driver to accept the order.
[0145] When the taxi-hailing application on the electronic device detects that the driver has not yet accepted the order, Fig. 9As shown in (a) of FIG. 1 , the electronic device may display a taxi application card 41 in the lock screen interface 40 , and the taxi application card 41 may include an icon 411 of the taxi application and a text 412 of “waiting for the driver to accept the order”. Fig. 9 As shown in (a) in the figure, the taxi application card 41 may also include a progress bar 413. The progress bar 413 may include a first identifier 01, a second identifier 02, and a connecting line 03 between the first identifier 01 and the second identifier 02. Among them, the first identifier 01 can be used to indicate the starting point (i.e., the location of the order-receiving vehicle when the driver accepts the order), that is, the first identifier 01 can be used to indicate that the taxi order has started to be executed. The second identifier 02 can be used to indicate the destination of the taxi order, that is, the second identifier 02 can be used to indicate that the taxi order has been executed. At this time, the vehicle identifier is not displayed on the connecting line 03 between the first identifier 01 and the second identifier 02 to remind the user that the driver has not yet accepted the order.
[0146] When the taxi-hailing application on the electronic device detects that the driver has accepted the order, Fig. 9 As shown in (b) of FIG. 4 , the electronic device may display a taxi application card 42 in the lock screen interface 40. The taxi application card 42 may include an icon 421 of the taxi application and a text 422 of “the driver has accepted the order”. Fig. 9 As shown in (b) of FIG. 4 , the taxi application card 42 may further include a progress bar 423. The progress bar 423 may include a first mark 01, a second mark 02, and a connecting line 03 between the first mark 01 and the second mark 02. Fig. 9 Compared with the progress bar 413 shown in (a) of FIG. 4 , the progress bar 423 in the taxi-hailing application card 42 may also include a vehicle logo 04, which is located on the connecting line 03 between the first logo 01 and the second logo 02, and the vehicle logo 04 is close to the first logo 01. In other words, the vehicle logo 04 is displayed on the connecting line 03 between the first logo 01 and the second logo 02, close to the first logo 01, to prompt the driver that the order has been accepted.
[0147] Afterwards, the driver goes to the departure location to pick up the user. At this time, if Fig. 9 As shown in (c) of FIG. 4 , the electronic device may display a taxi application card 43 in the lock screen interface 40. The taxi application card 43 may include an icon 431 of the taxi application, a text 432 of “License plate number XXX·Arrival in about 2 minutes”, and a text 433 of “Master Zhang·White”. Fig. 9 As shown in (c) of FIG. 4 , the taxi application card 43 may further include a progress bar 434. The progress bar 434 may include a first mark 01, a second mark 02, a connecting line 03 between the first mark 01 and the second mark 02, and a vehicle mark 04 located on the connecting line 03. Fig. 9Compared with the progress bar 423 shown in (b) of FIG. 1 , the vehicle identifier 04 in the progress bar 434 moves a distance toward the second identifier 02, indicating that the order-receiving vehicle has traveled a distance, that is, the change in the distance between the vehicle identifier 04 and the second identifier 02 in the progress bar 434 can indicate that the order-receiving vehicle is heading toward the departure point where the user is located. For example, the shorter the distance between the vehicle identifier 04 and the second identifier 02, the closer the order-receiving vehicle is to the departure point where the user is located.
[0148] Afterwards, when the taxi-hailing application on the electronic device detects that the driver has arrived at the departure location, Fig. 9 As shown in (d) in FIG. 4 , the electronic device may display a taxi application card 44 in the lock screen interface 40. The taxi application card 44 may include an icon 441 of the taxi application, a text 442 of “The driver has arrived”, and a text 443 of “Master Zhang·White”. Fig. 9 As shown in (d) in FIG. 4 , the taxi application card 44 may further include a progress bar 444. The progress bar 444 may include a first mark 01, a second mark 02, a connecting line 03 between the first mark 01 and the second mark 02, and a vehicle mark 04 located on the connecting line 03. Fig. 9 Compared with the progress bar 434 shown in (c), the vehicle identification 04 in the progress bar 444 continues to move a distance toward the second identification 02, and the position of the vehicle identification 04 remains unchanged. That is, the distance between the vehicle identification 04 in the progress bar 444 and the second identification 02 and the moving state of the vehicle identification 04 can prompt the driver that the vehicle has arrived and ask the user to get on the vehicle as soon as possible.
[0149] After that, after the driver picks up the user, when the driver drives to the destination according to the taxi order, Fig. 9 As shown in (e) in FIG. 4 , the electronic device may display a taxi application card 45 in the lock screen interface 40. The taxi application card 45 may include an icon 451 of the taxi application, a text 452 of “driving to the destination·arrive in about 20 minutes”, and a text 453 of “Master Zhang·white”. Fig. 9 As shown in (e) of FIG. 4 , the taxi application card 45 may further include a progress bar 454. The progress bar 454 may include a first identifier 01, a second identifier 02, a connecting line 03 between the first identifier 01 and the second identifier 02, and a vehicle identifier 04 located on the connecting line 03. Fig. 9 Compared with the progress bar 444 shown in (d), the vehicle identification 04 in the progress bar 454 continues to move toward the second identification 02 for a distance, and the distance between the vehicle identification 04 and the second identification 02 gradually shortens. That is, the distance between the vehicle identification 04 and the second identification 02 in the progress bar 454 gradually shortens, which can indicate that the order-receiving vehicle is heading towards the destination.
[0150] Later, when the taxi app detects that the user has arrived at the destination, Fig. 9 As shown in (f) in FIG. 1 , the electronic device may display a taxi application card 46 in the lock screen interface 40. The taxi application card 46 may include an icon 461 of the taxi application and a text 462 of “arrived at the destination”. Fig. 9 As shown in (f) of FIG. 4 , the taxi application card 46 may further include a progress bar 463. The progress bar 463 may include a first mark 01, a second mark 02, a connecting line 03 between the first mark 01 and the second mark 02, and a vehicle mark 04 located on the connecting line 03 between the first mark 01 and the second mark 02. Fig. 9 Compared with the taxi application card 45 shown in (e) in the figure, the vehicle mark 04 in the progress bar 463 of the taxi application card 46 moves to the position of the second mark 02 to prompt that the order-receiving vehicle has arrived at the destination and the taxi order has been completed.
[0151] That is to say, when the business of the taxi-hailing application changes (such as a change in the processing progress of the taxi order), the progress bar included in the taxi-hailing application card displayed in the lock screen interface of the electronic device is updated synchronously.
[0152] In this example, the taxi-hailing application running on the electronic device can generate a card view including a progress bar, and send the embedded window layer corresponding to the card view including the progress bar to the host application, so that the host application of the electronic device can display the embedded window layer corresponding to the card view including the progress bar, that is, the host application of the electronic device can display the taxi-hailing application card including the progress bar. Furthermore, the progress bar can be used to more intuitively and effectively show the user the processing progress of the taxi order, and the display effect is better. Furthermore, updating the progress bar in real time according to the processing progress of the taxi order can ensure the timeliness of the notification information of the taxi-hailing application, and provide a better user experience.
[0153] In some examples, the progress bar may be a segmented progress bar. For example, taking the taxi application card displayed on the lock screen of the electronic device as an example, the segmented progress bar is schematically illustrated as follows: Fig.10As shown, the taxi application card 50 may include a segmented progress bar 51. The segmented progress bar 51 may be used to prompt the user of the processing progress of the taxi order. The segmented progress bar 51 may include a first mark 01, a second mark 02, and a third mark 05. The first mark 01 may be used to indicate the starting point (i.e., the location of the order-receiving vehicle when the driver accepts the order), i.e., the first mark 01 may be used to indicate the start of the taxi order. The second mark 02 may be used to indicate the destination of the taxi order, i.e., the second mark 02 may be used to indicate that the taxi order has been completed. The third mark 05 may be used to indicate the departure point where the user who placed the order is located. The third mark 03 is located between the first mark 01 and the second mark 02, and the third mark 05 may divide the connection line between the first mark 01 and the second mark 02 into two sections, i.e., the third mark 05 may divide the processing process of the taxi order into two stages. In other words, the first connection line 06 between the first mark 01 and the third mark 05 may be used to indicate that the order-receiving vehicle drives from the starting point to the departure point where the user is located. The second connecting line 07 between the third mark 05 and the second mark 02 can be used to indicate that the order-receiving vehicle is driving from the departure point where the user is located to the destination. Fig.10 As shown, the segmented progress bar 51 may also include a vehicle identifier 04. When the vehicle identifier 04 is on the first connecting line 06, it indicates that the order-receiving vehicle is driving from the starting point to the departure point where the user is located. When the vehicle identifier 04 is on the first connecting line 07, it indicates that the order-receiving vehicle has picked up the user and is driving from the departure point where the user is located to the destination.
[0154] It should be noted that the type of the connecting line can be used to indicate the current processing stage of the taxi order. For example, when the first connecting line 06 and the second connecting line 07 are both dotted lines, it indicates that the driver has not yet accepted the order. When the first connecting line 06 is a solid line and the second connecting line 07 is a dotted line, it indicates that the order-accepting vehicle is driving from the starting point to the departure point where the user is located, that is, the current processing stage of the taxi order is the stage where the driver picks up the user, that is, the driver has not yet picked up the user and has not yet entered the stage where the driver sends the user to the destination. When the second connecting line 07 is a solid line, it indicates that the order-accepting vehicle is driving from the departure point where the user is located to the destination, that is, the current processing stage of the taxi order enters the stage where the driver sends the user to the destination.
[0155] The first mark 01 and the second mark 02 may be located at the left and right ends of the segmented progress bar 51, respectively. Fig.10 As shown, the first mark 01 can be located at the left end of the segmented progress bar 51, and the second mark 02 can be located at the right end of the segmented progress bar 51. Of course, the first mark 01 can also be located at the right end of the segmented progress bar 51, and the second mark 02 can also be located at the left end of the segmented progress bar 51.
[0156] In addition, since the congestion conditions of the driving routes corresponding to the taxi orders are different, the colors of the first connecting line 06 between the first logo 01 and the third logo 05 can be different, and the colors of the second connecting line 07 between the third logo 05 and the second logo 02 can also be different, so that different colors can prompt users of different congestion conditions.
[0157] Combine the following Fig.11 , taking the case where the application providing the card is a taxi-hailing application, the host application is a lock screen, and the taxi-hailing application card includes a segmented progress bar as an example, the card display process of an embodiment of the present application is schematically illustrated.
[0158] After a user places a taxi order using a taxi-hailing application on an electronic device, when the taxi-hailing application on the electronic device detects that the driver has not accepted the order, Fig.11 As shown in (a) of FIG. 1 , the electronic device may display a taxi application card 61 in the lock screen interface 60 , and the taxi application card 61 may include an icon 611 of the taxi application and a text 612 of “waiting for the driver to accept the order”. Fig.11 As shown in (a) in the figure, the taxi application card 61 may also include a progress bar 613. The progress bar 613 may include a first identifier 01, a second identifier 02, and a third identifier 05 located between the first identifier 01 and the second identifier 02. The first identifier 01 may be used to indicate the starting point (i.e., the location of the order-taking vehicle when the driver accepts the order), i.e., the first identifier 01 may be used to indicate that the taxi order has started to be executed. The second identifier 02 may be used to indicate the destination of the taxi order, i.e., the second identifier 02 may be used to indicate that the taxi order has been completed. The third identifier 05 may be used to indicate the departure point where the user who placed the order is located. The segmented progress bar 613 also includes a first connecting line 06 between the first identifier 01 and the third identifier 05, and a second connecting line 07 between the third identifier 05 and the second identifier 02. At this time, the first connecting line 06 and the second connecting line 07 are both dotted lines, and the vehicle identifier is not displayed on the first connecting line 06 to prompt the user that the driver has not yet accepted the order.
[0159] Afterwards, when the taxi-hailing application on the electronic device detects that the driver has accepted the order, Fig.11 As shown in (b) of FIG. 1 , the electronic device may display a taxi application card 62 in the lock screen interface 60. The taxi application card 62 may include an icon 621 of the taxi application and a text 622 of “the driver has accepted the order”. Fig.11As shown in (b) of FIG. 1 , the taxi-hailing application card 62 may further include a segmented progress bar 623. The segmented progress bar 623 may include a first mark 01, a second mark 02, and a third mark 05 located between the first mark 01 and the second mark 02. The segmented progress bar 613 also includes a first connecting line 06 between the first mark 01 and the third mark 05, a second connecting line 07 between the third mark 05 and the second mark 02, and a vehicle mark 04. Fig.11 Compared with the segmented progress bar 613 shown in (a), the first connecting line 06 is a solid line, and the vehicle logo 04 is located on the first connecting line 06. That is, by updating the line type of the first connecting line 06 from a dotted line to a solid line, and displaying the vehicle logo 04 on the first connecting line 06, it can be prompted that the driver has accepted the order and can accurately go to the departure place to pick up the user.
[0160] Afterwards, the driver drives to the departure location to pick up the user. At this time, if Fig.11 As shown in (c) of FIG. 6 , the electronic device may display a taxi application card 63 in the lock screen interface 60. The taxi application card 63 may include an icon 631 of the taxi application, a text 632 of “License plate number XXX·Arrival in about 2 minutes”, and a text 633 of “Master Zhang·White”. Fig.11 As shown in (c) of FIG. 1 , the taxi-hailing application card 63 may further include a segmented progress bar 634. The segmented progress bar 634 may include a first mark 01, a second mark 02, and a third mark 05 located between the first mark 01 and the second mark 02. The segmented progress bar 634 also includes a first connecting line 06 between the first mark 01 and the third mark 05, a second connecting line 07 between the third mark 05 and the second mark 02, and a vehicle mark 04 located on the first connecting line 06. Fig.11 Compared with the segmented progress bar 623 shown in (b), the vehicle identification 04 in the segmented progress bar 634 moves a distance toward the third identification 05 and is close to the third identification 05. That is, through the changes in the moving direction of the vehicle identification 04 in the segmented progress bar 634 and the distance between the vehicle identification 04 and the third identification 05, it can be prompted that the order-receiving vehicle is about to arrive at the departure place, and the user is requested to go to the departure place as soon as possible.
[0161] Afterwards, when the driver picks up the user and drives to the destination, Fig.11 As shown in (d) of FIG. 6 , the electronic device may display a taxi application card 64 in the lock screen interface 60. The taxi application card 64 may include an icon 641 of the taxi application, a text 642 of “driving to the destination·arrive in about 20 minutes”, and a text 643 of “Master Zhang·white”. Fig.11As shown in (d) in FIG. 1 , the taxi application card 64 may further include a segmented progress bar 644. The segmented progress bar 644 may include a first mark 01, a second mark 02, and a third mark 05 located between the first mark 01 and the second mark 02. The segmented progress bar 644 also includes a first connecting line 06 between the first mark 01 and the third mark 05, a second connecting line 07 between the third mark 05 and the second mark 02, and a vehicle mark 04. Fig.11 Compared with the segmented progress bar 634 shown in (c) in FIG, the second connecting line 07 in the segmented progress bar 644 is a solid line, and the vehicle logo 04 is located on the second connecting line 07, indicating that the order-receiving vehicle has picked up the user and is driving from the departure point where the user is located to the destination. That is, by updating the line type of the second connecting line 07 from a dotted line to a solid line, and displaying the vehicle logo 04 on the second connecting line 07, it can be prompted that the driver has picked up the user and is heading to the destination.
[0162] Afterwards, when the order vehicle arrives at the destination, Fig.11 As shown in (e) in FIG. 1 , the electronic device may display a taxi application card 65 in the lock screen interface 60. The taxi application card 65 may include an icon 651 of the taxi application and a text 652 of “arrived at the destination”. Fig.11 As shown in (e) in FIG. 5 , the taxi application card 65 may also include a segmented progress bar 653. Fig.11 Compared with the segmented progress bar 644 shown in (d) in FIG. 1 , the segmented progress bar 653 may include the first mark 01 and the second mark 02, that is, the segmented progress bar 653 does not include the third mark. The segmented progress bar 653 may also include a connecting line 03 between the first mark 01 and the second mark 02, and the connecting line 03 is a solid line, that is, by canceling the display of the third mark and the vehicle mark in the segmented progress bar 654 and displaying the connecting line 03 between the first mark 01 and the second mark 02, it can be prompted that the order-receiving vehicle has arrived at the destination and the taxi order has been completed.
[0163] That is to say, when the business of the taxi-hailing application changes (the processing progress of the taxi order changes), the segmented progress bar included in the taxi-hailing application card displayed in the lock screen interface of the electronic device is updated synchronously.
[0164] In this example, the taxi-hailing application running on the electronic device can generate a card view including a segmented progress bar, and send the embedded window layer corresponding to the card view including the segmented progress bar to the host application, so that the host application of the electronic device can display the embedded window layer corresponding to the card view including the segmented progress bar, that is, the host application of the electronic device can display the taxi-hailing application card including the segmented progress bar. Furthermore, the segmented progress bar can be used to more intuitively and effectively show the processing progress of the taxi order to the user, and the display effect is better. Furthermore, the segmented progress bar is updated in real time according to the processing progress of the taxi order, which can ensure the timeliness of the notification information of the taxi-hailing application and provide a better user experience.
[0165] In some examples, when the application providing the card is a taxi-hailing application, the taxi-hailing application may include a first progress bar and a second progress bar, the first progress bar being used to indicate that the order-receiving vehicle is driving from a starting point (i.e., the location of the order-receiving vehicle when the driver accepts the order) to a departure location where the user is located, and the second progress bar being used to indicate that the order-receiving vehicle is driving from the departure location where the user is located to a destination.
[0166] Combine the following Fig.12 , continuing with the example that the application providing the card is a taxi application, the host application is a lock screen, and the taxi application card includes a first progress bar and a second progress bar, the card display process of an embodiment of the present application is schematically illustrated.
[0167] After a user places a taxi order using a taxi-hailing application on an electronic device, when the taxi-hailing application on the electronic device detects that the driver has not accepted the order, Fig.12 As shown in (a) of FIG. 1 , the electronic device may display a taxi application card 71 in the lock screen interface 70 , and the taxi application card 71 may include an icon 711 of the taxi application and a text 712 of “waiting for the driver to accept the order”. Fig.12 As shown in (a) in the figure, the taxi application card 71 may also include a first progress bar 713. The first progress bar 713 may include a first identifier 01, a third identifier 05, and a first connecting line 06 between the first identifier 01 and the third identifier 05. The first identifier 01 may be used to indicate the starting point (i.e., the location of the order-receiving vehicle when the driver accepts the order), i.e., the first identifier 01 may be used to indicate the start of the taxi order. The third identifier 05 may be used to indicate the departure point where the user who placed the order is located. At this time, the vehicle identifier is not displayed on the first connecting line 06 between the first identifier 01 and the third identifier 05 to prompt the user that the driver has not yet accepted the order.
[0168] After a user places a taxi order using a taxi-hailing application on an electronic device, when the taxi-hailing application on the electronic device detects that the driver has accepted the order, Fig.12As shown in (b) of FIG. 1 , the electronic device may display a taxi application card 72 in the lock screen interface 70. The taxi application card 72 may include an icon 721 of the taxi application and a text 722 of “the driver has accepted the order”. Fig.12 As shown in (b) of FIG. 1 , the taxi application card 72 may further include a first progress bar 723. The first progress bar 723 may include a first mark 01, a third mark 05, and a first connecting line 06 between the first mark 01 and the third mark 05. Fig.12 Compared with the first progress bar 713 shown in (a), the first progress bar 723 can also include a vehicle logo 04 displayed on the first connecting line 06 between the first logo 01 and the third logo 05, and the vehicle logo 04 is close to the first logo 01, that is, by displaying the vehicle logo 04 on the first connecting line 06 between the first logo 01 and the second logo 02 close to the first logo 01, the driver can be prompted that the order has been accepted and can accurately go to the departure place to pick up the user.
[0169] Afterwards, the driver drives to the departure location to pick up the user. At this time, if Fig.12 As shown in (c) of FIG. 7 , the electronic device may display a taxi application card 73 in the lock screen interface 70. The taxi application card 73 may include an icon 731 of the taxi application, a text 732 of “License plate number XXX·Arrival in about 2 minutes”, and a text 733 of “Master Zhang·White”. Fig.12 As shown in (c) of FIG. 7 , the taxi application card 73 may further include a first progress bar 734. The first progress bar 734 may include a first identifier 01, a third identifier 05, a first connecting line 06 between the first identifier 01 and the third identifier 05, and a vehicle identifier 04. Fig.12 Compared with the first progress bar 723 shown in (b), the vehicle identifier 04 in the first progress bar 734 moves a distance toward the third identifier 05, that is, the order-receiving vehicle travels a distance to the departure place where the user is located. In other words, the change in the distance between the vehicle identifier 04 and the third identifier 05 in the first progress bar 734 can indicate that the order-receiving vehicle is about to arrive at the departure place, and the user is requested to go to the departure place as soon as possible.
[0170] Afterwards, when the driver arrives at the departure point, Fig.12 As shown in (d) in FIG. 1 , the electronic device may display a taxi application card 74 in the lock screen interface 70. The taxi application card 74 may include an icon 741 of the taxi application, a text 742 of “The driver has arrived”, and a text 743 of “Master Zhang·White”. Fig.12 As shown in (d) in FIG. 1 , the taxi application card 74 may further include a first progress bar 744. The first progress bar 744 may include a first identifier 01, a third identifier 05, a first connecting line 06 between the first identifier 01 and the third identifier 05, and a vehicle identifier 04. Fig.12Compared with the first progress bar 734 shown in (c), the vehicle logo 04 in the first progress bar 744 moves to the position of the third logo 05, that is, the change in the distance between the vehicle logo 04 and the third logo 05 in the first progress bar 734 prompts the driver to arrive at the departure place and wait for the user to get on the vehicle.
[0171] Afterwards, when the driver picks up the user and drives to the destination, Fig.12 As shown in (e) of FIG. 1 , the electronic device may display a taxi application card 75 in the lock screen interface 70. The taxi application card 75 may include an icon 751 of the taxi application, a text 752 of “driving to the destination·arrive in about 20 minutes”, and a text 753 of “Master Zhang·white”. Fig.12 As shown in (e) of FIG. 7 , the taxi-hailing application card 75 may further include a second progress bar 754. The second progress bar 754 may include a third identifier 05, a second identifier 02, a second connecting line 07 between the third identifier 05 and the second identifier 02, and a vehicle identifier 04 located on the second connecting line 07 between the third identifier 05 and the second identifier 02. Fig.12 Compared with the taxi application card 74 shown in (d) in the figure, the progress bar of the taxi application card 75 is updated to a second progress bar 754, and the second progress bar is used to indicate that the order-receiving vehicle is driving from the departure point where the user is located to the destination. That is to say, by updating the progress bar in the taxi application card 75 to the second progress bar 74 and displaying the vehicle logo 04 on the second progress bar 74, it can be prompted that the driver has picked up the user and is ready to drive to the destination.
[0172] Later, when the taxi app detects that the user has arrived at the destination, Fig.12 As shown in (f) in FIG. 1 , the electronic device may display a taxi application card 76 in the lock screen interface 70. The taxi application card 76 may include an icon 761 of the taxi application and a text 762 of “arrived at the destination”. Fig.12 As shown in (f) of FIG. 7 , the taxi application card 76 may further include a second progress bar 763. The second progress bar 763 may include a third identifier 05, a second identifier 02, a second connecting line 07 between the third identifier 05 and the second identifier 02, and a vehicle identifier 04 located on the second connecting line 07 between the third identifier 05 and the second identifier 02. Fig.12 Compared with the taxi application card 75 shown in (e) in the figure, the vehicle logo 04 in the second progress bar 763 of the taxi application card 76 moves to the position of the second logo 02 to prompt that the order-receiving vehicle has arrived at the destination and the taxi order has been completed.
[0173] That is to say, when the business of the taxi-hailing application changes (the processing progress of the taxi order changes), the progress bar included in the taxi-hailing application card displayed in the lock screen interface of the electronic device is updated synchronously.
[0174] In this example, the taxi-hailing application running on the electronic device can generate a card view including a progress bar, and send the embedded window layer corresponding to the card view including the progress bar to the host application, so that the host application of the electronic device can display the embedded window layer corresponding to the card view including the progress bar, that is, the host application of the electronic device can display the taxi-hailing application card including the progress bar. Furthermore, the progress bar can be used to more intuitively and effectively show the user the processing progress of the taxi order, and the display effect is better. Furthermore, updating the progress bar in real time according to the processing progress of the taxi order can ensure the timeliness of the notification information of the taxi-hailing application, and provide a better user experience.
[0175] In some examples, when the electronic device displays cards corresponding to other applications, it may also display a card including a progress bar. Taking the takeaway application card displayed on the lock screen of the electronic device as an example, the above segmented progress bar is schematically explained.
[0176] like Fig.13 As shown, the food delivery application card 80 may include a segmented progress bar 81. The segmented progress bar 81 may be used to prompt the user of the processing progress of the food delivery order. The segmented progress bar 81 may include a fourth identifier 08, a fifth identifier 09 and a sixth identifier 010. The fourth identifier 08 may be used to indicate the starting point (i.e., the location where the rider is when accepting the order), i.e., the fourth identifier 08 may be used to indicate that the food delivery order has started to be executed. The fifth identifier 09 may be used to indicate the location of the ordering user of the food delivery order, i.e., the fifth identifier 09 may be used to indicate that the food delivery order has been completed. The sixth identifier 010 may be used to indicate the location of the merchant corresponding to the food delivery order. The sixth identifier 010 is located between the fourth identifier 08 and the fifth identifier 09. The sixth identifier 010 may divide the connecting line between the fourth identifier 08 and the fifth identifier 09 into two segments, i.e., the sixth identifier 010 may divide the processing process of the food delivery order into two stages. That is to say, the third connection line 011 between the fourth mark 08 and the sixth mark 010 can be used to indicate the rider from the starting point to the location of the merchant, that is, the third connection line 011 can be used to indicate the stage of the merchant accepting the order. The fourth connection line 012 between the sixth mark 010 and the fifth mark 09 can be used to indicate the rider from the location of the merchant to the location of the user, that is, the fourth connection line 012 can be used to indicate the stage of the rider delivering the order. Fig.13As shown, the segmented progress bar 81 may also include a rider identifier 013. When the rider identifier 013 is on the third connecting line 011, it indicates that the rider is from the starting point to the location of the merchant, that is, the takeaway order is in the stage of the merchant accepting the order. When the rider identifier 013 is on the fourth connecting line 012, it indicates that the rider is from the location of the merchant to the location of the user, that is, the takeaway order is in the stage of the rider delivering the order.
[0177] Combine the following Fig.14 , taking the case where the application providing the card is a food delivery application, the host application is a notification center, and the food delivery application card includes a segmented progress bar as an example, the card display process of an embodiment of the present application is schematically illustrated.
[0178] After a user places a takeaway order using a takeaway application on an electronic device, when the takeaway application on the electronic device detects that the rider has not accepted the order, Fig.14 As shown in (a) of FIG. 1 , the electronic device may display a food delivery application card 91 in the notification center 90 , and the food delivery application card 91 may include an icon 911 of the food delivery application and a text 912 of “waiting for the merchant to accept the order”. Fig.14 As shown in (a) in the figure, the food delivery application card 91 may further include a segmented progress bar 913. The segmented progress bar 913 may include a fourth identifier 08, a fifth identifier 09, and a sixth identifier 010 located between the fourth identifier 08 and the fifth identifier 09. The fourth identifier 08 may be used to indicate the starting point (i.e., the location of the rider when accepting the order), i.e., the fourth identifier 08 may be used to indicate the start of the food delivery order. The fifth identifier 09 may be used to indicate the location of the user who placed the food delivery order, i.e., the fifth identifier 09 may be used to indicate that the food delivery order has been completed. The sixth identifier 010 may be used to indicate the location of the merchant corresponding to the food delivery order. In combination Fig.14 As shown in (a) of FIG. 1 , the segmented progress bar 913 also includes a third connection line 011 between the fourth mark 08 and the sixth mark 010, and a fourth connection line 012 between the sixth mark 010 and the fifth mark 09. At this time, the third connection line 011 and the fourth connection line 012 are both dotted lines to remind the user that the merchant has not accepted the order yet.
[0179] Afterwards, when the food delivery application of the electronic device detects that the merchant has accepted the order, Fig.14 As shown in (b) of FIG. 1 , the electronic device may display a food delivery application card 92 in the notification center 90. The food delivery application card 92 may include an icon 921 of the food delivery application, a text 922 of “the merchant has received the order”, and a text 923 of “estimated delivery at 12:42”. Fig.14As shown in (b) of FIG. 1 , the food delivery application card 92 may further include a segmented progress bar 924. The segmented progress bar 924 may include a fourth identifier 08, a fifth identifier 09, and a sixth identifier 010 located between the fourth identifier 08 and the fifth identifier 09. The segmented progress bar 924 also includes a third connecting line 011 between the fourth identifier 08 and the sixth identifier 010, and a fourth connecting line 012 between the sixth identifier 010 and the fifth identifier 09. Fig.14 Compared with the segmented progress bar 913 shown in (a), the third connecting line 011 is a solid line and the fourth connecting line 012 is a dotted line. That is, by updating the line type of the third connecting line 011 from a dotted line to a solid line, it can be prompted that the merchant has accepted the order, is delivering the food accurately, and is waiting for the rider to accept the order.
[0180] Afterwards, when the rider accepts the order and goes to the merchant to pick up the order, Fig.14 As shown in (c) in FIG. 1 , the electronic device may display a food delivery application card 93 in the notification center 90. The food delivery application card 93 may include an icon 931 of the food delivery application, a text 932 of “the rider has received the order”, and a text 933 of “1 km from the merchant, 1 minute to arrive”. Fig.14 As shown in (c) of FIG. 1 , the food delivery application card 93 may further include a segmented progress bar 934. The segmented progress bar 934 may include a fourth identifier 08, a fifth identifier 09, and a sixth identifier 010 located between the fourth identifier 08 and the fifth identifier 09. The segmented progress bar 934 may further include a third connecting line 011 between the fourth identifier 08 and the sixth identifier 010, and a fourth connecting line 012 between the sixth identifier 010 and the fifth identifier 09. Fig.14 Compared with the segmented progress bar 924 shown in (b), the segmented progress bar 934 can also include a rider logo 013 displayed on the third connecting line 011, that is, through the rider logo 013 displayed on the third connecting line 011 in the segmented progress bar 934, it can be prompted that the rider has received the order and is going to the merchant to pick up the order.
[0181] Afterwards, when the rider picks up the food from the merchant and delivers it to the user, Fig.14 As shown in (d) in FIG. 1 , the electronic device may display a food delivery application card 94 in the notification center 90. The food delivery application card 94 may include an icon 941 of the food delivery application, a text 942 of “the rider is delivering the food”, and a text 943 of “602 meters away from you, expected to be delivered in 8 minutes”. Fig.14As shown in (d) in FIG. 1 , the food delivery application card 94 may further include a segmented progress bar 944. The segmented progress bar 944 may include a fourth identifier 08, a fifth identifier 09, and a sixth identifier 010 located between the fourth identifier 08 and the fifth identifier 09. The segmented progress bar 944 also includes a third connecting line 011 between the fourth identifier 08 and the sixth identifier 010, a fourth connecting line 012 between the sixth identifier 010 and the fifth identifier 09, and a rider identifier 013. Fig.14 Compared with the segmented progress bar 934 shown in (c) in FIG, the third connecting line 011 and the fourth connecting line 012 are both solid lines, and the rider logo 013 is located on the fourth connecting line 012, indicating that the rider has picked up the takeaway from the merchant and is traveling from the merchant to the user's location, that is, the line type of the fourth connecting line 012 is updated from a dotted line to a solid line, and the rider logo 013 is displayed on the fourth connecting line 012, which indicates that the rider has picked up the takeaway from the merchant and is delivering the takeaway to the user.
[0182] Afterwards, when the rider has delivered the food to the destination, Fig.14 As shown in (e) in FIG. 1 , the electronic device may display a food delivery application card 95 in the notification center 90. The food delivery application card 95 may include an icon 951 of the food delivery application, a text 952 of “Order delivered”, and a text 953 of “Welcome again”. Fig.14 As shown in (e) in FIG. 1 , the food delivery application card 95 may also include a segmented progress bar 954. Fig.14 Compared with the segmented progress bar 944 shown in (d) in FIG. 1 , the segmented progress bar 954 may include the fourth mark 08 and the fifth mark 09, but not the sixth mark. In addition, the segmented progress bar 954 may also include a connecting line 014 between the fourth mark 08 and the fifth mark 09, and the connecting line 014 between the fourth mark 08 and the fifth mark 09 is a solid line, that is, by canceling the display of the sixth mark and the rider mark in the segmented progress bar 954 and displaying the connecting line 014 between the fourth mark 08 and the fifth mark 09, it can be indicated that the takeaway has been delivered and the takeaway order has been completed.
[0183] That is to say, when the business of the food delivery application changes (the processing progress of the food delivery order changes), the segmented progress bar included in the food delivery application card displayed in the notification center of the electronic device is updated synchronously.
[0184] In this example, the takeaway application running on the electronic device can generate a card view including a segmented progress bar, and send the embedded window layer corresponding to the card view including the segmented progress bar to the host application, so that the host application of the electronic device can display the embedded window layer corresponding to the card view including the segmented progress bar, that is, the host application of the electronic device can display the takeaway application card including the segmented progress bar. Furthermore, the segmented progress bar can be used to more intuitively and effectively display the processing progress of the takeaway order to the user, and the display effect is better. Furthermore, updating the segmented progress bar in real time according to the processing progress of the takeaway order can ensure the timeliness of the notification information of the takeaway application, and provide a better user experience.
[0185] It should be noted that when the host application of the electronic device displays a card, the host application running in the foreground of the electronic device may change. For different host applications, the content to be displayed on the interface of the electronic device is different. Therefore, the corresponding card can be displayed according to the display content of the host application. In other words, when different host applications display the card corresponding to the application providing the card, the display method of the card corresponding to the application providing the card is different. Among them, the display method of the card corresponding to the application providing the card may include at least one of the display content, display size and display position.
[0186] Combine the following Fig.15 , taking the application that provides the card as a taxi-hailing application as an example, the card display process of the embodiment of the present application is schematically illustrated.
[0187] When a user needs to take a taxi, he can use the taxi application of the electronic device to place an order for the taxi. Later, when the electronic device displays the desktop, when the business of the taxi application changes (such as the driver accepting the order), Fig.15 As shown in (a) of FIG. 1 , a taxi application card 111 may be displayed on the top of the desktop 110 of the electronic device. The taxi application card 111 may be used to prompt the driver that the order has been accepted. Fig.15 As shown in (a) of FIG. 1 , the taxi application card 111 may include an icon 112 of the taxi application, text 113 of "License plate number XXX·Arrival in about 2 minutes", and text 114 of "Master Zhang·White". The taxi application card 111 may also include a call control 115, which may be used to contact the driver who accepts the order. The display height of the taxi application card 111 is h1, and the display width of the taxi application card 111 is d1.
[0188] After the electronic device desktop 110 displays the taxi application card 111, when the electronic device receives a pull-down operation from the user on the top status bar of the display screen, in response, Fig.15As shown in (b) of FIG. 1 , the electronic device displays a notification center 120 and displays a taxi application card 121 in the notification center 120. Fig.15 As shown in (b) of FIG. 1 , the taxi-hailing application card 121 may include an icon 122 of the taxi-hailing application, text 123 of “License plate number XXX·Arrival in about 2 minutes”, and text 124 of “Master Zhang·White”. Fig.15 Compared with the taxi application card 111 shown in (a) of FIG. 1 , the taxi application card 121 may further include a progress bar 125. The progress bar 125 may more intuitively prompt the user of the processing progress of the taxi order. Also, the display height of the taxi application card 121 is h2, and the display width of the taxi application card 121 is d2. Among them, the display height h2 of the taxi application card 121 is less than the display height h1 of the taxi application card 111. The display width d2 of the taxi application card 121 may be equal to the display width d1 of the taxi application card 111. It can be seen that when the host application running in the foreground of the electronic device is switched from the desktop to the notification center, the display size of the taxi application card may be reduced, and the space occupied by the taxi application card may be reduced, so that the electronic device may display more other notification information cards, and then the user may view more notification information cards without flipping through operations, which may improve the efficiency of human-computer interaction.
[0189] After the electronic device desktop 110 displays the taxi application card 111, when the electronic device receives the user's lock screen operation (such as pressing the lock screen key), the electronic device enters the lock screen state. When the electronic device is in the lock screen state, in response to the user's touch operation on the display screen of the electronic device, such as Fig.15 As shown in (c) of FIG. 1 , the electronic device displays a lock screen interface 130 and displays a taxi application card 131 on the lock screen interface 130. Fig.15 As shown in (c) of FIG. 1 , the taxi-hailing application card 131 may include an icon 132 of the taxi-hailing application, text 133 of “License plate number XXX·Arrival in about 2 minutes”, and text 134 of “Master Zhang·White”. Fig.15 The taxi application card 111 shown in (a) and Fig.15Compared with the taxi application card 121 shown in (b) of FIG. 1 , the taxi application card 131 may further include a progress bar 135. The progress bar 135 may more intuitively prompt the user with the processing progress of the taxi order. Also, the display height of the taxi application card 131 is h3, and the display width of the taxi application card 131 is d3. Among them, the display height h3 of the taxi application card 131 is less than the display height h2 of the taxi application card 121. The display width d3 of the taxi application card 131 may be equal to the display width d1 of the taxi application card 111. In addition, the taxi application card 131 is located at the lower side of the lock screen interface 130, while the taxi application card 111 is located at the top of the desktop 110, that is, the display position of the taxi application card 131 is different from the display position of the taxi application card 111. It can be seen that when the host application running in the foreground of the electronic device is switched from the desktop to the lock screen, the display size of the taxi application card can be reduced, and the space occupied by the taxi application card can be reduced, so that the electronic device can display more other notification information cards, and then the user can view more notification information cards without flipping through the cards, which can improve the efficiency of human-computer interaction.
[0190] After the electronic device desktop 110 displays the taxi application card 111, when the electronic device receives a lock screen operation from the user (such as pressing a lock screen key), the taxi application card 111 is displayed. Fig.15 As shown in (d) of FIG. 1 , the electronic device displays an always on display (AOD) interface 140 and displays a taxi-hailing application card 141 on the AOD interface 140. Fig.15 Compared to the taxi application card 111 shown in (a) in the figure, the taxi application card 141 is a card capsule. When the electronic device receives a touch operation (such as a sliding operation) from the user on the taxi application card 141 (i.e., the card capsule), the electronic device opens the taxi application. In addition, since the space of the screen-off interface of the electronic device is limited, the display height h4 of the taxi application card 141 (i.e., the card capsule) is smaller than the display height h1 of the taxi application card 111, and the display width d3 of the taxi application card 141 (i.e., the card capsule) is smaller than the display width d1 of the taxi application card 111. In this way, when the host application running in the foreground of the electronic device is switched to the screen-off interface, the space occupied by the taxi application card can be minimized to avoid the taxi application card from being unable to be fully displayed. In addition, combined with Fig.15As shown in (d) in the figure, since the display size of the taxi application card 141 (i.e., the card capsule) is relatively small, the taxi application card 141 (i.e., the card capsule) may include some information related to the taxi order (such as the taxi application icon 142 and the text 143 of "license plate number XXX"). In this way, the user can obtain some information of the taxi application without opening the taxi application, which is more convenient to use.
[0191] In this example, when the host application of the electronic device displays a card, the display mode of the card can be different for different host applications, which can ensure that the cards displayed in different host applications have good display effects. Furthermore, according to the content to be displayed by different host applications and the user's usage habits, the content information carried by the card can be set with emphasis to achieve the purpose of notifying the user, and it can also improve the efficiency of human-computer interaction and thus enhance the user experience.
[0192] The methods in the following embodiments can all be implemented in an electronic device having the above hardware structure or software structure.
[0193] Because after the electronic device is turned on, the host application (desktop, negative one screen, notification center, banner notification, screen off and lock screen, etc.) registers the business changes of the taxi application (not shown in the figure), therefore, when the business changes of the taxi application occur, the electronic device can generate a card view of the taxi application card corresponding to each host application in all host applications that have registered the business changes of the taxi application, and when a host application is running in the foreground of the electronic device, the card view of the taxi application card corresponding to the host application is displayed, that is, the taxi application card corresponding to the host application is displayed.
[0194] The following example takes the card providing application as a taxi-hailing application and the host application as the first host application. Fig.16 , a card display method provided in an embodiment of the present application is described in detail. Fig.16 A schematic diagram of a card display method provided in an embodiment of the present application. Fig.16 As shown, the card display method may include the following S1601-S1630.
[0195] S1601. The taxi application generates a taxi order.
[0196] In some examples, the taxi-hailing application of the electronic device can receive the user's order operation, and in response to the order operation, the taxi-hailing application of the electronic device generates a taxi order. Specifically, when the user uses the taxi-hailing application of the electronic device to place a taxi order, the user can start the taxi-hailing application of the electronic device and perform the corresponding order operation on the taxi-hailing application, that is, the taxi-hailing application of the electronic device can receive the user's order operation. Then, the taxi-hailing application of the electronic device responds to the user's order operation and generates a taxi order.
[0197] The above-mentioned order placing operation may include one operation or multiple operations.
[0198] For example, when the order placing operation includes multiple operations, the order placing operation may include an operation of inputting information related to the taxi order and an operation of triggering the generation of the taxi order. For example, the operation of inputting information related to the taxi order may include an operation of inputting departure information, destination information, departure time information, and vehicle type information. The operation of triggering the generation of the taxi order may be an operation of clicking on the order placing control. For example, the order placing control may be as follows: Figure 8 The call control 39 shown in (b) in FIG.
[0199] S1602. The taxi-hailing application sends the card UUID and card instance information to the decision-making center.
[0200] After the taxi application generates a taxi order, the taxi application can generate card instance information (ie, cardInstanceId) corresponding to the taxi order. After the taxi application of the electronic device generates the cardInstanceId corresponding to the taxi order, the taxi application can send the cardInstanceId corresponding to the taxi order to the decision-making center.
[0201] The card instance information can be used to indicate a taxi order generated by a taxi application, that is, a unique card instance information is generated for each taxi order.
[0202] For example, when a user places two taxi orders (such as order A and order B) using a taxi application, card instance information 1 corresponding to order A can be generated, and card instance information 2 corresponding to order B can be generated. When the processing progress of order A changes, the taxi application can determine that the taxi application card to be displayed by the electronic device is the taxi application card corresponding to order A based on card instance information 1. When the processing progress of order B changes, the taxi application can determine that the taxi application card to be displayed by the electronic device is the taxi application card corresponding to order B based on card instance information 2.
[0203] Furthermore, after the taxi application of the electronic device generates a taxi order, when the processing progress of the taxi order changes (such as the driver accepts the order), the taxi application can generate a card UUID and send the card UUID to the decision-making center of the electronic device to notify the decision-making center that the taxi application card corresponding to the card UUID (i.e., the card corresponding to the notification information of the taxi application) currently needs to be displayed.
[0204] The card UUID can be used to uniquely identify a group of cards corresponding to the business of the taxi application (i.e., the processing progress of the taxi order). In other words, when the processing progress of the taxi order changes, the taxi application sends the card UUID to the decision-making center.
[0205] Specifically, when the host application of the electronic device displays a card, the host application running in the foreground of the electronic device may change. For different host applications, the content to be displayed on the interface of the electronic device is different. That is to say, for the same service of the taxi application (such as the driver accepting an order), the taxi application cards displayed in different host applications of the electronic device are different. Therefore, the card UUID can be used to uniquely identify a group of cards corresponding to a service of the taxi application, that is, the desktop of the electronic device corresponds to the taxi application card, the lock screen of the electronic device corresponds to the taxi application card, the notification center of the electronic device corresponds to the taxi application card, the banner notification (or status bar) of the electronic device corresponds to the taxi application card, the screen of the electronic device corresponds to the taxi application card, and the negative one screen of the electronic device corresponds to the taxi application card.
[0206] For example, after the taxi-hailing application of the electronic device generates a taxi order, the taxi-hailing application of the electronic device will publish the taxi task and wait for the driver to accept the order. After the driver accepts the order, the taxi-hailing application can generate a card UUID (such as a8146578-c7b1-4a19-92eb-f91ae4542779) corresponding to a set of cards indicating that the driver has accepted the order, and send the card UUID to the decision-making center of the electronic device to notify the decision-making center that the card indicating that the driver has accepted the order needs to be displayed.
[0207] S1603. The decision-making center sends a card creation notification to the card display service. The card creation notification includes the card UUID and cardInstanceId. The card creation notification is used to instruct the card display service to create a taxi application card.
[0208] After the decision-making center of the electronic device receives the card UUID sent by the taxi application, the decision-making center can obtain the AppClipInfo (such as the package name of the taxi application, etc.) corresponding to the business of the taxi application based on the card UUID. The decision-making center can determine whether the taxi application has the card display permission based on AppClipInfo. For example, the decision-making center can compare the package name of the taxi application with the white list stored in the electronic device. When the package name of the taxi application is in the white list stored in the electronic device, it is determined that the taxi application has the card display permission. After the decision-making center determines that the taxi application has the card display permission, the decision-making center can determine that the taxi application is an application that meets the emergency conditions, and then the decision-making center can send a card creation notification to the card display service to notify the card display service to create a taxi application card (that is, the card corresponding to the notification information of the taxi application).
[0209] It should be noted that the applications that meet the emergency conditions may be preset applications. Preset applications may include applications related to time information (such as taxi applications, food delivery applications, map applications, express delivery applications, etc.), applications related to property information (such as payment applications, financial applications, etc.), and applications related to personal safety information (such as sports monitoring applications, emergency call applications, etc.).
[0210] S1604. The card display service sends a card display notification to the first host application of the electronic device. The card display notification may include a card UUID and a cardInstanceId. The card display notification is used to notify the first host application of the electronic device to display a taxi application card.
[0211] The card UUID can be obtained from the taxi application. Specifically, after the taxi application of the electronic device generates a taxi order, when the processing progress of the taxi order changes, the taxi application generates and sends the card UUID to the decision-making center of the electronic device. After receiving the card UUID, the decision-making center sends a card creation notification carrying the card UUID to the card display service of the electronic device.
[0212] The cardInstanceId can be obtained from the taxi application. Specifically, after the taxi application of the electronic device generates a taxi order, the taxi application generates a cardInstanceId corresponding to the taxi order. After the taxi application of the electronic device generates the cardInstanceId corresponding to the taxi order, the taxi application can send the cardInstanceId corresponding to the taxi order to the decision-making center. After the decision-making center receives the cardInstanceId, the decision-making center can send a card creation notification carrying the cardInstanceId to the card display service of the electronic device, and then the card display service can send a card display notification carrying the cardInstanceId to the first host application of the electronic device.
[0213] In one example, after the electronic device is turned on, the host application (desktop, negative one screen, notification center, banner notification, screen off and lock screen, etc.) can register the business changes of the taxi application (not shown in the figure). When the business changes of the taxi application occur, the card display service sends a card display notification to these host applications to notify the host applications of the electronic device that the taxi application card currently needs to be displayed. After each host application of the electronic device receives the card display notification sent by the card display service, each host application of the electronic device can send a card display notification to the Host AAR corresponding to the host application to notify the Host AAR corresponding to the host application that the taxi application card currently needs to be displayed.
[0214] The above registration process can also be performed at other times, for example, when the electronic device installs a taxi-hailing application or when the electronic device updates the taxi-hailing application. This application does not limit this.
[0215] That is to say, after the card display service of the electronic device receives the card creation notification sent by the decision-making center, the card display service can send card display notifications to the host applications of the business changes of the above-mentioned registered taxi-hailing application respectively. The host applications of the business changes of the above-mentioned registered taxi-hailing application include the above-mentioned first host application, that is, the first host application can be any one of the applications on the desktop, negative one screen, notification center, banner notification, screen off or lock screen. It should be noted that the specific implementation process of the card display service sending card display notifications to multiple host applications of the business changes of the registered taxi-hailing application can be illustrated by taking S1604 (that is, the specific implementation process of the card display service sending card display notifications to the first host application) as an example.
[0216] S1605: The first host application sends a card display notification to the Host AAR corresponding to the first host application. The card display notification may include a card UUID and a cardInstanceId.
[0217] After the first host application receives the card display notification sent by the card display service, the first host application can send a card display notification to the Host AAR corresponding to the first host application to notify the Host AAR corresponding to the first host application that the taxi application card currently needs to be displayed.
[0218] It should be noted that, after the card display service of the electronic device receives the card creation notification sent by the decision-making center, the card display service can send card display notifications to all host applications of the business changes of all registered taxi applications. Therefore, after each host application of the business changes of all registered taxi applications receives the card display notification sent by the card display service, each host application can send a card display notification to the Host AAR corresponding to the host application. The specific implementation process of each host application sending a card display notification to the Host AAR corresponding to the host application can be illustrated by taking S1605 (i.e., the specific implementation process of the first host application sending a card display notification to the Host AAR corresponding to the first host application) as an example.
[0219] S1606. The Host AAR corresponding to the first host application sends the card UUID, cardInstanceId, hostinfo corresponding to the first host application, and size corresponding to the first host application to the card management service.
[0220] After the Host AAR corresponding to the first host application receives the card UUID and cardInstanceId sent by the first host application, the Host AAR corresponding to the first host application may send the card UUID and cardInstanceId to the card management service.
[0221] The identification information corresponding to the first host application (i.e., hostinfo) and the card size information corresponding to the first host application (i.e., size) may be pre-generated by the first host application. For example, after the electronic device is turned on, the first host application may register the service change of the taxi-hailing application. After the first host application registers the service change of the taxi-hailing application, the first host application may generate the hostinfo corresponding to the first host application and the size corresponding to the first host application, and send the hostinfo corresponding to the first host application and the size corresponding to the first host application to the card management service through the Host AAR corresponding to the first host application.
[0222] Before introducing the hostinfo corresponding to the first host application, the hostinfo of the host application is first described.
[0223] The hostinfo of the host application may include a host identifier (ie, host id) corresponding to the host application and a card view identifier (ie, view id) corresponding to the host application.
[0224] The host identifier may be used to uniquely identify a host application of the electronic device, that is, different host applications of the electronic device correspond to different host identifiers.
[0225] For example, taking the host applications of an electronic device including the desktop, notification center, lock screen, screen off, negative one screen, and banner notification as an example, the host id corresponding to the desktop is 1, the host id corresponding to the notification center is 2, the host id corresponding to the lock screen is 3, the host id corresponding to the screen off is 4, the host id corresponding to the negative one screen is 5, and the host id corresponding to the banner notification is 6.
[0226] The card view identifier can uniquely identify the card view (ie, view) corresponding to the card to be displayed by the host application.
[0227] For example, continuing to take the host applications of the electronic device including the desktop, notification center, lock screen, screen off, negative one screen, and banner notification as an example, for the same service of the taxi application (such as the driver accepting an order), the view id of the card view of the taxi application card corresponding to the desktop is 1, the view id of the card view of the taxi application card corresponding to the notification center is 2, the view id of the card view of the taxi application card corresponding to the lock screen is 3, the view id of the card view of the taxi application card corresponding to the screen off is 4, the view id of the card view of the taxi application card corresponding to the negative one screen is 5, and the view id of the card view of the taxi application card corresponding to the banner notification is 6.
[0228] It should be noted that, since the card view identifiers of the same taxi application card corresponding to different host applications are different, when the host application of the electronic device displays the taxi application card, the electronic device can determine the view id corresponding to the host application according to the host id corresponding to the host application, and then obtain the card view of the taxi application card from the taxi application according to the view id corresponding to the host application.
[0229] The hostinfo corresponding to the first host application is described below.
[0230] The hostinfo of the first host application may include a host id corresponding to the first host application and a view id corresponding to the first host application.
[0231] The host id corresponding to the first host application can be used to uniquely identify the first host application. For example, if the first host application is a desktop, the host id corresponding to the first host application is 1. For another example, if the first host application is a notification center, the host id corresponding to the first host application is 2.
[0232] The view id corresponding to the first host application is the identification information of the card view corresponding to the card to be displayed by the first host application. For example, if the first host application is the desktop, the view id corresponding to the first host application is 1. For another example, if the first host application is the notification center, the view id corresponding to the first host application is 2.
[0233] The card size information corresponding to the host application may be the size information of the card view corresponding to the card allowed to be displayed by the host application, that is, the size information of the card view generated by the application providing the card (such as a taxi application). The card size information corresponding to the host application may include display height and display width.
[0234] The card size information corresponding to the first host application is the size information of the card view corresponding to the card allowed to be displayed by the first host application. For example, if the first host application is the desktop, the card size information corresponding to the first host application may include the display height h1 and the display width d1. For another example, if the first host application is the screen off, the card size information corresponding to the first host application may include the display height h4 and the display width d4, where the display height h4 is smaller than the display height h1, and the display width d4 is smaller than the display width d1.
[0235] It should be noted that, since each host application in the host application (such as the desktop, negative one screen, notification center, banner notification, screen off and lock screen, etc.) of the business change of the registered taxi application can send a card display notification to the Host AAR corresponding to the host application, therefore, after the Host AAR corresponding to each host application receives the card display notification, the Host AAR corresponding to each host application can send the card UUID, cardInstanceId, hostinfo corresponding to the host application and size corresponding to the host application to the card management service. Among them, the specific implementation process of each host application sending the card UUID, cardInstanceId, hostinfo corresponding to the host application and size corresponding to the host application to the card management service can be illustrated by taking S1606 (i.e., the specific implementation process of the Host AAR corresponding to the first host application sending the card UUID, cardInstanceId, hostinfo corresponding to the first host application and size corresponding to the first host application to the card management service) as an example.
[0236] S1607. The card management service obtains the AppClipInfo corresponding to the service of the taxi-hailing application according to the card UUID.
[0237] The AppClipInfo corresponding to the business of the taxi-hailing application may include the package name of the taxi-hailing application, the class name of the specific implementation corresponding to the business of the taxi-hailing application, and the like.
[0238] Specifically, after the card management service of the electronic device receives the card UUID sent by the Host AAR corresponding to the first host application, the card management service can obtain the AppClipInfo corresponding to the service of the taxi application according to the card UUID through the package manager service (PMS).
[0239] Since the card UUID can be used to uniquely identify a group of cards corresponding to the business of the taxi application (i.e., the processing progress of the taxi order), the card management service can obtain the AppClipInfo corresponding to the business of the taxi application based on the card UUID, and then determine and call the card kit corresponding to the taxi application based on the AppClipInfo. The card kit corresponding to the taxi application can determine the TaxiProvider corresponding to the business of the taxi application based on the AppClipInfo, and then the card kit corresponding to the taxi application can obtain the card view corresponding to the taxi application card from the TaxiProvider corresponding to the business of the taxi application.
[0240] S1608. The card management service sends AppClipInfo, cardInstanceId, hostinfo corresponding to the first host application, and size corresponding to the first host application to the card kit corresponding to the taxi application.
[0241] After the card management service obtains the AppClipInfo corresponding to the business of the taxi application based on the card UUID, the card management service can determine the card kit corresponding to the taxi application based on the AppClipInfo corresponding to the business of the taxi application, and send the AppClipInfo corresponding to the business of the taxi application, cardInstanceId, hostinfo corresponding to the first host application, and size corresponding to the first host application to the card kit corresponding to the taxi application.
[0242] It should be noted that since each host application in the host application (such as the desktop, negative one screen, notification center, banner notification, screen off and lock screen, etc.) that registers the business changes of the taxi-hailing application can send the card UUID, cardInstanceId, hostinfo corresponding to the host application and the size corresponding to the host application to the card management service, therefore, after the card management service receives the card UUID, cardInstanceId, hostinfo corresponding to the host application and the size corresponding to the host application sent by any host application, the card management service can obtain AppClipInfo according to the card UUID. After the card management service obtains AppClipInfo according to the card UUID, the card management service determines and sends the AppClipInfo, cardInstanceId, hostinfo corresponding to the host application and the size corresponding to the host application to the card kit corresponding to the taxi-hailing application based on the AppClipInfo.
[0243] In the embodiment of the present application, after the card kit corresponding to the taxi application receives the AppClipInfo, cardInstanceId, hostinfo corresponding to the first host application, and size corresponding to the first host application sent by the card management service, the card kit corresponding to the taxi application can determine the Taxi Provider corresponding to the taxi application's business based on the AppClipInfo, and then the card kit corresponding to the taxi application can obtain the card view corresponding to the taxi application card from the Taxi Provider corresponding to the taxi application's business. After the card kit corresponding to the taxi application obtains the card view corresponding to the taxi application card, the card kit corresponding to the taxi application can generate the embedded window layer corresponding to the taxi application card based on the card view corresponding to the taxi application card. After the card kit corresponding to the taxi application generates the embedded window layer corresponding to the taxi application card, the card kit corresponding to the taxi application can send the embedded window layer corresponding to the taxi application card to the first host application, so that the first host application displays the embedded window layer corresponding to the taxi application card, that is, the first host application displays the taxi application card.
[0244] In some examples, in order to avoid the first host application of the electronic device displaying cards of other applications during the process in which the card kit corresponding to the taxi application obtains the card view corresponding to the taxi application card from TaxiProvider and generates an embedded window layer corresponding to the taxi application card based on the card view, before the card kit corresponding to the taxi application obtains the card view corresponding to the taxi application card from TaxiProvider, the card kit corresponding to the taxi application can generate an embedded window layer (i.e., a placeholder embedded window layer) for placeholder without adding the card view corresponding to the taxi application card, and send the placeholder embedded window layer to the Host AAR corresponding to the first host application, so that the Host AAR corresponding to the first host application adds a placeholder view in the placeholder embedded window layer, and then the Host AAR corresponding to the first host application can send the placeholder embedded window layer with the placeholder view added to the first host application, so that the first host application can mount the placeholder embedded window layer with the placeholder view added to the host layer of the first host application itself for placeholder.
[0245] Specifically, the specific implementation process of the card kit corresponding to the taxi-hailing application generating a placeholder embedded window layer is shown in S1609-S1615.
[0246] In some examples, when there is a data packet of an embedded window layer corresponding to a created taxi application card in the cache of the electronic device, when the card kit corresponding to the taxi application creates a placeholder embedded window layer, the card kit corresponding to the taxi application can obtain the status information of the data packet (i.e., SurfacePackage) of the embedded window layer corresponding to the created taxi application card. When the status information indicates that the data packet of the embedded window layer corresponding to the created taxi application card is valid, the card kit corresponding to the taxi application can use the embedded window layer corresponding to the created taxi application card as a placeholder embedded window layer (i.e., an embedded window layer of a card view to which the taxi application card is not added for placeholding).
[0247] Specifically, the card kit corresponding to the taxi-hailing application can use the embedded window layer corresponding to the created taxi-hailing application card as a placeholder embedded window layer. For the specific implementation process, see S1609-S1611.
[0248] When the status information indicates that the data packet of the embedded window layer corresponding to the created taxi application card is invalid, the card kit corresponding to the taxi application can create a placeholder embedded window layer (that is, an embedded window layer for taking up the place of the card view corresponding to the taxi application card to which the taxi application card is not added).
[0249] In some examples, when there is no data packet of the embedded window layer corresponding to the created taxi application card in the cache of the electronic device, the card kit corresponding to the taxi application can create a placeholder embedded window layer.
[0250] Specifically, the specific implementation process of the card kit corresponding to the taxi application to create a placeholder embedded window layer is shown in S1612-S1615.
[0251] The following is a schematic illustration of the specific implementation process of generating a placeholder embedded window layer by the card kit corresponding to the taxi-hailing application.
[0252] S1609. The card kit corresponding to the taxi-hailing application obtains the data packet of the embedded window layer corresponding to the created taxi-hailing application card.
[0253] The card kit corresponding to the taxi application can obtain the data packet of the embedded window layer corresponding to the created taxi application card from the cache of the electronic device, and determine the status information of the data packet of the embedded window layer corresponding to the created taxi application card.
[0254] S1610. When the status information indicates that the data packet of the embedded window layer corresponding to the created taxi-hailing application card is valid, the card kit corresponding to the taxi-hailing application calls back the OnSurfacePackageChanged function.
[0255] When the status information indicates that the data packet of the embedded window layer corresponding to the created taxi application card is valid, the card kit corresponding to the taxi application can return the data packet of the embedded window layer corresponding to the created taxi application card to the card management service by calling back the OnSurfacePackageChanged function.
[0256] Exemplarily, when the return value of the status information of the data packet (i.e., SurfacePackage) of the embedded window layer corresponding to the created taxi application card is the first value (such as 1), the card kit corresponding to the taxi application determines that the data packet (i.e., SurfacePackage) of the embedded window layer corresponding to the created taxi application card is valid.
[0257] S1611. The card management service calls back the OnSurfacePackageChanged function.
[0258] The card management service can return the data packet of the embedded window layer corresponding to the created taxi application card to the Host AAR corresponding to the first host application of the electronic device by calling back the OnSurfacePackageChanged function. After receiving the data packet of the embedded window layer corresponding to the created taxi application card, the Host AAR corresponding to the first host application can obtain the embedded window layer corresponding to the created taxi application card according to the data packet of the embedded window layer corresponding to the created taxi application card, and use the embedded window layer corresponding to the created taxi application card as a placeholder embedded window layer. After obtaining the placeholder embedded window layer, the Host AAR corresponding to the first host application can add a placeholder view in the placeholder embedded window layer. That is, after S1611, execute S1616.
[0259] In some examples, when the status information indicates that the data packet of the embedded window layer corresponding to the created taxi application card is invalid, the card kit corresponding to the taxi application can create a placeholder embedded window layer and return the data packet of the placeholder embedded window layer to the Host AAR corresponding to the first host application, so that the Host AAR corresponding to the first host application adds a placeholder view in the placeholder embedded window layer. That is, when the status information indicates that the data packet of the embedded window layer corresponding to the created taxi application card is invalid, S1612-S1615 are executed.
[0260] Exemplarily, when the return value of the status information of the data packet of the embedded window layer corresponding to the created taxi application card is the second value (such as 0), the card kit corresponding to the taxi application determines that the data packet of the embedded window layer corresponding to the created taxi application card is invalid.
[0261] S1612. The card kit corresponding to the taxi-hailing application creates a placeholder embedded window layer.
[0262] S1613. The card kit corresponding to the taxi-hailing application creates a monitoring event, and the monitoring event is used to monitor whether the placeholder embedded window layer is created.
[0263] S1614. When the placeholder embedded window layer is created, the card kit corresponding to the taxi-hailing application calls back the OnSurfacePackageCreated function.
[0264] When the placeholder embedded window layer is created, the card kit corresponding to the taxi-hailing application can return the data packet of the placeholder embedded window layer to the card management service by calling back the OnSurfacePackageCreated function.
[0265] S1615. The card management service calls back the OnSurfacePackageCreated function.
[0266] The card management service can return the data packet of the placeholder embedded window layer to the Host AAR corresponding to the first host application by calling back the OnSurfacePackageCreated function, so that the Host AAR corresponding to the first host application adds a placeholder view in the placeholder embedded window layer.
[0267] After the Host AAR corresponding to the first host application receives the placeholder embedded window layer sent by the card management service, the Host AAR corresponding to the first host application can create a placeholder view and add the placeholder view to the placeholder embedded window layer, and then the Host AAR corresponding to the first host application can send the placeholder embedded window layer with the placeholder view added to the first host application, so that the first host application can mount the placeholder embedded window layer with the placeholder view added to the host layer of the first host application itself for placeholding. Specifically, for the specific implementation process of the Host AAR corresponding to the first host application creating a placeholder view and adding the placeholder view to the placeholder embedded window layer, see S1616-S1618.
[0268] S1616. The Host AAR corresponding to the first host application creates a placeholder view according to the card size information (ie, size) corresponding to the first host application.
[0269] The Host AAR corresponding to the first host application can create a placeholder view according to the card size information of the first host application. Exemplarily, the placeholder view can be a reusable DynamicCardHostView object.
[0270] S1617. The Host AAR corresponding to the first host application adds the placeholder view to the placeholder embedded window layer.
[0271] After the Host AAR corresponding to the first host application receives the data packet of the placeholder embedded window layer sent by the card management service, the Host AAR corresponding to the first host application can obtain the placeholder embedded window layer according to the data packet of the placeholder embedded window layer. After the Host AAR corresponding to the first host application creates the placeholder view, the first host application calls back the onCardViewCreated{cardInstanceId,view} function to add the placeholder view (i.e., DynamicCardHostView object) to the placeholder embedded window layer.
[0272] In some examples, after the Host AAR corresponding to the first host application receives a data packet of the embedded window layer corresponding to the created taxi application card, the Host AAR corresponding to the first host application obtains the embedded window layer corresponding to the created taxi application card based on the data packet of the embedded window layer corresponding to the created taxi application card. After the Host AAR corresponding to the first host application creates a placeholder view, the Host AAR corresponding to the first host application can call the onCardViewCreated{cardInstanceId,view} function to update the card view in the embedded window layer corresponding to the created taxi application card to the placeholder view. Afterwards, the Host AAR corresponding to the first host application sends the embedded window layer to which the placeholder view is added to the first host application, so that the first host application mounts the placeholder embedded window layer to which the placeholder view is added to the host layer corresponding to the first host application.
[0273] In some examples, after the Host AAR corresponding to the first host application receives a data packet of a placeholder embedded window layer, the Host AAR corresponding to the first host application obtains the placeholder embedded window layer based on the data packet of the placeholder embedded window layer. After the Host AAR corresponding to the first host application creates a placeholder view, the Host AAR corresponding to the first host application can call the onCardViewCreated{cardInstanceId,view} function to add a placeholder view to the placeholder embedded window layer. Afterwards, the Host AAR corresponding to the first host application can send the placeholder embedded window layer with the placeholder view added to the first host application, so that the first host application mounts the placeholder embedded window layer with the placeholder view added to the host layer corresponding to the first host application.
[0274] S1618. The Host AAR corresponding to the first host application sends the placeholder embedded window layer with the placeholder view added to the first host application, so that the first host application mounts the placeholder embedded window layer with the placeholder view added to the host layer corresponding to the first host application.
[0275] After the first host application receives the placeholder embedded window layer with the placeholder view added sent by the Host AAR corresponding to the first host application, the first host application mounts the placeholder embedded window layer with the placeholder view added to the host layer corresponding to the first host application, that is, the first host application embeds the placeholder view into the window of the first host application.
[0276] It should be noted that, after the card management service receives the card UUID, card instance information, identification information corresponding to the host application, and card size information corresponding to the host application sent by any host application, the card management service can obtain AppClipInfo according to the card UUID. After the card management service obtains AppClipInfo according to the card UUID, the card management service determines and sends the AppClipInfo, card instance information, identification information corresponding to the host application, and card size information corresponding to the host application to the card kit corresponding to the taxi application according to the AppClipInfo. In other words, the card kit corresponding to the taxi application can obtain the card view (i.e., view) corresponding to the taxi application card corresponding to each host application in the host application that registered the business change of the taxi application from TaxiProvider. Therefore, before the card kit corresponding to the taxi application can obtain the card view (i.e., view) corresponding to the taxi application card corresponding to each host application in the host application that registered the business change of the taxi application from TaxiProvider, each host application can mount the placeholder embedded window layer that adds the placeholder view to the host layer of the first host application itself for placeholder. Among them, the specific implementation process of each host application mounting the placeholder embedded window layer of the placeholder view added to the host layer of the first host application itself for placeholding can be illustrated by taking S1609-S1618 (i.e., the first host application mounts the placeholder embedded window layer of the placeholder view added to the host layer of the first host application itself for placeholding) as an example.
[0277] S1619. The card kit corresponding to the taxi application determines the Taxi Provider corresponding to the business of the taxi application according to the AppClipInfo, and sends the cardInstanceId to the Taxi Provider corresponding to the business of the taxi application.
[0278] After the card kit corresponding to the taxi application receives the AppClipInfo, cardInstanceId, and hostinfo corresponding to the first host application corresponding to the business of the taxi application, the card kit corresponding to the taxi application can determine the Taxi Provider corresponding to the business of the taxi application based on the AppClipInfo, and send a binding service request to the Taxi Provider corresponding to the business of the taxi application.
[0279] After the Taxi Provider corresponding to the business of the taxi application receives the binding service request sent by the card kit corresponding to the taxi application, the Taxi Provider corresponding to the business of the taxi application performs the initialization operation. After the Taxi Provider corresponding to the business of the taxi application performs the initialization operation, the Taxi Provider corresponding to the business of the taxi application can bind the service with the card kit corresponding to the taxi application, that is, the Taxi Provider corresponding to the business of the taxi application establishes a communication connection with the card kit corresponding to the taxi application. After the Taxi Provider corresponding to the business of the taxi application binds the service with the card kit corresponding to the taxi application, the Taxi Provider corresponding to the business of the taxi application can send a notification of successful creation of the binding service to the card kit corresponding to the taxi application.
[0280] After the card kit corresponding to the taxi application receives the notification of successful creation of the binding service sent by the TaxiProvider corresponding to the business of the taxi application, the card kit corresponding to the taxi application can send the cardInstanceId corresponding to the business of the taxi application to the Taxi Provider corresponding to the business of the taxi application, so that the Taxi Provider corresponding to the business of the taxi application determines the taxi order corresponding to the taxi application card to be displayed according to the cardInstanceId, and obtains the card view of the taxi application card corresponding to the taxi order according to the hostinfo corresponding to the first host application, that is, the Taxi Provider corresponding to the business of the taxi application obtains the card view of the taxi application card corresponding to the first host application according to the hostinfo corresponding to the first host application.
[0281] The taxi application may include multiple Taxi Providers. A service of the taxi application (i.e., the processing progress of taxi orders) corresponds to a Taxi Provider, and the Taxi Provider may be used to generate a card view corresponding to the service of the taxi application (e.g., driver acceptance of orders). It should be noted that the Taxi Provider corresponding to the service of the taxi application may be integrated into the taxi application.
[0282] It should be noted that, when the card kit corresponding to the taxi-hailing application uses the embedded window layer corresponding to the created taxi-hailing application card as a placeholder embedded window layer, S1619 can be executed before S1609, and S1619 can also be executed at the same time as S1609. There is no specific limitation on the execution order of S1619 and S1609.
[0283] Also, when the card kit corresponding to the taxi-hailing application creates a placeholder embedded window layer, S1619 can be executed before S1612, or S1619 can be executed simultaneously with S1612. The execution order of S1619 and S1612 is not specifically limited here.
[0284] S1620. The Taxi Provider corresponding to the business of the taxi application determines the taxi order corresponding to the taxi application card to be displayed according to the cardInstanceId corresponding to the business of the taxi application.
[0285] For example, when a user places two taxi orders (such as order A and order B) using a taxi application, card instance information 1 corresponding to order A may be generated, and card instance information 2 corresponding to order B may be generated. The Taxi Provider corresponding to the business of the taxi application (i.e., the processing progress of the taxi order) may determine that the taxi application card to be displayed is the taxi application card corresponding to order A based on card instance information 1. The Taxi Provider corresponding to the business of the taxi application (i.e., the processing progress of the taxi order) may determine that the taxi application card to be displayed is the taxi application card corresponding to order B based on card instance information 2.
[0286] S1621. The card kit corresponding to the taxi-hailing application calls the getview(hostinfo) function to send the hostinfo corresponding to the first host application to the Taxi Provider corresponding to the service of the taxi-hailing application.
[0287] After the Taxi Provider corresponding to the business of the taxi application determines the taxi order corresponding to the taxi application card to be displayed according to the cardInstanceId corresponding to the business of the taxi application, the card kit corresponding to the taxi application can send the hostinfo corresponding to the first host application to the Taxi Provider corresponding to the business of the taxi application, that is, the card kit corresponding to the taxi application can send the view id corresponding to the first host application to the TaxiProvider corresponding to the business of the taxi application.
[0288] It should be noted that after the card management service receives the card UUID, card instance information, identification information corresponding to the host application and card size information corresponding to the host application sent by any host application, the card management service can obtain AppClipInfo according to the card UUID, and send the AppClipInfo, card instance information, identification information corresponding to the host application and card size information corresponding to the host application to the card kit corresponding to the taxi application. Therefore, after the card kit corresponding to the taxi application receives the AppClipInfo, card instance information and identification information corresponding to the host application, the card kit corresponding to the taxi application can determine the Taxi Provider corresponding to the business of the taxi application according to AppClipInfo, and send the card instance information and identification information corresponding to the host application to the Taxi Provider corresponding to the business of the taxi application.
[0289] S1622. The Taxi Provider corresponding to the business of the taxi application creates a card view of the taxi application card corresponding to the first host application according to the hostinfo corresponding to the first host application.
[0290] After the Taxi Provider corresponding to the business of the taxi application receives the hostinfo corresponding to the first host application sent by the card kit corresponding to the taxi application, the TaxiProvider corresponding to the business of the taxi application can determine the viewid corresponding to the first host application according to the hostinfo corresponding to the first host application, and obtain the card view of the taxi application card corresponding to the first host application according to the view id corresponding to the first host application. The card view of the taxi application card is the card view of the taxi application card corresponding to the target taxi order. The card view of the taxi application card can be used to indicate changes in the business of the taxi application, that is, to indicate the processing progress of the target order. Among them, the target taxi order is the taxi order determined according to the cardInstanceId corresponding to the business of the taxi application.
[0291] For example, continuing to take the example that the host application of the electronic device includes the desktop, notification center, lock screen, off screen, negative one screen, and banner notification, for the same service of the taxi application (such as driver receiving an order), when the first host application is the desktop, the card view identifier corresponding to the first host application is 1, and the TaxiProvider corresponding to the service of the taxi application can obtain the card view of the taxi application card corresponding to the desktop according to the card view identifier 1. When the first host application is the notification center, the card view identifier corresponding to the first host application is 2, and the Taxi Provider corresponding to the service of the taxi application can obtain the card view of the taxi application card corresponding to the notification center according to the card view identifier 2. When the first host application is the lock screen, the card view identifier corresponding to the first host application is 3, and the Taxi Provider corresponding to the service of the taxi application can obtain the card view of the taxi application card corresponding to the lock screen according to the card view identifier 3. When the first host application is the off screen, the card view identifier corresponding to the first host application is 4, and the Taxi Provider corresponding to the service of the taxi application can obtain the card view of the taxi application card corresponding to the off screen according to the card view identifier 4. When the first host application is the negative one screen, the card view identifier corresponding to the first host application is 5, and the Taxi Provider corresponding to the taxi application's business can obtain the card view of the taxi application card corresponding to the negative one screen according to the card view identifier 5. When the first host application is a banner notification, the card view identifier corresponding to the first host application is 6, and the Taxi Provider corresponding to the taxi application's business can obtain the card view of the taxi application card corresponding to the banner notification according to the card view identifier 6.
[0292] It should be noted that since the card kit corresponding to the taxi application can send the hostinfo corresponding to each host application in the host application that registers the business changes of the taxi application to the Taxi Provider corresponding to the business of the taxi application, the card kit corresponding to the taxi application can determine the view id corresponding to each host application according to the hostinfo corresponding to each host application in the host application that registers the business changes of the taxi application, and obtain the card view corresponding to each host application according to the view id corresponding to each host application.
[0293] Among them, for different host applications, the content to be displayed on the interface corresponding to the host application is different. Therefore, for the same business of the taxi application, when different host applications display the taxi application card, the card views of the taxi application card displayed by different host applications are different.
[0294] Exemplarily, the card views of the taxi application card displayed by different host applications are different, which may mean that the card contents of the card views of the taxi application card displayed by different host applications are different.
[0295] For example, the host application of the electronic device may include the desktop, notification center, lock screen, off screen, negative one screen, and banner notification. For the same service of the taxi application (such as driver receiving orders), Fig.15 As shown in (a) of FIG. 1 , the desktop 110 of the electronic device may display a taxi application card 111. The taxi application card 111 may include an icon 112 of the taxi application, text 113 of “License plate number XXX·Arrival in about 2 minutes”, text 114 of “Master Zhang·White”, and a call control 115.
[0296] like Fig.15 As shown in (b) of FIG. 1 , the notification center 120 of the electronic device may display a taxi application card 121. The taxi application card 121 may include an icon 122 of the taxi application, text 123 of “License plate number XXX·Arrived in about 2 minutes”, and text 124 of “Master Zhang·White”. Fig.15 Compared with the taxi application card 111 shown in (a) in FIG. 1 , the taxi application card 121 may further include a progress bar 125 .
[0297] like Fig.15 As shown in (c) of FIG. 1 , the lock screen interface 130 of the electronic device may display a taxi application card 131. The taxi application card 131 may include an icon 132 of the taxi application, text 133 of “License plate number XXX·Arrived in about 2 minutes”, and text 134 of “Master Zhang·White”. Fig.15 Compared with the taxi application card 111 shown in (a) in FIG. 1 , the taxi application card 131 may further include a progress bar 135 .
[0298] like Fig.15 As shown in (d) of FIG. 1 , the screen-off interface 140 of the electronic device may display a taxi-hailing application card 141. Fig.15 Compared with the taxi application card 111 shown in (a) of FIG. 1 , the taxi application card 141 is a card capsule. The taxi application card 141 (i.e., the card capsule) may include relevant information of a portion of the taxi order (e.g., the taxi application icon 142 and the text 143 of “License Plate Number XXX”).
[0299] It should be noted that the above progress bar may be a segmented progress bar.
[0300] Exemplarily, the card views of the taxi application card displayed by different host applications are different, which may mean that the card sizes of the card views of the taxi application card displayed by different host applications are different.
[0301] For example, continuing to take the example that the host application of the electronic device may include the desktop, notification center, lock screen, off screen, negative one screen, and banner notification, for the same business of the taxi application (such as driver receiving orders), Fig.15 As shown in (a) of FIG. 1 , the desktop 110 of the electronic device can display a taxi application card 111. The display height of the taxi application card 111 is h1, and the display width of the taxi application card 111 is d1.
[0302] like Fig.15 As shown in (b) of FIG. 1 , the notification center 120 of the electronic device can display a taxi application card 121. The display height of the taxi application card 121 is h2, and the display width of the taxi application card 121 is d2. The display height h2 of the taxi application card 121 is less than the display height h1 of the taxi application card 111.
[0303] like Fig.15 As shown in (c) of FIG. 1 , the lock screen interface 130 of the electronic device can display a taxi application card 131. The display height of the taxi application card 131 is h3, and the display width of the taxi application card 131 is d3. The display height h3 of the taxi application card 131 is less than the display height h2 of the taxi application card 121.
[0304] like Fig.15 As shown in (d) in FIG. 1 , the screen-off interface 140 of the electronic device can display a taxi application card 141. The display height of the taxi application card 141 is h4, and the display width of the taxi application card 141 is d4. The display height h4 of the taxi application card 141 is less than the display height h2 of the taxi application card 111, and the display width d4 of the taxi application card 141 is less than the display width d1 of the taxi application card 111.
[0305] That is to say, for the same service of the taxi application (such as driver accepting orders), the taxi application cards displayed on the desktop, notification center, lock screen interface, and screen off interface of the electronic device are different, that is, the card views (i.e., views) of the taxi application cards displayed by different host applications are different, that is, the card view identifiers of the card views of the taxi application cards corresponding to different host applications are different.
[0306] In an embodiment of the present application, before obtaining the card view of the taxi application card corresponding to the first host application according to the card view identifier corresponding to the first host application, the TaxiProvider corresponding to the business of the taxi application can generate a card view of the taxi application card corresponding to the first host application according to the card size information and taxi business data corresponding to the first host application.
[0307] S1623. The Taxi Provider corresponding to the business of the taxi application sends a card view of the taxi application card corresponding to the first host application to the card kit corresponding to the taxi application.
[0308] It should be noted that since the Taxi Provider corresponding to the business of the taxi application can determine the view id corresponding to each host application according to the hostinfo corresponding to each host application in the host application that registers the business changes of the taxi application, and obtain the card view corresponding to each host application according to the view id corresponding to each host application, the Taxi Provider corresponding to the business of the taxi application can send the card views corresponding to each host application in the host application that registers the business changes of the taxi application to the card kit corresponding to the taxi application.
[0309] S1624. The card kit corresponding to the taxi-hailing application adds the card view of the taxi-hailing application card corresponding to the first host application to the embedded window layer.
[0310] After the card kit corresponding to the taxi application receives the card view of the taxi application card corresponding to the first host application, the card kit corresponding to the taxi application can add the card view of the taxi application card corresponding to the first host application to the embedded window (i.e., SurfaceControlViewHost or ViewHost) layer. That is, the card kit corresponding to the taxi application generates an embedded window layer corresponding to the taxi application card according to the card view of the taxi application card corresponding to the first host application.
[0311] Among them, in some examples, the embedded window layer may be the embedded window layer corresponding to the created taxi application card obtained in the above-mentioned S1609, that is, the card kit corresponding to the taxi application may add the card view of the taxi application card corresponding to the first host application to the embedded window layer, and may be the card kit corresponding to the taxi application may update the card view in the embedded window layer corresponding to the created taxi application card to the card view of the taxi application card corresponding to the first host application.
[0312] In some examples, the embedded window layer may be a placeholder embedded window layer created by the card kit corresponding to the taxi application in S1612, that is, the card kit corresponding to the taxi application may add the card view of the taxi application card corresponding to the first host application to the embedded window layer, or the card kit corresponding to the taxi application may add the card view of the taxi application card corresponding to the first host application to the placeholder embedded window layer.
[0313] It should be noted that, since the Taxi Provider corresponding to the business of the taxi application can send the card views corresponding to each host application in the host application that registers the business changes of the taxi application to the card kit corresponding to the taxi application, the card kit corresponding to the taxi application can add the card views of the taxi application cards corresponding to each host application to the embedded window layer, that is, the card kit corresponding to the taxi application can generate the embedded window layer corresponding to the taxi application cards corresponding to each host application based on the card views of the taxi application cards corresponding to each host application.
[0314] S1625. The card kit corresponding to the taxi-hailing application program calls back the onSurfaceViewRendered function.
[0315] The card kit corresponding to the taxi application monitors whether the embedded window layer corresponding to the taxi application card is rendered, that is, the card kit corresponding to the taxi application monitors whether the card view in the placeholder embedded window layer is updated to the card view of the taxi application card corresponding to the first host application. After the card kit corresponding to the taxi application monitors that the embedded window layer corresponding to the taxi application card is rendered, the card kit corresponding to the taxi application can call back the onSurfaceViewRendered function to notify the card management service that the embedded window layer corresponding to the taxi application card is rendered.
[0316] S1626. The card management service calls back the onSurfaceViewRendered function.
[0317] The card management service of the electronic device calls back the onSurfaceViewRendered function to notify the Host AAR corresponding to the first host application that the rendering of the embedded window layer corresponding to the taxi application card is completed.
[0318] S1627. The Host AAR corresponding to the first host application calls back the onSurfaceViewRendered function.
[0319] The Host AAR corresponding to the first host application calls back the onSurfaceViewRendered function to notify the first host application that the rendering of the embedded window layer corresponding to the taxi application card is completed.
[0320] S1628. The first host application updates the placeholder view added in the placeholder embedded window layer to the card view of the taxi-hailing application card corresponding to the first host application.
[0321] After the Host AAR corresponding to the first host application calls back the onSurfaceViewRendered function, the first host application updates the placeholder view added in the placeholder embedded window layer to the card view of the taxi application card corresponding to the first host application, that is, the first host application removes the placeholder corresponding to the placeholder view in the embedded window layer mounted (or embedded) in the host layer corresponding to the first host application, and adds the card view of the taxi application card corresponding to the first host application in the embedded window layer mounted in the host layer corresponding to the first host application, that is, the first host application updates the placeholder view in the embedded window layer mounted to the host layer corresponding to the first host application to the card view of the taxi application card corresponding to the first host application.
[0322] It should be noted that, since the card kit corresponding to the taxi application generates the embedded window layer corresponding to the taxi application card corresponding to each host application according to the card view of the taxi application card corresponding to each host application, each host application can update the placeholder view in the embedded window layer of the host layer mounted to the host application to the card view of the taxi application card corresponding to the host application. Among them, the specific implementation process of each host application being able to update the placeholder view in the embedded window layer of the host layer mounted to the host application to the card view of the taxi application card corresponding to the host application can be illustrated by taking S1628 (i.e., the specific implementation process of the first host application updating the placeholder view added in the placeholder embedded window layer to the card view of the taxi application card corresponding to the first host application) as an example.
[0323] S1629: The first host application receives a switching operation input by the user.
[0324] The switching operation can be used to open the first host application of the electronic device. For example, if the first host application is the desktop, the switching operation can be a swipe up operation by the user at the bottom of the display screen of the electronic device. For another example, if the first host application is the notification center, the switching operation can be a pull-down operation by the user at the top status bar of the display screen. For another example, if the first host application is the lock screen, the switching operation can be a click operation by the user on the display screen of the electronic device when the electronic device is in the lock screen state.
[0325] S1630. In response to the switching operation, the first host application displays an interface corresponding to the first host application, where the interface corresponding to the first host application includes a taxi-hailing application card corresponding to the first host application.
[0326] Since the first host application will include a card view of the taxi application card corresponding to the first host application in the embedded window layer of the host layer mounted to the first host application, in response to the switching operation, the first host application displays the interface corresponding to the first host application, and displays the card view of the taxi application card corresponding to the first host application in the interface corresponding to the first host application, that is, the interface corresponding to the first host application includes the taxi application card corresponding to the first host application.
[0327] For example, taking the desktop as the first host application, in response to the switching operation, a taxi application card 111 may be displayed at the top of the desktop 110 of the electronic device. The taxi application card 111 may be used to prompt the driver that the order has been accepted. Fig.15As shown in (a) of FIG. 1 , the taxi application card 111 may include an icon 112 of the taxi application, text 113 of "License plate number XXX·Arrival in about 2 minutes", and text 114 of "Master Zhang·White". The taxi application card 111 may also include a call control 115, which may be used to contact the driver who accepts the order. The display height of the taxi application card 111 is h1, and the display width of the taxi application card 111 is d1.
[0328] For another example, taking the first host application as the notification center, when the electronic device receives a lock screen operation (such as pressing a lock screen key) from the user, Fig.15 As shown in (d) in the figure, the electronic device displays the screen-off interface 140, and displays the taxi-hailing application card 141 on the screen-off interface 140. The taxi-hailing application card 141 is a card capsule. When the electronic device receives a user's touch operation (such as a sliding operation) on the taxi-hailing application card 141 (i.e., the card capsule), the electronic device opens the taxi-hailing application. In addition, the display height h4 of the taxi-hailing application card 141 is less than the display height h1 of the taxi-hailing application card 111, and the display width d3 of the taxi-hailing application card 141 is less than the display width d1 of the taxi-hailing application card 111.
[0329] It should be noted that, since the host application (desktop, negative one screen, notification center, banner notification, screen off and lock screen, etc.) registers the business change of the taxi application after the electronic device is turned on, when the taxi application undergoes a business change, the electronic device can generate a card view of the taxi application card corresponding to each host application in all host applications that have registered the business change of the taxi application, and when a host application is running in the foreground of the electronic device, the card view of the taxi application card corresponding to the host application is displayed, that is, the taxi application card corresponding to the host application is displayed. The above example is illustrated by taking the first host application (such as the desktop) as an example, that is, each host application in all host applications that have registered the business change of the taxi application can execute the above S1604-S1628.
[0330] According to the solution of the present application, when an electronic device displays notification information of an application in the form of a card, the application running on the electronic device can create a card view, generate an embedded window layer corresponding to the card based on the card view, and send the embedded window layer corresponding to the card to the host application of the electronic device, so that the host application of the electronic device displays the embedded window layer corresponding to the card. That is to say, when the host application of the electronic device displays notification information of the application in the form of a card, the host application of the electronic device displays the embedded window layer hanging below it, instead of directly displaying the card view. Therefore, the application of the electronic device can create a card view including custom card elements according to demand, and generate an embedded window layer including custom card elements based on the card view, so that when the host application of the electronic device displays the notification information of the application, the host application of the electronic device can display a card view including different custom card elements, which can more effectively and intuitively display the notification information of the application to the user.
[0331] Furthermore, when an electronic device displays the card corresponding to an application, displaying the card corresponding to the application based on the embedded window layer can increase the speed of cross-process data transmission and enable real-time refresh of the card corresponding to the application, thereby ensuring the timeliness of the notification information of the application and providing a better user experience.
[0332] For ease of understanding, the following Fig.17 The card display method provided in the embodiment of the present application is described. Fig.17 As shown, the card display method may include the following S1701-S1703.
[0333] S1701. In response to a change in the service of a first application in an electronic device, the electronic device determines a first view of a first card of the first application.
[0334] In the embodiments of the present application, the electronic device may include multiple applications, such as a first application. In some examples, the first application may be a travel application (such as a taxi application, a map application, etc.) or a delivery application (such as a food delivery application, a courier application, etc.), etc. The specific type of the first application is not limited in the embodiments of the present application. For example, the first application may be the above Figure 6 An application providing a card is shown.
[0335] The electronic device may also include a second application. The second application may be an application that registers a business change of the first application included in the electronic device. That is, when the business of the first application changes, the second application may display the first card of the first application. In some examples, the second application may be a desktop, a notification center, a lock screen, an off screen, a negative one screen, or a banner notification. Exemplarily, the second application may be the host application in S601-S609 above. Exemplarily, the second application may also be the first host application in S1604-S1608 above, or S1616-S1618 above, or S1621-S1630 above.
[0336] The first card may be a card corresponding to the first application, that is, the first card may be used to indicate a business change of the first application. For example, taking the first application as a taxi-hailing application, the first card may be the taxi-hailing application card in S606-S609 or S1623-S1624.
[0337] In an embodiment of the present application, when the first card is displayed in different applications of the electronic device (such as the desktop, notification center, lock screen, screen off, negative one screen, or banner notification), the card view of the first card can be adjusted according to the display content of the application of the electronic device. In other words, for the same business of the first application, the card views of the first card displayed by different applications of the electronic device can be different. Based on this, in response to changes in the business of the first application in the electronic device, the electronic device can determine multiple card views of the first card of the first application, wherein the multiple card views correspond to different applications included in the electronic device (such as the desktop, notification center, lock screen, screen off, negative one screen, or banner notification).
[0338] The first view may be a card view of a first card that can be displayed by the second application program. The first view may be the card view in S604-S607 or S1622-S1623.
[0339] In some examples, the first view may include a custom card element, which may be a progress bar or a segmented progress bar.
[0340] Exemplarily, the first view includes a progress bar, which can be used to indicate the progress status of the business of the first application. The progress bar may include a first icon, a second icon, and a third icon, wherein the first icon can be used to indicate the execution starting point of the business of the first application, and the second icon can be used to indicate the execution end point of the business of the first application; the third icon is used to indicate that the progress status of the business of the first application has changed, and when the progress status of the business of the first application changes, the position of the third icon between the first icon and the second icon changes accordingly. In this way, when the electronic device displays the first card including the first view on the first interface, the progress status of the business of the first application can be more intuitively displayed through the progress bar in the first view, and the user experience is better.
[0341] For example, taking the first application as a taxi application, the first icon can be used to indicate the starting point (i.e., the location of the order-receiving vehicle when the driver accepts the order), that is, the first icon can be used to indicate the execution starting point of the taxi order. The second icon can be used to indicate the destination of the taxi order, that is, the second icon can be used to indicate the execution end point of the taxi order. Specifically, the progress bar can be the above Figure 7 The progress bar 21 is shown. The first icon can be the above Figure 7 The first logo 01 is shown. The second icon can be the above Figure 7 The second logo 02 is shown. The third icon can be the above Figure 7 Vehicle identification 04 is shown.
[0342] Exemplarily, the business phases of the first application include a first business phase and a second business phase; the first view includes a segmented progress bar, and the segmented progress bar is used to indicate the progress status of the business of the first application in different business phases.
[0343] The segmented progress bar may include a fourth icon, a fifth icon, a sixth icon and a seventh icon located between the fourth icon and the fifth icon. The fourth icon may be used to indicate the execution start point of the first business phase of the first application. The fifth icon may be used to indicate the execution end point of the second business phase of the first application. The sixth icon is used to indicate the execution end point of the first business phase of the first application and the execution start point of the second business phase of the first application.
[0344] The seventh icon can be used to indicate that the business progress of the second application has changed, and when the progress of the business of the second application changes in the first business stage, the position of the seventh icon between the fourth icon and the sixth icon changes accordingly; or, when the progress of the business of the second application changes in the second business stage, the position of the seventh icon between the sixth icon and the fifth icon changes accordingly.
[0345] In this way, when the electronic device displays the first card including the first view on the first interface, the segmented progress bar in the first view can more intuitively display the current business stage of the first application's business and the progress status corresponding to the business stage, providing a better user experience.
[0346] For example, taking the first application as a taxi application, the fourth icon can be used to indicate the starting point (i.e., the location of the order-receiving vehicle when the driver accepts the order), that is, the fourth icon can be used to indicate the execution starting point of the taxi order. The fifth icon can be used to indicate the destination of the taxi order, that is, the fifth icon can be used to indicate the execution end point of the taxi order. The sixth icon can be used to indicate the departure point of the user who placed the order. The sixth icon is located between the fourth icon and the fifth icon. The sixth icon can divide the connection line between the fourth icon and the fifth icon into two sections, that is, the sixth icon can divide the processing process of the taxi order into two stages, namely the first business stage and the second business stage. When the seventh icon is located between the fourth icon and the sixth icon, it means that the order-receiving vehicle is driving from the starting point to the departure point where the user is located. When the seventh icon is located between the sixth icon and the fifth icon, it means that the order-receiving vehicle has received the user and the order-receiving vehicle is driving from the departure point where the user is located to the destination.
[0347] Specifically, the segmented progress bar can be the above Fig.10 The fourth icon can be the segmented progress bar 51 shown. Fig.10 The first logo 01 is shown. The fifth icon can be the above Fig.10 The second logo 02 is shown. The sixth icon can be the above Fig.10 The third logo 03 is shown. The seventh icon can be the above Fig.10 Vehicle identification 04 is shown.
[0348] In some examples, the electronic device determines the first view of the first card of the first application, which may include: the electronic device determines the first view of the first card of the first application based on card size information corresponding to the second application and business data of the first application.
[0349] In some examples, the electronic device determines the first view of the first card of the first application, which may include: the electronic device obtains identification information of the second application; the electronic device determines identification information of the first view based on the identification information of the second application; the electronic device determines the first view based on the identification information of the first view.
[0350] Exemplarily, the identification information of the second application may be the host identification (ie, host id) of the host application in S1622. The identification information of the first view may be S606 or the card view identification (ie, view id) in S1622.
[0351] In this example, the electronic device can pre-create a card view of the first card corresponding to each application. In this way, when the electronic device determines the first view, the electronic device can determine the identification information of the first view based on the identification information of the second application, and determine the first view based on the identification information of the first view, so that the card view can be quickly acquired, thereby improving the processing efficiency of the electronic device.
[0352] Specifically, the specific implementation of the electronic device determining the first view of the first card of the first application in the above example can refer to the above S606, or the specific implementation in the above S1622, which will not be repeated in the embodiments of the present application.
[0353] In some embodiments, in order to avoid the electronic device displaying cards of other applications except the first application during the process of the electronic device determining the card view of the first card of the first application, before the electronic device determines the card view of the first card of the first application, the electronic device can create a placeholder embedded window layer corresponding to the placeholder view, and mount the placeholder embedded window layer to the embedded window of the second application for placeholder.
[0354] In some examples, before the electronic device determines the first view of the first card of the first application, the card display method may also include: the electronic device generates a placeholder view based on the card size information of the second application; the electronic device creates a placeholder embedded window layer corresponding to the placeholder view based on the placeholder view; and the electronic device mounts the placeholder embedded window layer to the embedded window of the second application.
[0355] The card size information of the second application may be the size information of the card view of the card allowed to be displayed by the second application. Exemplarily, the card size information of the second application may include a display height and a display width.
[0356] Exemplarily, the placeholder view may be a reusable DynamicCardHostView object.
[0357] Specifically, the specific implementation method of the electronic device in the above example generating the placeholder view according to the card size information of the second application can refer to the specific implementation method in the above S1616, which will not be repeated in the embodiments of the present application.
[0358] In some examples, an electronic device creates a placeholder embedded window layer corresponding to the placeholder view based on the placeholder view, which may include: when a third embedded window layer is stored in the electronic device, obtaining status information of the third embedded window layer; when the status information indicates that the third embedded window layer is valid, updating the card view of the second card in the third embedded window layer to the placeholder view to obtain the placeholder embedded window layer.
[0359] Among them, the third embedded window layer is an embedded window layer created according to the card view of the second card of the first application. The progress status of the business of the first application indicated by the second card is different from that of the first card. Exemplarily, continuing to take the first application as a taxi application as an example, the third embedded window layer can be the embedded window layer corresponding to the taxi application card created in the above S1609-S1611.
[0360] The status information of the third embedded window layer can be used to indicate whether the third embedded window layer is valid, that is, the status information of the third embedded window layer can be used to indicate whether the data packet corresponding to the third embedded window layer is valid. Exemplarily, when the status information of the third embedded window layer is a first value (such as 1), the data packet corresponding to the third embedded window layer is valid, that is, the third embedded window layer is valid. When the status information of the third embedded window layer is a second value (such as 0), the data packet corresponding to the third embedded window layer is invalid, that is, the third embedded window layer is invalid.
[0361] Specifically, in the above example, when a third embedded window layer is stored in the electronic device, the status information of the third embedded window layer is obtained; when the status information indicates that the third embedded window layer is valid, the card view of the second card in the third embedded window layer is updated to a placeholder view to obtain a specific implementation method of the placeholder embedded window layer. Please refer to the specific implementation methods in S1609-S1611 above, which will not be repeated in the embodiments of the present application.
[0362] In some examples, the electronic device creates a placeholder embedded window layer corresponding to the placeholder view based on the placeholder view, which may include: when the third embedded window layer is not stored in the electronic device or the status information of the third embedded window layer indicates that the third embedded window layer is invalid, the electronic device creates a placeholder embedded window layer based on the placeholder view.
[0363] Specifically, the specific implementation method of the electronic device in the above example creating a placeholder embedded window layer according to the placeholder view can refer to the specific implementation methods in the above S1612-S1615, which will not be repeated in the embodiments of the present application.
[0364] S1702: The electronic device creates a first embedded window layer corresponding to the second application according to the first view.
[0365] After the electronic device determines the first view of the first card of the first application, the electronic device can create a first embedded window layer corresponding to the second application based on the first view. The electronic device can embed the first embedded window layer into the embedded window of the second application (i.e., the host layer of the second application), so that when the electronic device displays the first interface corresponding to the second application, the embedded window of the second application can be displayed, and then the first embedded window layer embedded in the embedded window of the second application can be displayed, that is, the first card including the first view is displayed in the first interface.
[0366] The first embedded window layer may be a layer capable of embedding an embedded window of the second application program. Exemplarily, the first embedded window layer may be the embedded window layer in S607 or S1624.
[0367] In some examples, the electronic device creates a first embedded window layer corresponding to the second application according to the first view, which may include: updating the placeholder view in the placeholder embedded window layer to the first view to obtain the first embedded window layer corresponding to the second application. In this way, there is no need to recreate the first embedded window layer, which can improve the processing efficiency of the electronic device.
[0368] Specifically, the specific implementation method of the electronic device in the above example creating the first embedded window layer corresponding to the second application according to the first view can refer to the above S607, or the specific implementation method in the above S1624, which will not be repeated in the embodiments of the present application.
[0369] S1703. In response to a first operation of switching to a second application, the electronic device displays a first interface, wherein the first interface includes an embedded window of the second application, wherein a first embedded window layer is displayed in the embedded window of the second application to display a first card including a first view in the first interface.
[0370] Among them, the above-mentioned first operation can be an operation for opening a second application of the electronic device. For example, if the second application is a desktop, the first operation can be an upward sliding operation of the user at the bottom of the display screen of the electronic device. For another example, if the second application is a notification center, the first operation can be a pull-down operation of the user at the top status bar of the display screen. For another example, if the second application is a lock screen, the first operation can be a click operation of the user on the display screen of the electronic device when the electronic device is in a lock screen state. Exemplarily, the first operation can be the switching operation in S1629 above. The first interface can be a display interface corresponding to the second application.
[0371] After the electronic device creates the first embedded window layer corresponding to the second application according to the first view, the electronic device can embed the first embedded window layer into the embedded window of the second application. Afterwards, when the electronic device receives the first operation to switch to the second application, in response to the first operation, the electronic device can display the first interface corresponding to the second application, and the first interface can include the embedded window of the second application, so that the electronic device can display the first card including the first view in the first interface while displaying the first interface corresponding to the second application.
[0372] Specifically, for the specific implementation of the electronic device displaying the first interface in response to the first operation of switching to the second application in the above example, reference may be made to the specific implementation in S1630 above, which will not be repeated in the embodiments of the present application.
[0373] In some examples, the card display method may also include: in response to a change in the business of a first application in an electronic device, the electronic device determines a second view of a first card of the first application, the second view being different from the first view; and the electronic device creates a second embedded window layer corresponding to a third application based on the second view.
[0374] In an embodiment of the present application, the electronic device may further include a third application. The third application may also be an application that registers a business change of the first application included in the electronic device. That is to say, when the business of the first application changes, the third application may also display the first card of the first application. In some examples, the third application may be a desktop, a notification center, a lock screen, a screen off, a negative screen, or a banner notification. Exemplarily, the second application may be the host application in S601-S609 above. Exemplarily, the second application may also be the first host application in S1604-S1608 above, or S1616-S1618 above, or S1621-S1630 above.
[0375] It should be noted that the third application may be different from the second application. For example, the second application is the desktop, and the third application is the notification center. For example, the second application is the desktop, and the third application is the lock screen. For example, the second application is the lock screen, and the third application is the off screen. For example, the second application is the desktop, and the third application is the off screen.
[0376] The second view may be a card view of the first card that can be displayed by the third application. The second view may be the card view in S604-S607, or S1622-S1623.
[0377] In some examples, the electronic device determines the second view of the first card of the first application, which may include: the electronic device determines the second view of the first card of the first application based on card size information corresponding to a third application and business data of the first application.
[0378] In some examples, the electronic device determines the second view of the first card of the first application, which may include: the electronic device obtains identification information of a third application; the electronic device determines identification information of the second view based on the identification information of the third application; the electronic device determines the second view based on the identification information of the second view.
[0379] Exemplarily, the identification information of the third application may be the host identification (ie, host id) of the host application in S1622. The identification information of the second view may be S606 or the card view identification (ie, view id) in S1622.
[0380] Specifically, the specific implementation of the electronic device determining the second view of the first card of the first application in the above example can also refer to the above S606, or the specific implementation in the above S1622, which will not be repeated in the embodiments of the present application.
[0381] Exemplarily, the second embedded window layer may be a layer capable of embedding an embedded window of a third application program. Exemplarily, the second embedded window layer may be the embedded window layer in S607 or S1624.
[0382] In some examples, the electronic device creates a second embedded window layer corresponding to a third application based on the second view, which may include: updating the placeholder view in the placeholder embedded window layer to the second view to obtain a second embedded window layer corresponding to the third application.
[0383] Specifically, the specific implementation method of the electronic device in the above example creating the second embedded window layer corresponding to the third application according to the second view can refer to the above S607 or the specific implementation method in the above S1624, which will not be repeated in the embodiments of the present application.
[0384] After the electronic device creates a second embedded window layer corresponding to the third application based on the second view, the electronic device can embed the second embedded window layer in the embedded window of the third application (i.e., the host layer of the third application). In this way, when the electronic device displays the second interface corresponding to the third application, the embedded window of the third application can be displayed, and then the second embedded window layer embedded in the embedded window of the third application can be displayed, that is, the first card including the second view is displayed in the second interface.
[0385] In some examples, the second view is different from the first view, which may be that display content corresponding to the second view is different from display content corresponding to the first view.
[0386] In some examples, the second view is different from the first view, and the display size corresponding to the second view is different from the display size corresponding to the first view. The display size may include a display height and a display width.
[0387] Exemplarily, the second application is the desktop, the third application is the notification center, and the display height corresponding to the second view is smaller than the display height corresponding to the first view. In this way, when the application running in the foreground of the electronic device is switched from the desktop to the notification center, the first card including the second view can be displayed in the notification center, and the display height corresponding to the second view is smaller than the display height corresponding to the first view, which can reduce the space occupied by the first card, so that the notification center of the electronic device can display more notification information cards, and the user can view all notification information cards without flipping through them, which can improve the efficiency of human-computer interaction.
[0388] Exemplarily, the second application is the desktop, the third application is the lock screen, the display width corresponding to the second view is smaller than the display width corresponding to the first view, and the display height corresponding to the second view is smaller than the display height corresponding to the first view. In this way, when the application running in the foreground of the electronic device is switched from the desktop to the lock screen, the first card including the second view can be displayed in the notification center, and the display width corresponding to the second view is smaller than the display width corresponding to the first view, and the display height corresponding to the second view is smaller than the display height corresponding to the first view. In this way, the space occupied by the first card can be reduced, so that the lock screen of the electronic device can display more notification information cards, and the user can view all notification information cards without flipping through them, which can improve the efficiency of human-computer interaction.
[0389] Exemplarily, the second application is a lock screen, the third application is an off-screen, the display width corresponding to the second view is smaller than the display width corresponding to the first view, and the display height corresponding to the second view is smaller than the display height corresponding to the first view. In this example, since the display space of the off-screen interface of the electronic device is limited, when the application running in the foreground of the electronic device switches from the lock screen to the off-screen, the first card including the second view can be displayed on the off-screen interface, and the display width corresponding to the second view is smaller than the display width corresponding to the first view, and the display height corresponding to the second view is smaller than the display height corresponding to the first view. In this way, the display size of the first card can be reduced, and the space occupied by the first card can be minimized to avoid the card corresponding to the second application from being unable to be fully displayed. In addition, since the off-screen interface of the electronic device is in a constantly lit state, displaying a smaller first card on the off-screen interface can reduce the power consumption of the electronic device.
[0390] It should be noted that the display size corresponding to the first view may be the card size information of the second application program, and the display size corresponding to the second view may be the card size information of the third application program.
[0391] In some examples, the second view is different from the first view, which may be that the display content corresponding to the second view is different from the display content corresponding to the first view, and the display size corresponding to the second view is different from the display size corresponding to the first view.
[0392] In this example, when the business of the first application changes, the electronic device can generate card views corresponding to each application according to the characteristics of different applications, wherein the display content and / or display size of the card views corresponding to different applications are different. In this way, the electronic device can generate first cards adapted to each application according to the characteristics of different applications, and then when the electronic device switches to any application, it can display the interface corresponding to the application, and display the first card including the card view corresponding to the application on the interface corresponding to the application, so as to ensure that the first cards displayed in different applications of the electronic device have good display effects.
[0393] In some examples, after the electronic device displays a first interface in response to a first operation of switching to a second application, the card display method may also include: in response to a second operation of switching to a third application, the electronic device displays a second interface, the second interface including an embedded window of the third application, wherein a second embedded window layer is displayed in the embedded window of the third application to display a first card including a second view in the second interface.
[0394] The above-mentioned second operation may be an operation for opening a third application of the electronic device. For example, if the third application is a desktop, the second operation may be an upward sliding operation of the user at the bottom of the display screen of the electronic device. For another example, if the third application is a notification center, the second operation may be a pull-down operation of the user at the top status bar of the display screen. For another example, if the third application is a lock screen, the second operation may be a click operation of the user on the display screen of the electronic device when the electronic device is in the lock screen state. Exemplarily, the second operation may be the switching operation in S1629 above. The second interface may be a display interface corresponding to the third application.
[0395] After the electronic device displays the first interface, when the electronic device receives a second operation to switch to a third application, in response to the second operation, the electronic device can display a second interface corresponding to the third application, and the second interface can include an embedded window of the third application. In this way, the electronic device switches from displaying the first interface corresponding to the second application to the second interface corresponding to the third application, and can display a first card including a second view in the second interface.
[0396] Specifically, in the above example, the specific implementation of the electronic device displaying the second interface in response to the second operation of switching to the third application can refer to the specific implementation in S1630 above, which will not be repeated in the embodiments of the present application.
[0397] In this example, when the business of the first application in the electronic device changes, in response to the change in the business of the first application, the electronic device can determine the second view of the first card of the first application, and create a second embedded window layer corresponding to the third application according to the second view, so that the electronic device can embed the second embedded window layer into the embedded window of the third application. That is, when the business of the first application changes, the electronic device can determine the card view that can be displayed in each application according to the characteristics of different applications. Then, when the electronic device receives the second operation of switching to the third application, in response to the second operation, the display interface of the electronic device can be switched from the first interface corresponding to the second application to the second interface corresponding to the third application. And, because the second interface of the third application displayed by the electronic device includes the embedded window of the third application. Therefore, when the display interface of the electronic device is switched from the first interface corresponding to the second application to the second interface corresponding to the third application, the first card in the display interface of the electronic device is switched from the first card including the first view to the first card including the second view. That is, the electronic device can display the first card adapted to each application according to the characteristics of different applications, thereby ensuring that the first cards displayed in different applications of the electronic device have good display effects.
[0398] In the scheme of the present application, when the business of the first application in the electronic device changes, in response to the business change of the first application, the electronic device can determine the first view of the first card of the first application, and create the first embedded window layer corresponding to the second application according to the first view, so that the electronic device can embed the first embedded window layer into the embedded window of the second application. Afterwards, when the electronic device receives the first operation of switching to the second application, in response to the first operation, the electronic device can display the first interface corresponding to the second application. Since the first interface of the second application displayed by the electronic device includes the embedded window of the second application, the first embedded window layer embedded in the embedded window of the second application can be displayed while the electronic device displays the first interface corresponding to the second application, and then the first card including the first view can be displayed in the first interface. That is to say, when the second application of the electronic device displays the first card, the first card can be displayed by displaying the embedded window of the second application instead of directly displaying the first card. In this way, the electronic device can determine the first view of the first card according to the business type of the first application, and then display the first card including the first view on the first interface, which can more effectively and intuitively display the business status of the first application, and provide a better user experience.
[0399] It should be understood that the division of units or modules (hereinafter referred to as units) in the above device is only a division of logical functions. In actual implementation, they can be fully or partially integrated into one physical entity, or physically separated. And the units in the device can all be implemented in the form of software calling through processing elements; or all in the form of hardware; or some units can be implemented in the form of software calling through processing elements, and some units can be implemented in the form of hardware.
[0400] For example, each unit can be a separately established processing element, or it can be integrated in a certain chip of the device. In addition, it can also be stored in a memory in the form of a program, and called and executed by a certain processing element of the device. In addition, all or part of these units can be integrated together, or they can be implemented independently. The processing element described here can also be called a processor, which can be an integrated circuit with signal processing capabilities. In the implementation process, each step of the above method or each unit above can be implemented by an integrated logic circuit of hardware in the processor element or in the form of software called by a processing element.
[0401] In one example, the unit in the above apparatus may be one or more integrated circuits configured to implement the above method, such as one or more ASICs, or one or more DSPs, or one or more FPGAs, or a combination of at least two of these integrated circuit forms.
[0402] For another example, when the units in the device can be implemented in the form of a processing element scheduling program, the processing element can be a general-purpose processor, such as a CPU or other processor that can call a program. For another example, these units can be integrated together and implemented in the form of a system on a chip SOC.
[0403] In one implementation, the units of the above apparatus implementing the corresponding steps in the above method can be implemented in the form of a processing element scheduling program. For example, the apparatus may include a processing element and a storage element, and the processing element calls the program stored in the storage element to execute the method described in the above method embodiment. The storage element may be a storage element on the same chip as the processing element, that is, an on-chip storage element.
[0404] In another implementation, the program for executing the above method may be in a storage element on a different chip from the processing element, i.e., an off-chip storage element. In this case, the processing element calls or loads the program from the off-chip storage element to the on-chip storage element to call and execute the method described in the above method embodiment.
[0405] For example, an embodiment of the present application may also provide a device, such as an electronic device, which may include a processor and a memory for storing instructions executable by the processor. When the processor is configured to execute the above instructions, the electronic device implements the card display method as described in the above embodiment. The memory may be located inside the electronic device or outside the electronic device. And the processor includes one or more.
[0406] In another implementation, the unit of the device implementing each step in the above method may be configured as one or more processing elements, which may be arranged on the corresponding electronic device, and the processing element here may be an integrated circuit, for example: one or more ASICs, or one or more DSPs, or one or more FPGAs, or a combination of these integrated circuits. These integrated circuits may be integrated together to form a chip.
[0407] For example, the present application also provides a chip, which can be applied to the above electronic device. The chip includes one or more interface circuits and one or more processors; the interface circuit and the processor are interconnected through a line; the processor receives and executes computer instructions from the memory of the electronic device through the interface circuit to implement the method described in the above method embodiment.
[0408] An embodiment of the present application also provides a computer program product, including computer instructions executed by the above-mentioned electronic device.
[0409] Through the description of the above implementation methods, technical personnel in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0410] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0411] The units described as separate components may or may not be physically separated, and the components shown as units may be one physical unit or multiple physical units, that is, they may be located in one place or distributed in multiple different places. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0412] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0413] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the relevant technology or all or part of the technical solution can be embodied in the form of a software product, such as a program. The software product is stored in a program product, such as a computer-readable storage medium, including a number of instructions to enable a device (which can be a single-chip microcomputer, chip, etc.) or a processor (processor) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard drives, ROM, RAM, magnetic disks, or optical disks.
[0414] For example, the embodiment of the present application may also provide a computer-readable storage medium on which computer program instructions are stored. When the computer program instructions are executed by an electronic device, the electronic device implements the card display method described in the above method embodiment.
[0415] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A card display method, characterized in that: Applied to electronic equipment, the method comprises: In response to a change in the service of a first application in the electronic device, the electronic device determines a first view of a first card of the first application; The electronic device creates a first embedded window layer corresponding to the second application according to the first view; In response to a first operation of switching to the second application, the electronic device displays a first interface, wherein the first interface includes an embedded window of the second application, wherein the first embedded window layer is displayed in the embedded window of the second application to display the first card including the first view in the first interface.
2. The method according to claim 1, characterized in that The method further comprises: In response to a change in the service of a first application in the electronic device, the electronic device determines a second view of a first card of the first application, the second view being different from the first view; The electronic device creates a second embedded window layer corresponding to the third application according to the second view; After the electronic device displays the first interface in response to the first operation of switching to the second application, the method further includes: In response to a second operation of switching to the third application, a second interface is displayed, wherein the second interface includes an embedded window of the third application, wherein the second embedded window layer is displayed in the embedded window of the third application to display the first card including the second view in the second interface.
3. The method according to claim 1, characterized in that The first view includes a progress bar, and the progress bar is used to indicate the progress status of the service of the first application; The progress bar includes a first icon, a second icon, and a third icon, wherein the first icon is used to indicate the execution start point of the service of the first application, and the second icon is used to indicate the execution end point of the service of the first application; The third icon is used to indicate that the progress status of the service of the first application program has changed, and when the progress status of the service of the first application program has changed, the position of the third icon between the first icon and the second icon has changed accordingly.
4. The method according to claim 1, characterized in that: The service phase of the first application includes a first service phase and a second service phase; the first view includes a segmented progress bar, and the segmented progress bar is used to indicate the progress status of the service of the first application in different service phases; The segmented progress bar includes a fourth icon, a fifth icon, a sixth icon and a seventh icon located between the fourth icon and the fifth icon; wherein the fourth icon is used to indicate the execution starting point of the first business phase of the first application; the fifth icon is used to indicate the execution end point of the second business phase of the first application; the sixth icon is used to indicate the execution end point of the first business phase of the first application and the execution starting point of the second business phase of the first application; The seventh icon is used to indicate that the business progress of the second application has changed, and when the progress of the business of the second application changes in the first business stage, the position of the seventh icon between the fourth icon and the sixth icon changes accordingly; or, when the progress of the business of the second application changes in the second business stage, the position of the seventh icon between the sixth icon and the fifth icon changes accordingly.
5. The method according to claim 1, characterized in that The electronic device determines a first view of a first card of the first application, including: The electronic device obtains identification information of the second application; The electronic device determines identification information of the first view according to identification information of the second application program; The electronic device determines the first view according to the identification information of the first view.
6. The method according to claim 1, characterized in that Before the electronic device determines the first view of the first card of the first application, the method further includes: The electronic device generates a placeholder view according to the card size information of the second application; The electronic device creates a placeholder embedded window layer corresponding to the placeholder view according to the placeholder view; The electronic device mounts the placeholder embedded window layer to the embedded window of the second application.
7. The method according to claim 6, characterized in that The electronic device creates, according to the placeholder view, a placeholder embedded window layer corresponding to the placeholder view, including: In a case where a third embedded window layer is stored in the electronic device, obtaining status information of the third embedded window layer, wherein the third embedded window layer is an embedded window layer created according to a card view of a second card of the first application, and the progress status of the business of the first application indicated by the second card is different from that indicated by the first card; When the status information indicates that the third embedded window layer is valid, the card view of the second card in the third embedded window layer is updated to the placeholder view to obtain the placeholder embedded window layer.
8. The method according to claim 6, characterized in that The electronic device creates a first embedded window layer corresponding to the second application according to the first view, including: The placeholder view in the placeholder embedded window layer is updated to the first view to obtain a first embedded window layer corresponding to the second application.
9. The method according to claim 2, characterized in that: The display content corresponding to the second view is different from the display content corresponding to the first view, and / or the display size corresponding to the second view is different from the display size corresponding to the first view.
10. The method according to claim 2, characterized in that The second application is a desktop, notification center, lock screen, off screen, negative one screen or banner notification; The third application is a desktop, notification center, lock screen, screen off, negative one screen or banner notification.
11. The method according to claim 10, characterized in that The display size corresponding to the second view is different from the display size corresponding to the first view, and the display size includes a display height and a display width; The second application is the desktop, the third application is the notification center, and the display height corresponding to the second view is smaller than the display height corresponding to the first view.
12. The method according to claim 10, characterized in that The display size corresponding to the second view is different from the display size corresponding to the first view, and the display size includes a display height and a display width; Among them, the second application is the desktop, the third application is the lock screen, the display width corresponding to the second view is smaller than the display width corresponding to the first view, and the display height corresponding to the second view is smaller than the display height corresponding to the first view.
13. The method according to claim 10, characterized in that The display size corresponding to the second view is different from the display size corresponding to the first view, and the display size includes a display height and a display width; Among them, the second application is the lock screen, the third application is the off screen, the display width corresponding to the second view is smaller than the display width corresponding to the first view, and the display height corresponding to the second view is smaller than the display height corresponding to the first view.
14. An electronic device, characterized in that: The electronic device comprises a processor and a memory for storing instructions executable by the processor; when the processor is configured to execute the instructions, the electronic device implements the method as claimed in any one of claims 1 to 13.
15. A computer-readable storage medium having computer program instructions stored thereon; characterized in that: When the computer program instructions are executed by an electronic device, the electronic device implements the method according to any one of claims 1 to 13.
Citation Information
Cited By
Card display method and electronic device
EP4664253A1
Card display method and electronic device
WO2025039498A1