Display method and electronic device

By detecting and migrating application window content between electronic devices, the problem of application restart in screen mirroring scenarios is solved, the continuity of application status and data is achieved, and the user experience is improved.

CN115390652BActive Publication Date: 2026-11-20HUAWEI TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202110930452.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2021-05-19
Filing Date
2021-08-13
Publication Date
2026-11-20
Estimated Expiration
2041-08-13

AI Technical Summary

Technical Problem

In screen mirroring scenarios, when an application switches from a first electronic device to a second electronic device, existing technologies cause the application to restart, resulting in data loss and a poor user experience.

Method used

By detecting and matching the window of the first application on the first electronic device, creating or migrating the activity stack, the window content of the first application is migrated to the second electronic device for display, avoiding application restarts, and intercepting system reload interface messages when necessary.

Benefits of technology

It ensures the continuity of application status and data across different electronic devices, improves user experience, and avoids data loss caused by application restarts.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115390652B_ABST
    Figure CN115390652B_ABST
Patent Text Reader

Abstract

The application provides a display method and an electronic device. The method is applied to a first electronic device, and can include: the first electronic device detecting a first operation of starting a first application; the first electronic device matching a window of the first application; when the first electronic device determines that the matched window of the first application is in the first electronic device, migrating the window of the first application to a second electronic device for display. The technical solution can be applied to a screen projection technology, and can save data and a state of an application when the application is switched from the first electronic device to the second electronic device for display, thereby avoiding restarting of the application.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of electronic technology, and more specifically, to a display method and an electronic device. Background Technology

[0002] In screen mirroring scenarios, for example, when the screen of a first electronic device is mirrored to that of a second electronic device, the content of the screen of the first electronic device needs to be displayed on the screen of the second electronic device.

[0003] When an application is switched from the screen of a first electronic device to the screen of a second electronic device, the first electronic device typically restarts the application before displaying it on the second device, resulting in data loss. For example, if the application is Huawei Video, and the first electronic device is playing a video using Huawei Video, then switching the display to the second electronic device requires reopening the Huawei Video app; the video that was playing on the first device will not continue playing on the second device. Summary of the Invention

[0004] This application provides a display method and an electronic device. This technical solution can save the state of an application when it is switched from one electronic device to another, thus avoiding the application restarting.

[0005] In a first aspect, a display method is provided, the method being applied to an electronic device, the method comprising: the first electronic device detecting a first operation of launching a first application; the first electronic device matching a window of the first application; and when the first electronic device determines that the matched window of the first application is in the first electronic device, migrating the window of the first application to a second electronic device for display.

[0006] In one embodiment of this application, after detecting the operation of launching a first application, the first electronic device matches the window of the first application within the already launched application window. When it is determined that the window of the first application is in the first electronic device, the window of the first application is moved to the second electronic device for display. This technical solution can retain the data and state of the application when it is switched from the first electronic device to the second electronic device, avoiding application restart.

[0007] In conjunction with the first aspect, in some implementations of the first aspect, the step of migrating the window of the first application to the second electronic device for display includes: the first electronic device migrating the content in the first activity stack corresponding to the window of the first application to the second activity stack; and the first electronic device sending the data of the window corresponding to the second activity stack to the second electronic device.

[0008] It should be understood that the second activity stack can be newly created by the first electronic device. The second activity stack serves the second electronic device, thereby enabling stack management of multiple electronic devices and avoiding the restart phenomenon that occurs when the application is switched from one electronic device to another.

[0009] In one embodiment of this application, since the first electronic device migrates the content in the first activity stack corresponding to the window of the first application to the second activity stack, the tasks and activity records in the first activity stack can be retained, that is, the data of the first application can be saved, so that when the first application is switched to the second electronic device for display, the data of the first application will not be lost, thus improving the continuity of the application.

[0010] Optionally, the method may further include the first electronic device removing the first active stack. This can save system power consumption of the electronic device.

[0011] In conjunction with the first aspect, in some implementations of the first aspect, the first electronic device matching the window of the first application includes: the first electronic device matching the window of the first application from the application windows that have been launched in the first electronic device according to first information.

[0012] This technical solution can determine whether the window of the first application has been launched in the first electronic device.

[0013] In conjunction with the first aspect, in some implementations of the first aspect, the first information includes at least one of the following: the package name of the launched application; the user identity certificate of the launched application; and the activity corresponding to the launched application.

[0014] In conjunction with the first aspect, in some implementations of the first aspect, the window of the first application displayed in the second electronic device further includes a title bar portion, the title bar portion including at least the application name of the first application.

[0015] In conjunction with the first aspect, in some implementations of the first aspect, the size of the window of the first application displayed in the second electronic device is different from the size of the window displayed in the second electronic device.

[0016] In conjunction with the first aspect, in some implementations of the first aspect, the size of the window of the first application displayed in the second electronic device is adjustable.

[0017] In this technical solution, users can adjust the size of the first application's window as needed, thereby effectively improving the user experience.

[0018] In conjunction with the first aspect, in some implementations of the first aspect, the method further includes: when the first electronic device determines that the window of the first application is in the second electronic device, bringing the window of the first application to the foreground.

[0019] In this technical solution, when the window of the first application has been projected onto the second electronic device, the window of the first application is placed in the foreground.

[0020] In conjunction with the first aspect, in some implementations of the first aspect, the method further includes: the first electronic device setting the number of pixels per inch of the screen of the second electronic device to be the same as the number of pixels per inch of the screen of the first electronic device.

[0021] It should be understood that when the first electronic device establishes a connection with the second electronic device, the first electronic device can set the number of pixels per inch (Pixels per inch) of the second electronic device's screen to be the same as the number of pixels per inch (Pixels per inch) of the first electronic device's screen. This helps to ensure the quality of the projected display.

[0022] In conjunction with the first aspect, in some implementations of the first aspect, the method further includes: the first electronic device detecting a state change in the second electronic device; the first electronic device intercepting a message sent by the first electronic device to the first application to reload the interface based on the state change.

[0023] This technical solution can prevent the display interface corresponding to the window of the first application from being reloaded due to a change in the state of the second electronic device.

[0024] Optionally, when the aforementioned state of the first electronic device changes, causing the system to send a message to the first application to reload the interface, the first electronic device can also intercept the message.

[0025] In conjunction with the first aspect, in some implementations of the first aspect, the first operation is triggered in the first electronic device, or the first operation is triggered in the second electronic device.

[0026] In conjunction with the first aspect, in some implementations of the first aspect, the method further includes: the first electronic device determining whether the first application supports changing the display interface size of the window; if it is determined that the first application supports changing the display interface size of the window, the step of migrating the window of the first application to the second electronic device for display includes: migrating the window of the first application to the second electronic device for display in the form of a floating window.

[0027] Based on the embodiments of this application, when the first electronic device determines that the display interface size of the first application's supported window has changed, the window of the first application can be displayed in the second electronic device as a floating window, thereby improving the user experience.

[0028] Optionally, when it is determined that the display interface size of the first application's supported window has changed, the position of the interface elements of the first application's window may also change or be adjusted.

[0029] In a second aspect, an electronic device is provided, comprising one or more processors; one or more memories; said one or more memories storing one or more computer programs, said one or more computer programs including instructions that, when executed by said instructions by said processors, cause a display method as described in the first aspect above and any possible implementation thereof to be executed.

[0030] Thirdly, a chip is provided, the chip including a processor and a communication interface, the communication interface being used to receive signals and transmit the signals to the processor, the processor processing the signals such that the display method as described in the first aspect above and any possible implementation thereof is executed.

[0031] Fourthly, a computer-readable storage medium is provided, wherein computer instructions are stored therein, which, when executed on an electronic device, cause the display method as described in the first aspect and any possible implementation thereof to be performed.

[0032] Fifthly, a computer program product is provided, the computer program product comprising computer program code, which, when run on a computer, causes the display method as described in the first aspect above and any possible implementation thereof to be executed. Attached Figure Description

[0033] Figure 1 This is a schematic diagram of a set of GUIs provided in the embodiments of this application.

[0034] Figure 2 This is a schematic diagram of another set of GUIs provided in the embodiments of this application.

[0035] Figure 3 This is a schematic diagram of another set of GUIs provided in the embodiments of this application.

[0036] Figure 4 This is a schematic diagram of the display interface switching of a display method provided in an embodiment of this application.

[0037] Figure 5 This is a schematic flowchart of a display method provided in an embodiment of this application.

[0038] Figure 6 This is a schematic flowchart of a display method provided in an embodiment of this application. Detailed Implementation

[0039] The technical solutions in this application will now be described with reference to the accompanying drawings.

[0040] The display method in this application embodiment can be applied to electronic devices such as smartphones, tablets, laptops, personal computers (PCs), ultra-mobile personal computers (UMPCs), netbooks, personal digital assistants (PDAs), in-vehicle devices, and wearable devices. The display method in this application embodiment can also be applied to display devices such as monitors, televisions, and projectors. This application embodiment does not impose any restrictions on the specific type of electronic device.

[0041] Before introducing the technical solution of this application, we will first give a brief introduction to some technical terms that may be involved in this application.

[0042] Activity: In the Android system, an activity is a component that can contain a user interface. It is mainly used to interact with the user, such as making a phone call, taking a picture, sending an email, and viewing a map. Simply put, most of the content that the user can see in the application is provided by the activity component. An application can include multiple activities.

[0043] A task typically refers to a collection of related activities arranged in a stack according to their opening order. The home screen of an electronic device is usually the starting point of a task. When another activity (activity 2) is launched from the current activity (activity 1), activity 2 is generally pushed to the top of the stack and becomes the focus, while the previous activity (activity 1) remains on the stack, albeit in a paused state. When activity 1 is paused, the system maintains the current state of its corresponding user interface. When the user selects "back," the current activity (activity 2) at the top of the stack is destroyed, and activity 1 resumes execution.

[0044] Activity record: This is the activity record table of the Android system's Activity Manager Service (AMS). Each activity record corresponds to an activity.

[0045] In screen mirroring applications, for example, when the screen of a first electronic device is mirrored to that of a second electronic device, the content of the screen of the first electronic device needs to be displayed on the screen of the second electronic device.

[0046] When an application switches from the screen of a first electronic device to the screen of a second electronic device, the first electronic device typically restarts the application and then displays the restarted application on the second electronic device's screen. In this case, the application's original display interface is not retained. For example, if the application is Huawei Video, and the second electronic device opens Huawei Video to play a video, and the video has played for about 5 minutes, then switching the Huawei Video playback interface back to the first electronic device's screen, Huawei Video needs to be reopened, and the original video cannot continue playing on the second electronic device, resulting in application data loss.

[0047] In view of this, the present application provides a display method that can save the state of an application when it is switched from a first electronic device to a second electronic device, thus avoiding the application restarting.

[0048] In this embodiment, a mobile phone is used as the first electronic device and a PC as the second electronic device for illustration. It should be understood that this embodiment does not limit the method of establishing a connection between the mobile phone and the PC. For example, the mobile phone can establish a connection with the PC through a docking station, or the mobile phone can also establish a connection with the PC through wireless local area networks (WLAN), Bluetooth, ultra-wideband (UWB), wired connection, etc.

[0049] Figure 1 This is a schematic diagram of a set of graphical user interfaces (GUIs) provided in the embodiments of this application. Among them, from Figure 1 (a) through (c) show the process of casting an application from a mobile phone to a PC in computer mode.

[0050] See Figure 1 In (a), this GUI shows the display interfaces of mobile phone 100a and PC 100b. For example... Figure 1As shown in (a), the display interface 110 of the mobile phone 100a can be the playback interface of Huawei Video. The playback interface can include the display interface 111 of the TV series 1 that is being played, as well as the relevant introduction, episodes and other content of the TV series 1. The display interface 111 can include the playback screen and the progress bar.

[0051] like Figure 1 As shown in (a), the display interface 120 of PC100b can be the homepage display interface of a PC. This display interface 120 may include a status bar, a search box 121, and an application bar 123. The status bar may include signal strength, battery level, time, etc. The application bar may include function keys 124 and multiple application icons. Users can use the search box 121 to search for applications, web pages, documents, etc. When a user clicks function key 124 with the mouse, PC100b can display multiple applications installed on the phone in a pop-up interface. In some cases, when there are many applications installed on the phone, the user can flip through pages in the pop-up interface to display more applications.

[0052] When PC100b detects that the user clicks the Huawei Video application icon 122 with the mouse, the phone and PC can display as follows: Figure 1 The GUI shown in (b) is shown in the image.

[0053] See Figure 1 In (b), the GUI may include the display desktop 140 of the mobile phone 100a and the display interface 150 of the PC. The display desktop 140 of the mobile phone 100a may include multiple applications installed on the mobile phone, such as calendar, clock, health, Huawei video, etc.

[0054] The display interface 150 of PC100b includes a Huawei Video display interface 130, which includes a title bar 130a and a content display section 130b. The title bar 130a may include the text "Huawei Video" and minimize, maximize, and close controls 131 and 133 for controlling the display interface 130. The content displayed in the content display section 130b is the same as that of the mobile phone's display interface 110, and the screen in this display interface can continue playback from its playback history on the mobile phone. That is, when the playback interface of the "Huawei Video" application is switched from the mobile phone to the PC, the application can maintain its previous state instead of restarting.

[0055] After the phone detects that the user clicked the Huawei Video application icon 112, both the phone and PC can display... Figure 1 The GUI shown in (c) is shown in the image.

[0056] It should be understood that in this embodiment, Figure 1In (a) of the example, Huawei Video is opened from the phone's home screen. In other embodiments, if Huawei Video is opened from the interface of a third-party application, then... Figure 1 In (b) of the above, the mobile phone 100a can display the interface of a third-party application.

[0057] See Figure 1 In (c), the GUI may include the display interface 110 of the mobile phone and the display interface 120 of the PC.

[0058] The GUI can be found here. Figure 1 The relevant description of (a) in the text will not be repeated for the sake of brevity.

[0059] It should be understood that when the Huawei Video playback interface is switched from a PC to a mobile phone, the Huawei Video can maintain its playback status, that is, it can continue playing from its playback record on the PC on the mobile phone, instead of restarting.

[0060] In other embodiments, when the application opened on the mobile phone is a document application and the interface displays the document, when the application is opened on the PC, the PC can continue to display the document location of the application on the mobile phone, thereby achieving application continuity during screen switching and improving the user experience.

[0061] Based on the embodiments of this application, in the computer mode of the mobile phone, when an application currently displayed on the mobile phone is opened from the PC, the application can continue to maintain its state before the switch, such as playback history or document reading position, thereby achieving the continuity of the application switching from one screen to another, avoiding application restart and affecting the user experience.

[0062] Figure 2 This is a schematic diagram of another set of GUIs provided in the embodiments of this application. Among them, from Figure 2 (a) to (b) show the process of switching application display screens when the phone is in computer mode.

[0063] See Figure 2 In (a), the GUI shows the display desktop 210 of mobile phone 200a and the display interface 220 of PC 200b.

[0064] The phone's display desktop 210 can include application icons for multiple applications installed on the phone, such as music, email, sports and health, smart living, etc.

[0065] The PC's display interface 220 may include a search box, an application bar, and display interfaces 230 and 240 for APP1. APP1 may be a document application, and display interfaces 230 and 240 may be two documents opened on the PC.

[0066] like Figure 2 As shown in (a), the display interface 230 includes a title bar 230a and a content display portion 230b. The title bar 230a may include the text "APP1" and a minimize control 231, a maximize control 232, and a close control 233 that can control the display interface 230. The content display portion 230b may include the title portion of document 1 and the content portion of document 1.

[0067] Similarly, the display interface 240 includes a title bar 240a and a content display portion 240b. The title bar 240a may include the text "APP1" and a minimize control 241, a maximize control 242, and a close control 243 that can control the display interface 240. The content display portion 240b may include the title portion of document 2 and the content portion of document 2.

[0068] In this embodiment of the application, the user can open document 1 first and then document 2, that is, the most recently opened document is document 2.

[0069] When the phone detects that the user has clicked the application icon 211 of APP1, the phone and PC can display as follows: Figure 2 The GUI shown in (b) is shown in the image.

[0070] It should be understood that, in this embodiment, when the display interfaces 230 and 240 of APP1 are opened on PC200b, the display interfaces 230 and 240 can be located in different activity stacks. For example, display interface 230 is located in activity stack 1, and display interface 240 is located in activity stack 2. Activity stack 1 may include task 1, which may include activity 1 corresponding to display interface 230. Activity stack 2 may include task 2, which may include activity 2 corresponding to display interface 240.

[0071] Since the user opens display interface 230 and display interface 240 at different times, for example, the user opens display interface 230 first and then opens display interface 240, the activity stack 1 and activity stack 2 correspond to different levels. That is, the level of activity stack 1 is lower than the level of activity stack 2. In other words, the activity stack corresponding to the most recently opened display interface is at a higher level. This level can be understood as the order of PC display, that is, the PC displays the interface corresponding to the activity stack with the higher level.

[0072] In this embodiment of the application, since the PC screen is large, it can display multiple display interfaces of APP1. Although both display interface 230 and display interface 240 are displayed on the PC screen, the corresponding levels of the two display interfaces are different.

[0073] In some possible embodiments, when the mobile phone detects that the user clicks on the application icon 211 of APP1, the mobile phone can migrate the display interface corresponding to the higher-level activity stack from the PC to the mobile phone for display.

[0074] For example, the user's latest opened display interface is 240, which means that the activity stack 2 corresponding to display interface 240 is at a higher level. When the mobile phone detects that the user clicks on the application icon 211 of APP1, it can migrate the content included in the activity stack 2 corresponding to display interface 240 to the newly created activity stack 3 on the mobile phone. The content in the activity stack 2 can include the corresponding task and activity, so that display interface 240 can be migrated to the mobile phone for display, thereby preserving display interface 240 and avoiding data loss caused by restarting APP1.

[0075] In some possible embodiments, when the mobile phone detects that the user clicks on the application icon 211 of APP1, the mobile phone can also migrate the display interface corresponding to multiple activity stacks of APP1 to the mobile phone for display.

[0076] For example, the mobile phone can migrate display interface 230 and display interface 240 to the mobile phone for display, such as split-screen display, or prioritize display interface 240 and display interface 230 after display interface 240 is turned off.

[0077] In some possible embodiments, when the mobile phone detects that the user has clicked the application icon 211 of APP1, a prompt box may pop up on the mobile phone, and the user can choose to migrate one of the display interfaces 230 or 240 to the mobile phone for display.

[0078] Alternatively, the user can choose to migrate display interfaces 230 and 240 to the mobile phone for display. In this case, display interfaces 230 and 240 can be displayed in split-screen mode on the mobile phone, and both display interfaces 230 and 240 can be displayed in the current interface of the mobile phone; or, the mobile phone can prioritize display interface 240, which has a higher activity stack level, and put display interface 230 in the background, that is, when display interface 240 is closed, the mobile phone can display display interface 230.

[0079] In some other embodiments, the user's latest opened display interface is 240. When the mobile phone detects that the user clicks on the application icon 211 of APP1, the content included in the activity stack 2 corresponding to the display interface 240 can be migrated to the mobile phone for display, that is, the mobile phone does not need to create a new activity stack 3.

[0080] See Figure 2 In (b), the GUI shows the display interface 250 of the mobile phone 200a and the display interface 260 of the PC 200b.

[0081] The display interface 250 of mobile phone 200a can display the content of the newly opened document, that is, the content of display interface 240b is displayed in display interface 250, including the title part of document 2 and the content part of document 2.

[0082] The display interface 260 of PC200b includes display interface 230.

[0083] It should be understood that in this embodiment of the application, three or more documents of APP1 can also be opened on the PC. When the user opens APP1 on the mobile phone, the mobile phone will also display the interface of the newly opened document.

[0084] It should be understood that in the embodiments of this application, the display interface 230 of document 1 may maintain its original position on the PC screen, or the display interface 230 of document 1 may be moved to the center of the PC screen for display, or the display interface 230 of document 1 may be displayed in other positions on the PC screen. The embodiments of this application do not limit this.

[0085] Based on the embodiments of this application, when multiple interfaces of the same application are displayed on a PC, and these multiple interfaces are displayed in multiple windows, such as two or more documents, then when the application is opened on a mobile phone, the interface of the most recently opened document will be displayed on the mobile phone screen. This technical solution avoids application restarts and can achieve continuity in switching applications from one screen to another.

[0086] Figure 3 This is a schematic diagram of another set of GUIs provided in the embodiments of this application. Among them, from Figure 3 (a) to (b) show the process of switching application display screens when the phone is in computer mode.

[0087] See Figure 3 In (a), the GUI shows the display interface 310 of mobile phone 300a and the display interface 320 of PC 300b.

[0088] The display interface 310 of the mobile phone 300a can be the homepage display interface of APP1. The display interface 310 can include APP1, a search box, a function bar 310a, etc., as well as the interface corresponding to "Recently Opened" in the function bar. The content of the interface corresponding to "Recently Opened" can include display area 311 and display area 312. Display area 311 can include the icon of APP1 and the title of document 2, as well as some functional controls, such as favorites, etc. Display area 312 can include the icon of APP2 and the title of document 1, as well as some functional controls, such as favorites, etc.

[0089] The display interface 320 of the PC 300b may include a status bar, a search box, an application bar, and display interfaces 330 and 340 of APP1. The status bar may include the phone's signal strength, battery level, time, etc. APP1 may be a document application, and display interfaces 330 and 340 may be two documents opened on the PC.

[0090] The display interface 330 may include a title bar 330a and a content display portion 330b. The title bar 330a may include the text "APP1", as well as a minimize control 331, a maximize control 332, and a close control 333 for controlling the display interface 330a. The content display portion 330b may include the title portion of document 1 and the content portion of document 1.

[0091] Similarly, the display interface 340 may include a title bar 340a and a content display portion 340b. The title bar 340a may include the text "APP1", as well as a minimize control 341, a maximize control 342, and a close control 343 that can control the display interface 340a. The content display portion 340b may include the title portion of document 2 and the content portion of document 2.

[0092] After mobile phone 330a detects the user's tap on display area 312, mobile phone 300a and PC 300b can display as follows: Figure 3 The GUI shown in (b) is shown in the image.

[0093] It should be understood that, in this embodiment, when the display interfaces 330 and 340 of APP1 are opened on PC300b, the display interfaces 330 and 340 can be located in different activity stacks. For example, the display interface 330 is located in activity stack 1, and the display interface 340 is located in activity stack 2. Activity stack 1 may include task 1, which may include activity 1 corresponding to the display interface 330. Activity stack 2 may include task 2, which may include activity 2 corresponding to the display interface 340.

[0094] When a user clicks on display area 312, the phone can match the window that will be displayed after clicking on display area 312 in the already opened windows. For example, it can match based on information such as the package name, UID and activity of the launched application. When the matched window is display interface 340, the content in activity stack 2 is migrated to the newly created activity stack 3 in the phone, thus preserving display interface 340 and avoiding data loss caused by restarting APP1.

[0095] In some other embodiments, the mobile phone may not need to create a new activity stack 3. In this case, when the mobile phone matches the display interface 340, it can directly migrate the display interface 340 to the mobile phone for display.

[0096] See Figure 3 In (b), the GUI shows the display interface 350 of mobile phone 300a and the display interface 360 ​​of PC 300b.

[0097] The content displayed on the display interface 350 of the mobile phone 300a is the same as that of the display interface 330b, that is, the content of the display interface 330b is displayed on the screen of the mobile phone 300a, including the title and content of document 1.

[0098] The display interface 360 ​​of the PC300b includes a display interface 340.

[0099] It should be understood that the display interface 340 may remain in its original position on the PC screen, or the display interface 340 may be moved to the center of the PC screen for display, or the display interface 340 may be displayed in other positions on the PC screen. This application embodiment does not limit this.

[0100] In this embodiment, when multiple interfaces of the same application are displayed on a PC, and these multiple interfaces are displayed in multiple windows (e.g., two or more documents), opening the document in the application interface on the mobile phone will display the matching document interface on the mobile phone screen. This technical solution avoids application restarts and enables continuous application switching from one screen to another.

[0101] Figure 4 This is a schematic diagram illustrating the switching of the display interface in a display method provided in an embodiment of this application. In this embodiment, activity stack 1 belongs to the mobile phone, and activity stack 2 also belongs to the mobile phone. The example is a screen mirroring from the mobile phone in computer mode to a PC.

[0102] See Figure 4In (a), activity stack1 can include tasks, which can be one or more, and each task can include multiple activities1 and activities2.

[0103] In Android systems, most of the content users see in applications is provided by activity components. An application can include multiple activities. For example, when a user clicks on an application icon, activity1 is launched, displaying the application's home screen on the electronic device's display. When the user clicks on an element in the home screen, activity2 is launched, and the electronic device's display will switch from the application's home screen to another screen. That is, the screen corresponding to activity2 will cover the screen corresponding to activity1, so that the user can only see the current display screen. Activity2 is located at the top of the activity stack, meaning that the screen corresponding to activity2 can be presented to the user and can directly receive some user operations.

[0104] For example, see Figure 1 In (a), the phone's display interface 110 can be considered the interface corresponding to activity2. Before launching activity2, when the user clicks the Huawei Video application icon on the phone's home screen, activity1 can be considered launched. The interface corresponding to activity1 is the homepage display interface of Huawei Video. At this time, activity1 is at the top of the activity stack. When the user clicks the name of TV series 1 or the corresponding card in the homepage display interface, activity2 can be considered launched. At this time, activity2 is added to the activity stack, and since activity2 is at the top of the stack, the phone can display the corresponding display interface 110.

[0105] In this embodiment, when a mobile device opens an application and displays the interface corresponding to activity2, if the user opens the same application on a PC (e.g., by double-clicking the application icon on the PC), the mobile device will create a new activity stack2 for that application. This activity stack2 can be an empty set. Then, the mobile device will search for the package name, user identification (UID), and activity information of the launched applications to match the best window that meets the criteria. In this embodiment, when the window matched by the mobile device is already on the phone (i.e., the currently displayed window or a window running in the background), the content of activity stack1 corresponding to that window is migrated to activity stack2, including the task and the activities 1 and 2 included in the task.

[0106] See Figure 4 In (b), when the content in activity stack1 is migrated to activity stack2, activity stack1 is empty, and activity stack2 includes the tasks in the original activity stack1 and activities1 and 2 in the tasks. In the PC interface, that is, the window of the application displayed on the mobile phone is switched to the PC. At this time, the PC displays the application window and the display interface corresponding to activity2, and retains the task and activity order of the application, that is, it retains the application data. The display interface corresponding to activity2 also becomes the focus of the PC interface, that is, the display interface corresponding to activity2 can be directly presented to the user and can directly receive some user operations.

[0107] In some embodiments, when the application supports resizing the display interface, the application can be displayed on the PC desktop as a floating window, and the size of the floating window can be adjusted. In addition, the interface elements in the application's display interface can be rearranged and displayed on the PC desktop, that is, the interface elements in the display interface can be adjusted arbitrarily, thereby improving the user experience to a certain extent.

[0108] It should be understood that whether an application supports changing the display screen size can be preset by the application developers, who can write this feature into the application's source code during development. In one possible implementation, on an Android-based electronic device, whether the application supports resizing is determined by assessing whether the application supports resizing.

[0109] In one possible implementation, if the application's code declares that the application cannot change the display screen size, then the application will be displayed in full-screen mode by default.

[0110] In other embodiments, when the application does not support resizing, or the resizing effect is poor, the application can also be displayed as a floating window. However, the window's interface layout may change; for example, the size or position of some elements may change. In this case, the phone can restart the current interface, that is, reload the display interface corresponding to activity2.

[0111] Therefore, when the application's display window switches from a mobile phone to a PC, the application will not restart, but will retain the original task and activity order. This means that the application's data will not be lost during the switching of the application's display window, thus achieving continuity when switching the application from one screen to another and improving the user experience.

[0112] In other embodiments, if the application does not support resizing or moving to another screen for display, the phone can restart the application and display the application's window on the PC's screen.

[0113] In other embodiments, if the window matched by the mobile phone is already open on the PC, the window is displayed in the foreground and becomes the focus, that is, the window can be directly presented to the user and can directly receive some of the user's operations.

[0114] It should be understood that in the embodiments of this application, when a mobile phone establishes a connection with a PC, the number of pixels per inch (DPI) of the PC screen can be adapted to the DPI of the mobile phone, that is, the DPI of the PC can be set to be the same as the DPI of the mobile phone. When the PC is in a keyboard-removed state, a touchscreen state, or when the navigation state changes, the window manager service (WMS) in the mobile phone will intercept the message sent by the system to the application to reload the interface, so that the application window will not reload the current interface, thereby improving the user experience.

[0115] For example, when the PC is in a keyboard-removed state, touchscreen state, or navigation state changes, the activity record in the phone can detect the activity change and determine whether to refresh the interface based on the application's manifest file. When it determines that the interface needs to be refreshed, it will send a refresh message to the application. WMS can intercept the reload message sent to the application, thus preventing the application interface from being reloaded.

[0116] In the embodiments of this application:

[0117] Remove keyboard state: This refers to the PC keyboard changing from a connected state to an unconnected state, or the keyboard changing from a connected state to an unconnected state and then back to a connected state.

[0118] Touchscreen status: refers to the application switching from a touch-enabled screen to a non-touch-enabled screen.

[0119] Navigation status changes: This refers to the PC supporting input operations using the trackball or arrow keys. When the trackball or arrow keys change, the navigation status can be considered to have changed.

[0120] It should be understood that the embodiments of this application use the above-mentioned change of the state of the electronic device as an example for illustration, but this should not limit this application in any way. In other cases, when other states of the electronic device change and the system sends a message to reload the interface, WMS will still intercept the message to reload the interface, and this technical solution is also within the protection scope of this application.

[0121] Figure 5 This is a schematic flowchart illustrating a display method provided in an embodiment of this application. The method can be applied to a first electronic device and a second electronic device. Taking screen projection from the first electronic device to the second electronic device as an example, when the first and second electronic devices establish a connection, the DPI of the second electronic device's screen can be set to be the same as the DPI of the first electronic device. Figure 5 As shown, the method may include steps 510 to 550.

[0122] 510, Detect the operation of launching the first application.

[0123] For example, see Figure 1 In (a), the second electronic device can be PC100b, the first application can be Huawei Video on the desktop of PC100b, and the operation of launching the first application can be the operation of the user clicking the application icon 122 of Huawei Video with the mouse.

[0124] Step 510 can be performed by the first electronic device, that is, the first electronic device can detect the user's operation of launching the first application.

[0125] It should be understood that the operation of launching the first application can be triggered in the first electronic device or in the second electronic device, and the embodiments of this application do not limit this.

[0126] 520, Match the window of the first application in the first electronic device.

[0127] After detecting the launch of the first application, the system searches the first electronic device for a window that matches the first application among already launched application windows. For example, it searches the first electronic device for the package name, UID, and activity of already launched applications and compares this information with that of the first application to determine if the first application has been launched on the first electronic device. For instance, if the first electronic device finds a window with the same package name as the first application among already launched applications, it can determine that the first application has been launched on the first electronic device.

[0128] 530, when the matching window is determined in the first electronic device, create an activity stack 2 in the first electronic device.

[0129] In this step, when a window matching the first application is determined in the first electronic device, a new activity stack 2 can be created in the first electronic device. The initial state of the activity stack 2 can be an empty set.

[0130] In other embodiments, when it is determined that a window matching the first application has been projected onto the second electronic device, if the window is not in the foreground of the second electronic device, the matched window is moved to the foreground for display.

[0131] In other embodiments, when it is determined that a window matching the first application does not exist, i.e. the first application has not been running before, a new window can be launched in the first electronic device and the new window can be projected onto the second electronic device for display.

[0132] In other embodiments, if no perfectly configured window is available, a second-best matching window can be found based on the window's affinity.

[0133] In other embodiments, when a matching window is determined to be in the first electronic device, the first electronic device may not need to create a new activity stack 2, but instead directly project the window onto the second electronic device for display.

[0134] 540, Move the contents of activity stack 1, where the window matching the first application is located, to activity stack 2 in the first electronic device.

[0135] In this step, Activity Stack 1 includes the activity, task, etc., corresponding to the application window that matches the first application. For example, see... Figure 1 In (a) of the above, the first application can be Huawei Video, and the display interface corresponding to the application window matching the first application can be the display interface 110 of Huawei Video on the mobile phone. Then, the activity stack 1 can contain a task, which includes activity1 corresponding to the homepage display interface of Huawei Video and activity2 corresponding to display interface 110. Then, the task in the activity stack 1 and the corresponding activity1 and activity2 are migrated to the activity stack 2.

[0136] Optionally, when the contents of activity stack 1 are migrated to activity stack 2, the first electronic device removes activity stack 1.

[0137] 550, the window of the matched first application is displayed in the second electronic device.

[0138] After the task in activity stack 1 and the corresponding activity1 and activity2 are migrated to activity stack 2, the first electronic device sends the data corresponding to the content in activity stack 2 to the second electronic device, and then the window of the matched first application can be displayed on the screen of the second electronic device.

[0139] For example, if the first application is a video application, the first electronic device can transmit the video data of the application to the second electronic device and display the window of the first application on the second electronic device.

[0140] In some embodiments, in order to adapt to the window management requirements of the second electronic device, the window size of the first application may change. For example, the window of the first application may change from full-screen display in the first electronic device to floating window display in the second electronic device, or full-screen display in the second electronic device, or a title bar may be added to the display interface corresponding to the window of the first application. The title bar may include the name of the first application, as well as functional controls for minimizing, maximizing and closing the window.

[0141] In some embodiments, when the first application supports resizing, the first application can be displayed as a floating window on the desktop of the second electronic device, and the size of the floating window can be changed according to the user's adjustment. In addition, the interface elements in the window of the first application can be rearranged and displayed on the desktop of the second electronic device, that is, the interface elements in the window can be adjusted arbitrarily, thereby improving the user experience to a certain extent.

[0142] In some embodiments, when the first application does not support resizing, or the resizing effect is poor, the first application may also be displayed as a floating window, but the window's interface layout may be changed. If the resizing effect is still poor, the first application is reloaded by relaunching the current window's display interface.

[0143] In some embodiments, the first application may also be displayed in full-screen mode on the second electronic device by default.

[0144] Based on the embodiments of this application, when an application window that has already been launched can be matched in the first electronic device when the application is launched in the second electronic device, the application window can be migrated to the second electronic device for display. This ensures the continuity of the application when switching from the first electronic device to the second electronic device, thereby avoiding application restart and improving the user experience.

[0145] It should be understood that the specific execution order of steps 510 to 550 described above is not limited in the embodiments of this application.

[0146] Optionally, the method may further include step 560:

[0147] 560, detect changes in the status of the second electronic device;

[0148] It should be understood that the state changes in this step may include, but are not limited to, the removal of keyboard state, touch screen state, and navigation state mentioned above.

[0149] It should be understood that step 560 can be performed by the first electronic device.

[0150] Optionally, the method may further include step 570:

[0151] 570, intercepts the message sent to the first application to reload the interface due to a state change.

[0152] When the above state changes, the system will send a message to the first application to reload the interface. At this time, the WMS in the first electronic device can intercept the message, so that the interface of the first application will not be reloaded.

[0153] It should be understood that step 570 can be executed after step 560 or before step 560. Step 570 can also be executed before or after any of the steps between steps 510 and 550. This application embodiment does not limit this.

[0154] This technical solution can avoid unnecessary interface reloading caused by the aforementioned state changes, thereby improving the user experience.

[0155] Figure 6 This is a schematic flowchart illustrating a display method provided in an embodiment of this application. The method can be applied to a first electronic device. Taking screen projection from the first electronic device to a second electronic device as an example, the method may include steps 610 to 630.

[0156] 610, The first electronic device detects the first operation of starting the first application.

[0157] The first operation can be triggered in the second electronic device, see [link to relevant documentation]. Figure 1 In (a) of the above, the first operation could be the user clicking the Huawei Video application icon 122. The first operation could also be triggered within a first electronic device.

[0158] 620, the first electronic device matches the window of the first application.

[0159] The first electronic device can match the window of the first application within an application window that is already running on the first electronic device.

[0160] In one embodiment, the first electronic device can match the window of the first application from the application window that has been launched in the first electronic device based on first information.

[0161] The first piece of information may include, but is not limited to, the package name of the launched application; the user identity verification UID of the launched application; and the activity corresponding to the launched application.

[0162] It should be understood that the first electronic device can compare the relevant information of the first application with the content included in the first information. When the information matches, it can be understood that the first application has been launched in the first electronic device. For example, if the same content is matched from the window launched by the first electronic device based on the package name and activity of the first application, it can be considered that the first application has been launched in the first electronic device.

[0163] 630, when the first electronic device determines that the window of the first application is in the first electronic device, the window of the first application is moved to the second electronic device for display.

[0164] The window of the first application can be displayed in the second electronic device as a floating window or in full-screen mode.

[0165] In some embodiments, when the first application supports resizing, the first application can be displayed as a floating window on the desktop of the second electronic device, and the size of the floating window can be changed according to the user's adjustment. In addition, the interface elements in the window of the first application can be rearranged and displayed on the desktop of the second electronic device, that is, the interface elements in the window can be adjusted arbitrarily, thereby improving the user experience to a certain extent.

[0166] In some embodiments, when the first application does not support resizing, or the resizing effect is poor, the first application may also be displayed as a floating window, but the window's interface layout may be changed. If the resizing effect is still poor, the first application is loaded and displayed using a relaunch method.

[0167] In other embodiments, when it is determined that a window matching the first application does not exist (i.e., the first application has not been running previously), a new window can be launched on the first electronic device and projected onto the second electronic device for display. In other embodiments, if no perfectly matched window is available, a second-best matching window can be found based on window affinity.

[0168] In one embodiment of this application, after detecting the operation of launching a first application, the first electronic device matches the window of the first application within the already launched application window. When it is determined that the window of the first application is in the first electronic device, the window of the first application is moved to the second electronic device for display. This technical solution can retain the data and state of the application when it is switched from the first electronic device to the second electronic device, avoiding application restart.

[0169] Optionally, migrating the window of the first application to the second electronic device for display includes: the first electronic device migrating the content in the first activity stack corresponding to the window of the first application to the second activity stack; and the first electronic device sending the data of the window corresponding to the second activity stack to the second electronic device.

[0170] It should be understood that, see also Figure 4 In (a) and (b), the first activity stack can be activity stack 1, the second activity stack can be activity stack 2, the second activity stack can be newly created by the first electronic device, and the second activity stack serves the second electronic device, thereby enabling stack-based management of multiple electronic devices.

[0171] In one embodiment of this application, since the first electronic device migrates the content in the first activity stack corresponding to the window of the first application to the second activity stack, the tasks and activity records in the first activity stack can be retained, that is, the data of the first application can be saved, so that when the first application is switched to the second electronic device for display, the data of the first application will not be lost, thus improving the continuity of the application.

[0172] Optionally, the method may further include the first electronic device removing the first active stack. This can save system power consumption of the electronic device.

[0173] Optionally, the window of the first application displayed in the second electronic device further includes a title bar portion, which includes at least the application name of the first application.

[0174] For example, see Figure 2 In (a) of the above, the second electronic device may be PC200b, and the first application may be APP1. Then, the window or display interface 230 of APP1 displayed on PC200b may also include a title bar portion 230a, which may include the application name of APP1. The title bar portion may also include some functional controls, such as controls 231, 232 and 233.

[0175] Optionally, the size of the window of the first application displayed in the second electronic device is different from the size of the window displayed in the second electronic device.

[0176] For example, see Figure 2 In (a), the size of the window or display interface 230 of the first application displayed in the PC 200b may be different from its size in the mobile phone 200a.

[0177] In other examples, the size of the window of the first application displayed in the second electronic device may be the same as the size of the window displayed in the second electronic device.

[0178] Optionally, the size of the window of the first application displayed in the second electronic device can be adjusted.

[0179] In this technical solution, users can adjust the size of the first application's window as needed, thereby effectively improving the user experience.

[0180] Optionally, the method further includes: when the first electronic device determines that the window of the first application is in the second electronic device, bringing the window of the first application to the foreground.

[0181] In this technical solution, when the window of the first application has been projected onto the second electronic device, the window of the first application is placed in the foreground.

[0182] Optionally, the method further includes: setting the number of pixels per inch (Pixels per inch) of the screen of the second electronic device to be the same as the number of pixels per inch (Pixels per inch) of the screen of the first electronic device.

[0183] It should be understood that when the first electronic device establishes a connection with the second electronic device, the first electronic device can set the number of pixels per inch (Pixels per inch) of the second electronic device's screen to be the same as the number of pixels per inch (Pixels per inch) of the first electronic device's screen. This helps to ensure the display effect of the projection.

[0184] Optionally, the method further includes: the first electronic device detecting a state change in the second electronic device; the first electronic device intercepting a message sent by the first electronic device to the first application to reload the interface based on the state change.

[0185] This state change may include, but is not limited to, the removal of keyboard state, touch screen state, or navigation state as mentioned above.

[0186] This technical solution can prevent the display interface corresponding to the window of the first application from being reloaded due to a change in the state of the second electronic device.

[0187] Optionally, when the aforementioned state of the first electronic device changes, causing the system to send a message to the first application to reload the interface, the first electronic device can also intercept the message.

[0188] Optionally, the method further includes: the first electronic device determining whether the first application supports changing the display interface size of the window; if it is determined that the first application supports changing the display interface size of the window, the step of migrating the window of the first application to the second electronic device for display includes: migrating the window of the first application to the second electronic device for display in the form of a floating window.

[0189] When the first electronic device determines that the display interface size of the first application's supported window has changed, it can display the first application's window as a floating window on the second electronic device, thereby improving the user experience.

[0190] Optionally, when it is determined that the display interface size of the first application's supported window has changed, the position of the interface elements of the first application's window may also change or be adjusted.

[0191] This application also provides an electronic device, including one or more processors; one or more memories; the one or more memories storing one or more computer programs, the one or more computer programs including instructions that, when executed by one or more processors, cause a display method as described in any of the possible implementations above to be performed.

[0192] This application also provides a chip, which includes a processor and a communication interface. The communication interface is used to receive signals and transmit the signals to the processor. The processor processes the signals so that the display method described in any of the possible implementations above is executed.

[0193] It is understood that, in order to achieve the above-mentioned functions, electronic devices include hardware and / or software modules that perform the respective functions. Based on the algorithmic steps of the examples described in the embodiments disclosed herein, this application can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed by hardware or by computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application in conjunction with the embodiments, but such implementation should not be considered beyond the scope of this application.

[0194] This embodiment can divide the electronic device into functional modules according to the above method example. For example, each function can be divided into its own functional modules, or two or more functions can be integrated into one processing module. The integrated modules can be implemented in hardware. It should be noted that the module division in this embodiment is illustrative and only represents one logical functional division. In actual implementation, there may be other division methods.

[0195] This embodiment also provides a computer-readable storage medium storing computer instructions. When the computer instructions are executed on an electronic device, the electronic device performs the aforementioned method steps to implement the display method in the above embodiment.

[0196] This embodiment also provides a computer program product that, when run on a computer, causes the computer to perform the aforementioned related steps to implement the display method described in the above embodiment.

[0197] In addition, embodiments of this application also provide an apparatus, which may specifically be a chip, component, or module. The apparatus may include a connected processor and a memory; wherein the memory is used to store computer execution instructions, and when the apparatus is running, the processor may execute the computer execution instructions stored in the memory to cause the chip to execute the display methods in the above-described method embodiments.

[0198] In this embodiment, the electronic device, computer-readable storage medium, computer program product or chip are all used to execute the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can be referred to the beneficial effects of the corresponding methods provided above, and will not be repeated here.

[0199] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0200] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0201] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.

[0202] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0203] In addition, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0204] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0205] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A display method, characterized in that, The method is applied to a first electronic device, and the method includes: The first electronic device detects the first operation of launching the first application; The first electronic device matches the window of the first application; When the first electronic device determines that the window of the first application is in the first electronic device, the window of the first application is moved to the second electronic device for display; The step of migrating the window of the first application to the second electronic device for display includes: The first electronic device moves the contents of the first activity stack corresponding to the window of the first application to the second activity stack; The first electronic device sends the data of the window corresponding to the second activity stack to the second electronic device.

2. The method according to claim 1, characterized in that, The first electronic device matches the window of the first application, including: The first electronic device matches the window of the first application from the application windows that have been launched in the first electronic device according to the first information.

3. The method according to claim 2, characterized in that, The first information includes at least one of the following: The package name of the launched application; the user's identity verification for the launched application; the activity corresponding to the launched application.

4. The method according to any one of claims 1-3, characterized in that, The window of the first application displayed in the second electronic device also includes a title bar portion, which includes at least the application name of the first application.

5. The method according to any one of claims 1-3, characterized in that, The size of the window of the first application displayed in the second electronic device is different from the size of the window displayed in the first electronic device.

6. The method according to any one of claims 1-3, characterized in that, The size of the window of the first application displayed in the second electronic device is adjustable.

7. The method according to any one of claims 1-3, characterized in that, The method further includes: When the first electronic device determines that the window of the first application is in the second electronic device, it brings the window of the first application to the foreground.

8. The method according to any one of claims 1-3, characterized in that, The method further includes: The first electronic device sets the number of pixels per inch of the screen of the second electronic device to be the same as the number of pixels per inch of the screen of the first electronic device.

9. The method according to claim 8, characterized in that, The method further includes: The first electronic device detects the state change of the second electronic device; The first electronic device intercepts the message sent by the first electronic device to the first application to reload the interface based on the state change.

10. The method according to any one of claims 1-3, characterized in that, The first operation is triggered in the first electronic device, or the first operation is triggered in the second electronic device.

11. The method according to any one of claims 1-3, characterized in that, The method further includes: The first electronic device determines whether the first application supports changing the display interface size of the window; If it is determined that the display interface size of the first application's supported window has changed, the step of migrating the window of the first application to the second electronic device for display includes: The window of the first application is moved to the second electronic device as a floating window for display.

12. An electronic device, characterized in that, It includes one or more processors; one or more memories; said one or more memories storing one or more computer programs, said one or more computer programs including instructions that, when executed by said instructions by said one or more processors, cause the display method as described in any one of claims 1-11 to be performed.

13. A chip, characterized in that, The chip includes a processor and a communication interface, the communication interface being used to receive signals and transmit the signals to the processor, the processor processing the signals such that the display method as described in any one of claims 1-11 is executed.

14. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that, when executed on an electronic device, cause the display method as described in any one of claims 1-11 to be performed.

Citation Information

Patent Citations

  • Screen projection processing method and device

    CN111857925A