CN115150502A - Display method and device of application widget - Google Patents

Display method and device of application widget Download PDF

Info

Publication number
CN115150502A
CN115150502A CN202110352490.1A CN202110352490A CN115150502A CN 115150502 A CN115150502 A CN 115150502A CN 202110352490 A CN202110352490 A CN 202110352490A CN 115150502 A CN115150502 A CN 115150502A
Authority
CN
China
Prior art keywords
terminal
widget
application
mobile phone
service data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202110352490.1A
Other languages
Chinese (zh)
Other versions
CN115150502B (en
Inventor
陈锋
曹原
邵天雨
周星辰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN202110352490.1A priority Critical patent/CN115150502B/en
Priority to PCT/CN2022/084103 priority patent/WO2022206848A1/en
Publication of CN115150502A publication Critical patent/CN115150502A/en
Application granted granted Critical
Publication of CN115150502B publication Critical patent/CN115150502B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/38Creation or generation of source code for implementing user interfaces
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72403User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality
    • H04M1/72406User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality by software upgrading or downloading
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72466User interfaces specially adapted for cordless or mobile telephones with selection means, e.g. keys, having functions defined by the mode or the status of the device

Landscapes

  • Engineering & Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • User Interface Of Digital Computer (AREA)
  • Telephone Function (AREA)

Abstract

The application discloses a display method and device of application widgets, relates to the field of electronic equipment, and solves the problem that the widgets of an application can be displayed on a plurality of terminals only when the application is required to be installed in the plurality of terminals. The specific scheme is as follows: under the condition that a first terminal comprising a first application is connected with a second terminal, the second terminal can display a widget of the first application according to received layout information by sending the layout information of the widget of the first application to the second terminal under the condition that the widget of the first application is not displayed; the layout information comprises the identification, style and layout position in the widget of the UI element included in the widget.

Description

Display method and device of application widget
Technical Field
The present application relates to the field of electronic devices, and in particular, to a method and an apparatus for displaying application widgets.
Background
Nowadays, electronic devices such as mobile phones and the like become indispensable communication tools in daily life and work of people. By installing an application (APP, hereinafter referred to as application) in the mobile phone, the functions of the mobile phone can be improved, and better use experience is provided for users.
Currently, many applications support the setting of widgets in order to facilitate the user to view the information provided by the application. Widgets are miniature application views that can be embedded into other applications, such as a desktop, and receive periodic updates. For example, a widget of an application may be added on a cell phone desktop. The user can view the information provided by the application through the widget of the application added on the desktop without opening the application. Typical small parts are a clock, weather, music play, picture carousel, etc. For example, a music playing widget of the music application is added to the mobile phone desktop, and the user can view playing information or perform playing control and the like through the music playing widget on the mobile phone desktop under the condition that the music application is not opened.
The actual execution logic of the widget depends on its application processing. That is, if a user wants to add a widget of an application on the desktop of the mobile phone, the application must be installed in the mobile phone first, and then the widget of the application can be selected to be added to the desktop. When a user has a plurality of terminals, corresponding applications need to be installed on each terminal, and the widgets of the applications can be viewed on the terminals.
Disclosure of Invention
The embodiment of the application widget display method and device solves the problem that the widget of the application can be displayed on a plurality of terminals only when the application needs to be installed in the plurality of terminals.
In order to achieve the purpose, the following technical scheme is adopted in the application:
in a first aspect, an embodiment of the present application provides a display method of an application widget, which is applied to a first terminal including a first application, and the method may include: the first terminal establishes connection with the second terminal; the first terminal transmitting layout information of the widget of the first application to the second terminal for the second terminal to display the widget without displaying the widget of the first application; wherein the layout information may include: the widget includes an identification of a first User Interface (UI) element, a style, and a layout position in the widget.
By adopting the technical scheme, a first terminal installed with a certain application (such as a first application), such as a mobile phone, can send the relevant information of the widget of the first application to a second terminal which does not display the widget of the first application, so that the second terminal can display the widget of the application for a user to view according to the relevant information of the widget from the first terminal. The displaying of the widget can be achieved even if the first application is not installed in the second terminal. The problem of many ends show the widget, need all install corresponding application is solved. The use cost of the user is saved, and the user experience is improved.
In one possible implementation, the method may further include: the first terminal sends business data of the widget of the first application to the second terminal, and the business data is used for the second terminal to display content in the corresponding first UI element of the widget; the service data comprises one or more of picture information, text information and state information corresponding to the first UI element, and the state information is used for indicating the current state of the first UI element. The service data of the widget is sent to the second terminal, and the second terminal can display the corresponding content in the corresponding UI element, so that the content in the widget displayed by the second terminal is kept synchronous with the first terminal.
In another possible implementation manner, the displaying, by the second terminal, the widget of the first application may include: the second terminal does not include the first application; or, the second terminal includes the first application but does not add a widget of the first application on a desktop of the second terminal.
In another possible implementation manner, the layout information and the service data of the widget may be further used for the second terminal to update the content of the displayed widget when the widget of the first application is displayed. In this way, widget content is kept synchronized when multiple end displays are enabled.
In another possible implementation, the widget is included in a desktop of the first terminal. In this way, after the first terminal is connected with the second terminal, the widgets added to the desktop by the user of the first terminal can be distributed to the second terminal for the second terminal to display.
In another possible implementation manner, before the first terminal sends the layout information of the widget of the first application to the second terminal, the method may further include: the first terminal determines that the second terminal and the second terminal log in the same account. The privacy of the user is protected.
In another possible implementation manner, before the first terminal sends the layout information of the widget of the first application to the second terminal, the method may further include: the first terminal receives a first operation of a user, and the first operation is used for indicating a distribution widget. In this way, the distribution of the widget to other terminals can be triggered according to the user's operation.
In another possible implementation manner, before the first terminal receives the first operation of the user, the method may further include: the first terminal displays an icon of a first application; the first terminal receives a second operation of the user on the icon of the first application; responding to the second operation, the first terminal displays menu options, wherein the menu options comprise a first control, and the first control is used for triggering the first terminal to distribute the widgets; the first operation is an operation of a first control. The control for triggering the widget distributed in the application is added in the menu option of the application, so that the user can conveniently realize the distribution of the widget at multiple ends, and the use efficiency of the electronic equipment is improved.
In another possible implementation, the widget is a user-selected or recommended by the first terminal among a plurality of widgets of the first application.
In another possible implementation manner, before the first terminal receives the first operation of the user, the method may further include: the first terminal displaying the widget; the first terminal receives a third operation of the user on the widget; in response to the third operation, the first terminal displays a menu option, wherein the operation menu comprises a second control, and the second control is used for triggering the first terminal distribution widget; the first operation is an operation of a second control. The widget is added to the menu options of the widget to trigger the widget to be distributed, so that the user can conveniently realize the distribution of the application widgets at multiple ends, and the use efficiency of the electronic equipment is improved.
In another possible implementation manner, before the first terminal receives the first operation of the user, the method may further include: the method comprises the steps that a first terminal displays a desktop setting interface, and the desktop setting interface comprises a small part; wherein the first operation is a drag operation on the widget; the first terminal transmitting layout information of a widget of a first application to a second terminal, including: and when the first terminal releases the dragging after determining that the widget is dragged to the preset area, the first terminal sends layout information of the widget to the second terminal. The user can trigger the distribution of the application widgets at multiple ends by dragging the small parts in the desktop setting interface, so that the use efficiency of the electronic equipment is improved.
In another possible implementation manner, the sending, by the first terminal, the layout information of the widget to the second terminal, and the sending the service data may include: and the first terminal configures the layout information and the service data of the small parts to a json file and then sends the json file to the second terminal.
In another possible implementation, after the first terminal transmits the service data of the widget of the first application to the second terminal, the method may further include: the first terminal acquires refreshed service data from the first application of the first terminal at regular time according to the refreshing frequency information of the first application; and the first terminal sends the refreshed service data to the second terminal, so that the second terminal can update the content in the displayed small parts. By acquiring refreshed service data at regular time and sending the refreshed service data to the second terminal, the second terminal can realize timely updating of the content in the small parts distributed by the first terminal.
In another possible implementation manner, the method may further include: the first terminal receives an identifier and an operation type of a first UI element from the second terminal, wherein the identifier and the operation type of the first UI element are sent by the second terminal after the second terminal receives a fourth operation of the user, and the fourth operation is the operation on the first UI element in the widget displayed by the second terminal; and the first terminal controls the first application of the first terminal to respond to the fourth operation according to the identification and the operation type of the first UI element. The first terminal controls the first application to respond to the operation of the user on the second terminal according to the identification and the operation type of the UI element from the second terminal, and reverse control is achieved.
In another possible implementation manner, in a case where the second terminal includes the first application, after the first terminal transmits layout information of the widget of the first application to the second terminal, the method may further include: the first terminal receives a request message from the second terminal; responding to the request message, the first terminal acquires real-time service data of a first application in the first terminal; the first terminal sends the first application real-time service data in the first terminal to the second terminal. Under the condition that the first application is installed on the second terminal, the first terminal sends real-time service data to the second terminal, so that the service can be continued to the first application of the second terminal, and the first application of the second terminal continues to provide service for the user.
In another possible implementation manner, after the first terminal sends the service data of the first application in the first terminal to the second terminal in real time, the method may further include: the first terminal receives a notification message from the second terminal; in response to the notification message, the first terminal controls the first application of the first terminal to suspend the associated service.
In a second aspect, an embodiment of the present application provides a method for displaying an application widget, which is applied to a second terminal, and the method may include: the second terminal establishes connection with the first terminal, and the first terminal comprises a first application; in case that the second terminal does not display the widget of the first application, the second terminal receives layout information of the widget of the first application from the first terminal; the layout information comprises an identifier, a style and a layout position in the widget of a first UI element included in the widget; the second terminal displays the widget according to the layout information of the widget, the widget including the first UI element.
By adopting the technical scheme, after the second terminal which does not display the widget of the first application receives the relevant information of the widget of the first application from the first terminal provided with the first application, the widget of the application can be displayed for the user to view according to the relevant information of the widget from the first terminal. In this way, the display of the widget can be achieved even if the first application is not installed in the second terminal. The problem of many ends show the widget, need all install corresponding application is solved. The use cost of the user is saved, and the user experience is improved.
In a possible implementation manner, under the condition that the second terminal does not display the widget of the first application, the second terminal receives service data of the widget of the first application from the first terminal, where the service data includes one or more of picture information, text information and state information corresponding to the first UI element, and the state information is used to indicate a current state of the first UI element; and the second terminal displays content in the corresponding first UI element of the widget according to the service data. The second terminal can display corresponding content in the corresponding UI element according to the service data from the first terminal, so that the content in the widget displayed by the second terminal is kept synchronous with the first terminal.
In another possible implementation, the displaying, by the second terminal, the widget of the first application may include: the second terminal does not include the first application; or, the second terminal includes the first application but does not add a widget of the first application to a desktop of the second terminal.
In another possible implementation manner, the method may further include: and the second terminal updates the contents of the displayed widgets according to the layout information and the business data of the widgets of the first application received from the first terminal in the case of displaying the widgets of the first application. In this way, the widget content is kept synchronized when the widgets are caused to be displayed on multiple ends.
In another possible implementation manner, the method may further include: the second terminal acquires refreshed service data at regular time; and the second terminal updates the content in the displayed small parts according to the refreshed service data. By acquiring the refreshed service data at regular time, the content in the widget distributed by the first terminal can be updated in time.
In another possible implementation, in case the second terminal does not comprise the first application; the second terminal periodically acquires the refreshed service data, which may include: and the second terminal receives the refreshed service data sent by the first terminal at regular time.
In another possible implementation manner, after the second terminal displays the widget according to the layout information of the widget, the method may further include: the second terminal receives a fourth operation of the user on the first UI element in the widget displayed by the second terminal; and the second terminal sends the identifier and the operation type of the first UI element to the first terminal, so that the first terminal can respond to the fourth operation. After receiving the operation of the user on the UI element in the distributed widget, the first terminal makes a corresponding response by sending the identification and the operation type of the UI element to the first terminal, so that reverse control is realized.
In another possible implementation, in case the second terminal comprises the first application; the second terminal periodically acquires the refreshed service data, which may include: and the second terminal acquires refreshed service data from the first application of the second terminal at regular time according to the refreshing frequency information of the first application.
In another possible implementation manner, before the second terminal acquires the refreshed service data from the first application of the second terminal at regular time according to the refresh frequency information of the first application, the method may further include: after receiving layout information of a small part from a first terminal, when the second terminal determines that the second terminal comprises a first application, the second terminal sends a request message to the first terminal, wherein the request message is used for triggering the first terminal to acquire real-time business data of the first application in the first terminal; the second terminal receives real-time service data of a first application in the first terminal from the first terminal; and the second terminal updates the current state of the first application in the second terminal according to the real-time service data. Under the condition that the first application is installed in the second terminal, the service can be continued to the first application of the second terminal by acquiring real-time service data from the first terminal and updating the state of the first application in the second terminal, so that the first application of the second terminal can continuously provide the service for the user.
In another possible implementation manner, after the second terminal updates the current state of the first application in the second terminal according to the real-time service data, the method may further include: the second terminal sends a notification message to the first terminal, wherein the notification message is used for suspending the related service by the first application of the first terminal.
In another possible implementation manner, after the second terminal displays the widget according to the layout information of the widget, the method may further include: the second terminal receives a fourth operation of the user on the first UI element in the widget displayed by the second terminal; and the second terminal controls the first application of the second terminal to respond to the fourth operation.
In another possible implementation manner, the widget may further include a second UI element of the first application in the second terminal.
In a third aspect, an embodiment of the present application provides a display apparatus of an application widget, which may be applied to a first terminal including a first application, and the apparatus may include: the connection unit is used for establishing connection with a second terminal; a sending unit, configured to send layout information of the widget of the first application to the second terminal, for the second terminal to display the widget without displaying the widget of the first application; wherein the layout information may include: identification of a first UI element comprised by the widget, style and layout position in the widget.
In a possible implementation manner, the sending unit is further configured to send, to the second terminal, service data of a widget of the first application, so that the second terminal displays content in a corresponding first UI element of the widget; the service data comprises one or more of picture information, text information and state information corresponding to the first UI element, and the state information is used for indicating the current state of the first UI element.
In another possible implementation manner, the displaying, by the second terminal, the widget of the first application may include: the second terminal does not include the first application; or, the second terminal includes the first application but does not add a widget of the first application to a desktop of the second terminal.
In another possible implementation manner, the layout information and the service data of the widget may be further used for the second terminal to update the content of the displayed widget when the widget of the first application is displayed.
In another possible implementation, the widget is included in a desktop of the first terminal.
In another possible implementation manner, the apparatus may further include: and the determining unit is used for determining that the second terminal and the second terminal log in the same account.
In another possible implementation manner, the apparatus may further include: the input unit is used for receiving a first operation of a user, and the first operation is used for indicating the distribution widget.
In another possible implementation manner, the apparatus may further include: a display unit for displaying an icon of a first application; the input unit is also used for receiving a second operation of the user on the icon of the first application; the display unit is further used for responding to the second operation and displaying menu options, the menu options comprise a first control, and the first control is used for triggering the first terminal distribution widget; the first operation is an operation of a first control.
In another possible implementation, the widget is a user-selected or recommended by the first terminal among a plurality of widgets of the first application.
In another possible implementation, a display unit for displaying a widget; the input unit is further used for receiving a third operation of the user on the widget; the display unit is further used for responding to a third operation and displaying menu options, the operation menu comprises a second control, and the second control is used for triggering the first terminal distribution widget; the first operation is an operation on a second control.
In another possible implementation manner, the display unit is used for displaying a desktop setting interface, and the desktop setting interface comprises a small component; wherein the first operation is a drag operation on the widget; and the sending unit is specifically used for sending the layout information of the widget to the second terminal when the widget is released from dragging to the preset area after the widget is determined to be dragged to the preset area.
In another possible implementation manner, the sending unit is specifically configured to send the layout information of the widget and the service data to the second terminal after configuring the layout information of the widget and the service data to the json file.
In another possible implementation manner, the apparatus may further include: the acquiring unit is used for acquiring refreshed service data from the first application of the first terminal at regular time according to the refreshing frequency information of the first application; and the sending unit is further used for sending the refreshed service data to the second terminal, so that the second terminal can update the content in the displayed small component.
In another possible implementation manner, the apparatus may further include: the receiving unit is used for receiving the identification and the operation type of the first UI element from the second terminal, wherein the identification and the operation type of the first UI element are sent after the second terminal receives a fourth operation of the user, and the fourth operation is the operation on the first UI element in the widget displayed by the second terminal; and the processing unit is used for controlling the first application of the first terminal to respond to the fourth operation according to the identification and the operation type of the first UI element.
In another possible implementation manner, in a case that the second terminal includes the first application, the receiving unit is configured to receive, by the first terminal, a request message from the second terminal; the acquiring unit is used for responding to the request message and acquiring real-time service data of a first application in the first terminal; and the sending unit is also used for sending the real-time service data of the first application in the first terminal to the second terminal.
In another possible implementation manner, the receiving unit is further configured to receive a notification message from the second terminal; and the processing unit is also used for responding to the notification message and controlling the first application of the first terminal to suspend the related service.
In a fourth aspect, an embodiment of the present application provides a display apparatus of an application widget, which may be applied to a second terminal, and the apparatus may include: the device comprises a connection unit, a first application unit and a second application unit, wherein the connection unit is used for establishing connection with a first terminal, and the first terminal comprises the first application; a receiving unit for receiving layout information of a widget of a first application from a first terminal in a case where the second terminal does not display the widget of the first application; the layout information comprises an identifier, a style and a layout position in the widget of a first UI element included in the widget; and a display unit for displaying the widget according to the layout information of the widget, the widget including the first UI element.
In a possible implementation manner, the receiving unit is further configured to receive, in a case that the second terminal does not display the widget of the first application, the service data of the widget of the first application from the first terminal; the service data comprises one or more of picture information, text information and state information corresponding to the first UI element, and the state information is used for indicating the current state of the first UI element. And the display unit is also used for displaying content in the corresponding first UI element of the widget according to the service data.
In another possible implementation, the displaying, by the second terminal, the widget of the first application may include: the second terminal does not include the first application; or, the second terminal includes the first application but does not add a widget of the first application to a desktop of the second terminal.
In another possible implementation manner, the apparatus may further include: the acquisition unit is used for acquiring refreshed service data at fixed time; and the display unit is also used for updating the content in the displayed small parts according to the refreshed service data.
In another possible implementation, in case the second terminal does not comprise the first application; an acquisition unit, specifically configured to: and receiving refreshed service data sent by the first terminal at regular time.
In another possible implementation manner, the apparatus may further include: an input unit, configured to receive a fourth operation of the first UI element in the widget displayed by the second terminal by the user; and the sending unit is used for sending the identifier and the operation type of the first UI element to the first terminal, and the first terminal is used for responding to the fourth operation.
In another possible implementation, in case the second terminal comprises the first application; and the obtaining unit is specifically configured to obtain the refreshed service data from the first application of the second terminal at regular time according to the refresh frequency information of the first application.
In another possible implementation manner, the sending unit is further configured to send a request message to the first terminal after receiving the layout information of the widget from the first terminal and when it is determined that the second terminal includes the first application, where the request message is used to trigger the first terminal to acquire real-time service data of the first application in the first terminal; the receiving unit is also used for receiving real-time service data of a first application in a first terminal from the first terminal; the apparatus may further include: and the updating unit is used for updating the current state of the first application in the second terminal according to the real-time service data.
In another possible implementation manner, the sending unit is further configured to send a notification message to the first terminal, where the notification message is used for suspending the relevant service by the first application of the first terminal.
In another possible implementation manner, the input unit is further configured to receive a fourth operation of the user on the first UI element in the widget displayed by the second terminal; the apparatus may further include: and the processing unit is used for controlling the first application of the second terminal to respond to the fourth operation.
In another possible implementation manner, the widget may further include a second UI element of the first application in the second terminal.
In a fifth aspect of the present invention, the present application provides a display apparatus applying a widget, the apparatus may include: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to execute the instructions to implement the method as described in the first aspect or any of its possible implementations, or to implement the method as described in the second aspect or any of its possible implementations.
In a sixth aspect, the present application provides a computer readable storage medium having stored thereon computer program instructions which, when executed by a processor, implement a method as set forth in the first aspect or any of the possible implementations of the first aspect, or as set forth in the second aspect or any of the possible implementations of the second aspect.
In a seventh aspect, the present application provides a terminal comprising a display, one or more processors, and a memory; a display screen, a processor and a memory coupled; the memory is used for storing computer program code comprising computer instructions which, when executed by the terminal, cause the terminal to perform the method as described in the first aspect or any of its possible implementations, or cause the terminal to perform the method as described in the second aspect or any of its possible implementations.
In an eighth aspect, the present application provides a computer program product comprising computer readable code, or a non-transitory computer readable storage medium carrying computer readable code, which when run in a terminal, a processor in the terminal performs the method of the first aspect or any one of the possible implementations of the first aspect, or performs the method of the second aspect or any one of the possible implementations of the second aspect.
It is to be understood that, for the advantageous effects that can be achieved by the display apparatus of the application widget according to the third aspect and any possible implementation manner thereof, the display apparatus of the application widget according to the fourth aspect and any possible implementation manner thereof, the display apparatus of the application widget according to the fifth aspect, the computer-readable storage medium according to the sixth aspect, the terminal according to the seventh aspect, and the computer program product according to the eighth aspect, reference may be made to the advantageous effects in the first aspect or the second aspect and any possible implementation manner thereof, and details of the advantageous effects are not repeated herein.
Drawings
FIG. 1 is a diagram illustrating a software architecture provided in the related art;
fig. 2 is a schematic diagram of a display interface provided in an embodiment of the present application;
FIG. 3 is a simplified diagram of a system architecture according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of a mobile phone according to an embodiment of the present application;
FIG. 5 is a simplified diagram of a software architecture provided by an embodiment of the present application;
fig. 6 is a flowchart illustrating a display method of an application widget according to an embodiment of the present application;
FIG. 7 is a schematic view of another display interface provided in an embodiment of the present application;
FIG. 8 is a schematic view of yet another display interface provided by an embodiment of the present application;
FIG. 9 is a schematic view of another display interface provided in an embodiment of the present application;
FIG. 10 is a schematic view of yet another display interface provided by an embodiment of the present application;
FIG. 11 is a schematic view of another display interface provided in an embodiment of the present application;
FIG. 12 is a schematic view of yet another display interface provided by an embodiment of the present application;
FIG. 13 is a schematic view of yet another display interface provided by an embodiment of the present application;
FIG. 14 is a schematic view of yet another display interface provided by an embodiment of the present application;
FIG. 15 is a schematic view of yet another display interface provided by an embodiment of the present application;
FIG. 16 is a schematic diagram of an implementation provided by an embodiment of the present application;
FIG. 17 is a schematic view of yet another display interface provided by an embodiment of the present application;
FIG. 18 is a schematic view of yet another display interface provided by an embodiment of the present application;
FIG. 19 is a schematic view of yet another display interface provided by an embodiment of the present application;
FIG. 20 is a schematic diagram illustrating a display device using small components according to an embodiment of the present application;
FIG. 21 is another embodiment of the present application composition schematic of a display device employing widgets;
fig. 22 is a schematic composition diagram of a chip system according to an embodiment of the present disclosure.
Detailed Description
In the following, the terms "first", "second" are used for descriptive purposes only and are not to be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of the embodiments of the present application, "a plurality" means two or more unless otherwise specified.
Widgets, also referred to as gadgets, widgets, and the like. For ease of understanding, the present embodiment is described by taking a small component as an example. Wherein a widget is a miniature application view that can be embedded into other applications, such as a desktop, and receives periodic updates. For example, widgets of various applications may be added (or otherwise displayed) on the desktop of the terminal. Since the actual running logic of the widget depends on the application processing, if the widget is to be implemented, for example, the widget is displayed on the desktop, a corresponding application needs to be installed in the terminal. For example, if a clock widget is to be displayed on the desktop of the terminal, a clock application must be installed in the terminal; if a music playing widget is to be displayed on the desktop of the terminal, a music application must be installed in the terminal. After the widget is displayed on the desktop, the widget can periodically acquire business data of the application so as to update the display content in the widget.
For example, referring to fig. 1 and 2, a music application is installed in the mobile phone. The music application can register the layout information (for example, the layout information can include User Interface (UI) elements included in the widget and the layout position thereof) and the refresh frequency information of the widget contained in the music application into the system scheduling service of the mobile phone. The user may select the music play widget of the music application in the setup program of the desktop to add it to the desktop. For example, the music play widget added to the desktop is shown as 201 in FIG. 2. After the music playing widget 201 displays on the desktop, the system scheduling service may periodically obtain real-time service data, such as a currently played music identifier, a music playing progress, lyrics, etc., from the music application according to the refresh frequency information, and send the real-time service data to the desktop. After the desktop receives the real-time service data, the content in the music playing widget 201 may be updated according to the service data. In this way, the user can view the information provided by the music application through the music playing widget 201 displayed on the desktop without opening the music application.
However, since the widget is run depending on the application, that is, if the user wants to add a widget of an application on the desktop of a terminal, the application must be installed in the terminal before the widget of the application can be selected to be added to the desktop. If the user has a plurality of terminals, corresponding applications need to be installed on each terminal, and corresponding widgets can be viewed on the plurality of terminals.
The embodiment of the application provides a method for displaying application widgets, wherein a terminal (for example, called a first terminal) with a certain application installed can send relevant information of the application widget to other terminals (for example, called second terminals) without the application installed, so that the second terminal can also display (for example, display on a desktop) the application widget for a user to view on the premise that the second terminal does not install a corresponding application. The problem of many ends show the widget, need all install corresponding application is solved. The use cost of the user is saved, and the user experience is improved.
Embodiments of the present application will be described in detail below with reference to the accompanying drawings.
Please refer to fig. 3, which is a simplified diagram of a system architecture to which the above method can be applied according to an embodiment of the present disclosure. As shown in fig. 3, the system architecture may include at least: a first terminal 301 and a second terminal 302.
In a specific implementation, the first terminal 301 and the second terminal 302 may be a mobile phone, a tablet computer, a handheld computer, a PC, a cellular phone, a Personal Digital Assistant (PDA), a wearable device (e.g., a smart watch), a smart home device (e.g., a television), a vehicle-mounted computer, a game machine, and an Augmented Reality (AR) Virtual Reality (VR) device, and the specific device configurations of the first terminal 301 and the second terminal 302 are not particularly limited in this embodiment. In this embodiment, the device configurations of the first terminal 301 and the second terminal 302 may be the same. For example, the first terminal 301 and the second terminal 302 are both mobile phones. The device forms of the first terminal 301 and the second terminal 302 may be different. As shown in fig. 3, the first terminal 301 is a mobile phone, and the second terminal 302 is a tablet computer.
One or more applications may be included in the first terminal 301. The application may be a system application or a third party application.
In this embodiment, when the first terminal 301 is connected to the second terminal 302, the first terminal 301 may send the related information of the widget of the application to the second terminal 302, so that the second terminal 302 may also display the widget of the application on the display screen of the second terminal 302 on the premise that the application is not installed.
In this embodiment, a terminal is taken as a mobile phone as an example. Please refer to fig. 4, which is a schematic structural diagram of a mobile phone according to an embodiment of the present disclosure. The method in the following embodiments may be implemented in a mobile phone having the above hardware structure.
As shown in fig. 4, the mobile phone may include a processor 110, an external memory interface 120, an internal memory 121, a Universal Serial Bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and the like. Optionally, the mobile phone may further include a mobile communication module 150, a Subscriber Identity Module (SIM) card interface 195, and the like.
The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, and the like.
It is to be understood that the structure illustrated in the present embodiment does not constitute a specific limitation to the mobile phone. In other embodiments, the handset may include more or fewer components than illustrated, or combine certain components, or split certain components, or a different arrangement of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
Processor 110 may include one or more processing units, such as: the processor 110 may include an Application Processor (AP), a modem processor, a Graphics Processing Unit (GPU), an Image Signal Processor (ISP), a controller, a memory, a video codec, a Digital Signal Processor (DSP), a baseband processor, and/or a neural-Network Processing Unit (NPU), etc. The different processing units may be separate devices or may be integrated into one or more processors.
The controller can be the neural center and the command center of the mobile phone. The controller can generate an operation control signal according to the instruction operation code and the timing signal to complete the control of instruction fetching and instruction execution.
A memory may also be provided in the processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may hold instructions or data that have just been used or recycled by the processor 110. If the processor 110 needs to reuse the instruction or data, it can be called directly from the memory. Avoiding repeated accesses reduces the latency of the processor 110, thereby increasing the efficiency of the system.
In some embodiments, processor 110 may include one or more interfaces. The interface may include an integrated circuit (I2C) interface, an integrated circuit built-in audio (I2S) interface, a Pulse Code Modulation (PCM) interface, a universal asynchronous receiver/transmitter (UART) interface, a mobile industry processor interface (mobile industry processor interface, MIPI), a general-purpose-output (GPIO) interface, a SIM interface, and/or a USB interface, etc.
The charging management module 140 is configured to receive a charging input from a charger. The charging management module 140 may also supply power to the mobile phone through the power management module 141 while charging the battery 142. The power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110. The power management module 141 may also receive input from the battery 142 to power the phone.
The wireless communication function of the mobile phone can be realized by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor, the baseband processor, and the like.
The antennas 1 and 2 are used for transmitting and receiving electromagnetic wave signals. Each antenna in the handset may be used to cover a single or multiple communication bands. Different antennas can also be multiplexed to improve the utilization of the antennas. For example: the antenna 1 may be multiplexed as a diversity antenna of a wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
When the handset includes the mobile communication module 150, the mobile communication module 150 may provide a solution including 2G/3G/4G/5G wireless communication applied on the handset. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a Low Noise Amplifier (LNA), and the like. The mobile communication module 150 may receive the electromagnetic wave from the antenna 1, filter, amplify, etc. the received electromagnetic wave, and transmit the electromagnetic wave to the modem processor for demodulation. The mobile communication module 150 may also amplify the signal modulated by the modem processor, and convert the signal into electromagnetic wave through the antenna 1 to radiate the electromagnetic wave. In some embodiments, at least some of the functional modules of the mobile communication module 150 may be disposed in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 may be provided in the same device as at least some of the modules of the processor 110.
The modem processor may include a modulator and a demodulator. The modulator is used for modulating a low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is used for demodulating the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then passes the demodulated low frequency baseband signal to a baseband processor for processing. The low frequency baseband signal is processed by the baseband processor and then transferred to the application processor. The application processor outputs a sound signal through an audio device (not limited to the speaker 170A, the receiver 170B, etc.) or displays an image or video through the display screen 194. In some embodiments, the modem processor may be a stand-alone device. In other embodiments, the modem processor may be provided in the same device as the mobile communication module 150 or other functional modules, independent of the processor 110.
The wireless communication module 160 may provide a solution for wireless communication including Wireless Local Area Networks (WLANs) (e.g., wi-Fi networks), bluetooth (BT), global Navigation Satellite System (GNSS), frequency Modulation (FM), NFC, infrared (IR) and the like, which is applied to a mobile phone. The wireless communication module 160 may be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, performs frequency modulation and filtering on electromagnetic wave signals, and transmits the processed signals to the processor 110. The wireless communication module 160 may also receive a signal to be transmitted from the processor 110, perform frequency modulation and amplification on the signal, and convert the signal into electromagnetic waves through the antenna 2 to radiate the electromagnetic waves.
In some embodiments, the handset antenna 1 is coupled to the mobile communication module 150 and the handset antenna 2 is coupled to the wireless communication module 160 so that the handset can communicate with the network and other devices via wireless communication techniques. The wireless communication technology may include global system for mobile communications (GSM), general Packet Radio Service (GPRS), code division multiple access (code division multiple access, CDMA), wideband Code Division Multiple Access (WCDMA), time-division code division multiple access (time-division code division multiple access, TD-SCDMA), long Term Evolution (LTE), BT, GNSS, WLAN, NFC, FM, and/or IR technologies, etc. The GNSS may include a Global Positioning System (GPS), a global navigation satellite system (GLONASS), a beidou navigation satellite system (BDS), a quasi-zenith satellite system (QZSS), and/or a Satellite Based Augmentation System (SBAS).
The mobile phone realizes the display function through the GPU, the display screen 194, the application processor and the like. The GPU is a microprocessor for image processing, connected to the display screen 194 and the application processor. The processor 110 may include one or more GPUs that execute program instructions to generate or alter display information.
The display screen 194 is used to display images, video, and the like. The display screen 194 includes a display panel. The display panel may adopt a Liquid Crystal Display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (active-matrix organic light-emitting diode, AMOLED), a flexible light-emitting diode (FLED), a miniature, a Micro-oeld, a quantum dot light-emitting diode (QLED), and the like. In some embodiments, the handset may include 1 or N display screens 194, N being a positive integer greater than 1.
The mobile phone can realize shooting function through the ISP, the camera 193, the video codec, the GPU, the display screen 194, the application processor and the like. In some embodiments, the handset may include 1 or N cameras 193, N being a positive integer greater than 1.
The external memory interface 120 may be used to connect an external memory card, such as a Micro SD card, to extend the storage capability of the mobile phone. The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function. For example, files such as music, video, etc. are saved in an external memory card.
The internal memory 121 may be used to store computer-executable program code, which includes instructions. The processor 110 executes various functional applications of the cellular phone and data processing by executing instructions stored in the internal memory 121. The internal memory 121 may include a program storage area and a data storage area. The storage program area may store an operating system, an application program (such as a sound playing function, an image playing function, etc.) required by at least one function, and the like. The data storage area can store data (such as audio data, phone book and the like) created in the use process of the mobile phone. In addition, the internal memory 121 may include a high speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, a Universal Flash Storage (UFS), and the like.
The mobile phone can implement an audio function through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the earphone interface 170D, and the application processor. Such as music playing, recording, etc.
The pressure sensor 180A is used for sensing a pressure signal, and can convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 180A may be disposed on the display screen 194. The pressure sensor 180A can be of a wide variety, such as a resistive pressure sensor, an inductive pressure sensor, a capacitive pressure sensor, and the like. When a touch operation is applied to the display screen 194, the mobile phone detects the intensity of the touch operation according to the pressure sensor 180A. The cellular phone may also calculate the touched position from the detection signal of the pressure sensor 180A.
The gyro sensor 180B may be used to determine the motion attitude of the handset. The air pressure sensor 180C is used to measure air pressure. Magnetic sensor 180D including a hall sensor. The mobile phone can detect the opening and closing of the flip leather sheath by using the magnetic sensor 180D. The acceleration sensor 180E can detect the magnitude of acceleration of the mobile phone in various directions (generally three axes). A distance sensor 180F for measuring a distance. The mobile phone can detect that the mobile phone is held by a user and close to the ear for conversation by using the proximity optical sensor 180G so as to automatically extinguish the screen and achieve the purpose of saving electricity. The proximity light sensor 180G may also be used in a holster mode, a pocket mode automatically unlocks and locks the screen. The ambient light sensor 180L is used to sense ambient light brightness. The fingerprint sensor 180H is used to collect a fingerprint. The mobile phone can realize fingerprint unlocking, application lock access, fingerprint photographing, incoming call answering by the fingerprint and the like by utilizing the acquired fingerprint characteristics. The temperature sensor 180J is used to detect temperature.
The touch sensor 180K is also referred to as a "touch panel". The touch sensor 180K may be disposed on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, which is also called a "touch screen". The touch sensor 180K is used to detect a touch operation applied thereto or nearby. The touch sensor can communicate the detected touch operation to the application processor to determine the touch event type. Visual output associated with the touch operation may be provided through the display screen 194. In other embodiments, the touch sensor 180K may be disposed on the surface of the mobile phone at a different position than the display screen 194.
The bone conduction sensor 180M may acquire a vibration signal. The keys 190 include a power-on key, a volume key, and the like. The keys 190 may be mechanical keys. Or may be touch keys. The motor 191 may generate a vibration cue. The motor 191 may be used for incoming call vibration cues, as well as for touch vibration feedback. Indicator 192 may be an indicator light that may be used to indicate a state of charge, a change in charge, or a message, missed call, notification, etc.
When the handset includes the SIM card interface 195, the SIM card interface 195 is used to connect a SIM card. The SIM card can be attached to and detached from the mobile phone by being inserted into the SIM card interface 195 or being pulled out of the SIM card interface 195. The mobile phone can support 1 or N SIM card interfaces, and N is a positive integer greater than 1. The mobile phone realizes functions of communication, data communication and the like through interaction of the SIM card and a network. In some embodiments, the handset employs eSIM, namely: an embedded SIM card. The eSIM card can be embedded in the mobile phone and cannot be separated from the mobile phone.
With reference to fig. 3, the embodiment of the present application illustrates a software architecture of a first terminal 301 and a second terminal 302. Please refer to fig. 5, which is a schematic diagram illustrating a software architecture according to an embodiment of the present application.
As an example, the software architecture of the first terminal 301 and the second terminal 302 may each include: application layer and framework layer (FWK).
As shown in fig. 5, the first terminal 301 may include various applications installed in the first terminal 301. Such as settings, calculators, cameras, short messages, music, weather, gallery, browser, memo, news, video player, mail, etc. The applications may be system applications of the first terminal 301 or third-party applications, and the embodiment of the present application is not limited in detail herein. The first terminal 301 may further include: system scheduling service, widget service and transport module. The modules comprised by the first terminal 301 may be comprised in any layer of the software architecture of the first terminal 301. Such as an application layer, included in the first terminal 301. The system scheduling service, the widget service and the transmission module are all included in the framework layer of the first terminal 301, and the embodiment is not limited thereto.
The second terminal 302 may include: widget services and transport modules. The modules included in the second terminal 302 may be included in any layer of the software architecture of the second terminal 302. For example, the widget service and transmission module of the second terminal 302 is included in the framework layer of the second terminal 302, and the embodiment is not limited in this respect.
In the present embodiment, as shown in connection with fig. 5, the application of the first terminal 301 may register the layout information and refresh frequency information of its widget in the system scheduling service of the first terminal 301. The layout information may include an identification of UI elements included in the widget, a style and a layout position thereof. In one aspect, a user may select a widget of an application in a setup program of a desktop to add it to the desktop. The system scheduling service of the first terminal 301 may further obtain the service data that is regularly refreshed from the application according to the refresh frequency information, and send the service data to the desktop. The desktop can update the contents of the widget according to the received business data. On the other hand, the widget service of the first terminal 301 may acquire the layout information of the widget of the application and the service data of the timing refresh from the desktop or system scheduling service of the first terminal 301. The widget service of the first terminal 301 may transmit the acquired layout information of the widget of the application and the periodically refreshed service data to the second terminal 302 through the transmission module of the first terminal 301.
A transmission module of the second terminal 302, such as the second terminal 302, can receive layout information of the gadget and the service data that is periodically refreshed. The transmission module of the second terminal 302 can hand the received data to the widget service of the second terminal 302, so that the widget service of the second terminal 302 can display the widget of the application on the second terminal 302, such as on the desktop of the second terminal 302, in case the application is not installed in the second terminal 302.
The widget service may also be referred to as a widget distributed service, and is used to implement a function of distributing a widget from one terminal to another terminal, which is not specifically limited herein.
With reference to fig. 3 and fig. 5, taking the first terminal 301 as a mobile phone and the second terminal 302 as a tablet computer as an example, a detailed description is provided below with reference to the drawings for a display method of an application widget according to an embodiment of the present application.
Fig. 6 is a flowchart illustrating a display method of an application widget according to an embodiment of the present application. As shown in fig. 6, the method may include the following S601-S603.
S601, the mobile phone is connected with the tablet personal computer.
In some embodiments, the mobile phone and the tablet computer may establish a connection in a wired manner. For example, the mobile phone and the tablet computer may establish a wired connection through a data line.
In other embodiments, the mobile phone and the tablet computer may be wirelessly connected. The terminals are connected with each other in a wireless mode, one of the terminals is connected with the connection information of the opposite terminal, and the other terminal has transmission capacity. The connection information may be a device identifier of the terminal, such as an Internet Protocol (IP) address, a port number, or an account number logged in by the terminal. The account number for the terminal to log in may be an account number provided by an operator for the user, such as a huawei account number. The account number logged in by the terminal can also be an application account number, such as
Figure BDA0003002527040000131
The account number,
Figure BDA0003002527040000132
Figure BDA0003002527040000133
An account number, etc. The terminal has transmission capability which can be near field communication capability or long distance communication capability. That is, the wireless communication protocol used for establishing the connection between the terminals, such as the mobile phone and the tablet computer, may be, for example, a wireless fidelity (Wi-Fi) protocol or a Bluetooth (Bluetooth) protocol, a ZigBee protocol, or a short-range wireless communicationNear Field Communication (NFC) protocol, which may also be a cellular network protocol, and is not limited herein.
Take the example that the mobile phone and the tablet computer establish connection in a wireless manner. For example, a user may touch an NFC tag of a tablet computer with a mobile phone, and the mobile phone reads connection information stored in the NFC tag, where the connection information includes an IP address of the tablet computer. And then, the mobile phone can establish connection with the tablet computer by adopting an NFC protocol according to the IP address of the tablet computer. For another example, both the mobile phone and the tablet computer are turned on with bluetooth function and Wi-Fi function. The tablet may broadcast a bluetooth signal to discover surrounding terminals, e.g., the tablet may display a discovered device list, which may include an identification of the cell phone discovered by the tablet. In addition, connection information, such as an IP address, may also be exchanged with the discovered device during the device discovery process performed by the tablet computer. And then, after the tablet computer receives the operation that the user selects the identifier of the mobile phone in the displayed equipment list, the tablet computer can establish connection with the mobile phone by adopting a Wi-Fi protocol according to the IP address of the mobile phone. For another example, both the mobile phone and the tablet computer access the cellular network, and the mobile phone and the tablet computer log in the same Huawei account. The mobile phone and the tablet personal computer can establish connection based on the cellular network according to the Huawei account.
S602, the mobile phone sends layout information and business data of the small parts of the application 1 to the tablet computer.
The mobile phone may include one or more applications, among others. The application may be a system application or a third party application. Illustratively, the handset includes an application 1, application 1 having a corresponding widget. After displaying the widget on the display screen of the terminal (such as the above-mentioned mobile phone and/or tablet computer), the user can view the information provided by the application 1 without opening the application 1. The application 1 may be the first application in the embodiment of the present application.
In specific implementation, the terminal may display the widget of the application 1 on the display screen according to the layout information and the service data of the widget. The layout information may include: and the identification, style and layout position of each UI element in the widget. The service data may include: and one or more of picture information, text information and state information corresponding to the UI elements included in the widget. The UI element included in the widget may be the first UI element in the embodiment of the present application. The UI elements included in the widget may be display elements such as pictures, videos, texts, icons, banner and the like, or manipulation elements such as buttons, progress sliders, toolbars and the like. The state information of the UI element may be used to indicate the current state of the UI element. If the UI element is a progress slider (or progress bar), the status information may be used to indicate the progress of the progress slider. If the UI element is a button, the state information may be used to indicate the click state of the button. In another example, if the UI element is a toggle button, the state information may be used to indicate the on-off state of the toggle button.
In this embodiment, the mobile phone may share the widget of the application 1 included in the mobile phone with other terminals, for example, the layout information and the service data of the widget of the application 1 are sent to other terminals, such as the above tablet computer, so that the widget of the application 1 may also be displayed on the display screen of the tablet computer without installing the application 1. It should be noted that, the layout information and the service data may be simultaneously sent to other terminals (such as the tablet computer); the mobile phone may also send the layout information to other terminals first, and then send the service data to other terminals (such as the above tablet computer), which is not limited in this embodiment.
In some embodiments, the widget of application 1 is displayed on or otherwise added to the desktop of the handset. After the mobile phone is connected with the tablet computer, the small parts of the application 1 on the desktop of the mobile phone can be automatically shared with the tablet computer.
Illustratively, in conjunction with fig. 2, the application 1 is a music application, the widget of the music application is referred to as a music playing widget, and the music playing widget includes an album, lyrics, a progress bar, a play mode button, a previous button, a play/pause button, and a next button. As shown in fig. 2, a music playing widget 201 of a music application is displayed on the desktop of the handset. The music playing widget 201 may be automatically added to the desktop of the mobile phone after the music application is installed, or may be manually added to the desktop of the mobile phone by the user in a setting program of the desktop of the mobile phone after the music application is installed in the mobile phone.
As described in the foregoing embodiment, the music application may register the layout information and refresh frequency information of the music play widget 201 in the system scheduling service of the handset. For example, the layout information includes: the music playing widget includes album, lyrics, progress bar, play mode button, previous button, play/pause button, and next button, the identification, style, and layout position of UI elements in the widget. After the music application is installed in the mobile phone, or after the user selects to add the music playing widget 201 to the desktop of the mobile phone, the mobile phone may obtain current service data of the music playing widget 201. If the user is playing music using the music application, the service data may include picture information corresponding to an album of the played music, text information corresponding to lyrics, and status information corresponding to a progress bar, a play mode button, and a play/pause button, respectively. The mobile phone can display the music playing widget 201 on the desktop of the mobile phone according to the obtained service data and the layout information registered in the system scheduling service of the mobile phone. In addition, after the music playing widget 201 is displayed on the desktop of the mobile phone, the system scheduling service of the mobile phone can also periodically acquire real-time service data from the music application according to the refresh frequency information and send the real-time service data to the desktop. After the desktop receives the real-time service data, the content in the music playing widget 201 may be updated according to the service data, such as updating an album, lyrics, progress of a progress bar, and the like.
After the mobile phone is connected with the tablet computer, the mobile phone can automatically share the music playing widget 201 of the music application added (or included) on the desktop with the tablet computer. For example, take the case that a mobile phone and a tablet computer establish a connection by accessing the same local area network. After the mobile phone accesses the local area network, the mobile phone can judge whether other terminals exist in the current local area network. After the mobile phone determines that other terminals exist in the local area network, such as the tablet computer, the mobile phone can automatically share the music playing widget 201 displayed on the desktop of the mobile phone with the tablet computer. Or, after determining that there are other terminals in the local area network, such as the tablet computer, the mobile phone continues to determine whether the tablet computer and the mobile phone log in to the same account (e.g., an account or an application account provided by an operator for the user). If the tablet computer and the mobile phone log in to the same account, the mobile phone can automatically share the music playing widget 201 displayed on the desktop of the mobile phone with the tablet computer. If the tablet personal computer and the mobile phone do not log in the same account, the mobile phone does not share the small parts displayed on the desktop of the mobile phone.
In other embodiments, in a case that the mobile phone is connected with the tablet computer, the mobile phone may share the widget of the application 1 to the tablet computer after receiving the sharing operation of the user. The sharing operation may be the first operation in the embodiment of the present application, this first operation may be used to indicate that the widget of application 1 is distributed (or shared).
As a possible implementation, the sharing operation may be a trigger operation, such as a click operation, on a control for sharing (or distributing, sending, etc.) the widget of the application 1.
Illustratively, controls for sharing widgets of app 1 may be included in menu options of app 1.
With reference to fig. 7, continuing with the example where application 1 is a music application, a widget of the music application is referred to as a music play widget. As shown in fig. 7 (a), the cell phone displays a desktop 701, and the desktop 701 includes an icon 702 of a music application. The mobile phone receives an operation of the user on the icon 702 of the music application, such as a long-press operation (the operation may be a second operation in the embodiment of the present application). In response to the long press operation, the mobile phone may display a menu option 703 of the music application as shown in (b) of fig. 7. The menu options 703 may include one or more shortcut function option buttons. Such as menu option 703 including a continue play button, a play local music button. The menu options 703 also include a create desktop widget button and a widget cross-device (also referred to as widget distribution) button 704. The widget cross-device button 704 may be a control for sharing a widget of a music application, and the widget cross-device button 704 may be a first control in this embodiment. The user may perform a triggering operation, such as a clicking operation, on the widget cross-device button 704 to trigger the mobile phone to share the music playing widget of the music application with other terminals. For example, the handset receives a user click operation on the widget cross device button 704. In response to the click operation, the mobile phone may share the music playing widget of the music application with another terminal connected to the mobile phone, such as a tablet computer.
It is understood that there may be one or more widgets of one application. Wherein, when one application has a plurality of widgets, the widgets can have different styles. Different styles may be different widgets that include UI elements that are the same but different in layout, or different widgets that include UI elements that are different. The different style widgets may be the same size or different sizes.
When the application 1 has a widget, after the mobile phone receives a trigger operation on the widget used for sharing the widget of the application 1, the mobile phone can share the widget to other terminals.
When the application 1 has a plurality of widgets, after the mobile phone receives a trigger operation on a widget for sharing the widget of the application 1, the mobile phone can select one of the widgets to share to another terminal.
For example, the mobile phone may select one of the widgets of the application 1 to share with other terminals according to a preset rule. That is, the mobile phone may recommend one of the widgets to be shared with other terminals. The preset rule may be: the widget with the most UI elements is preferentially shared by other terminals, or the widget with the largest size is preferentially shared by other terminals, or the widget with the most UI elements and the largest size is preferentially shared by other terminals. For example, continuing with the example shown in fig. 7, taking an example that the music application has 3 music playing widgets, the 3 music playing widgets are different in size, and are respectively 4. The specific implementation of the mobile phone sharing the music playing widget of the music application to the tablet pc may be: after the cell phone receives the click operation on the widget cross-device button 704, the sizes of 3 music playing widgets of the music application can be acquired. Then, the mobile phone shares the music playing widget with the largest size among the 3 music playing widgets of the music application, namely the music playing widget with the size of 4.
For another example, the mobile phone may share the widget selected by the user among the plurality of widgets to the other terminal. Continuing with the example shown in FIG. 7, take the example of a music application having 3 music play widgets. The specific implementation of the mobile phone sharing the music playing widget of the music application to the tablet pc may be: after the handset receives a click operation on the widget cross-device button 704, as shown in (c) of fig. 7, a widget list 705 of the music application may be displayed. Among them, the widget list 705 includes: the 3 music play widgets of the music application are music play widget 705-1, music play widget 705-2 and music play widget 705-3, respectively. Or thumbnail images of the 3 music play widgets of the music application are included in the widget list 705. The user can select a widget (or a thumbnail of the widget) which the user wants to share, so that the mobile phone shares the music playing widget selected by the user to the tablet computer. The selection operation can be a click operation on a widget, or the selection operation can be a click operation on a widget (for selecting the widget) and a click operation on a confirm share button. With the selection operation being on a widget the click operation of (2) is exemplified. With continued reference to fig. 7 (c), if the user wants to share the music playing widget 705-1 with another terminal, the user may click the music playing widget 705-1. After receiving the operation, the mobile phone may share the music playing widget 705-1 with the tablet pc.
The widgets included in the widget list may be arranged and displayed in a certain order. For example, the recommendation priorities may be displayed in a high-low order, and the higher the recommendation priority, the higher the ranking. As an example, the recommendation priority of the widget may be determined according to the number of UI elements included in the widget, such as the higher the recommendation priority of the widget including the larger number of UI elements. In this way, in the widget list, the widget including the larger number of UI elements is preferentially recommended to the user to share with other terminals. As yet another example, the recommendation priority of a widget may be determined according to the size of the widget, such as a higher recommendation priority for widgets of larger size. Thus, in the widget list, widgets with larger sizes are preferentially recommended to the user for sharing to other terminals, such as a widget with a larger size (e.g. 4. Of course, multiple factors, such as the number of included UI elements and the size of the widget, may also be considered to determine the recommendation priority, and the embodiment is not limited in this respect.
As yet another example, a control for sharing a widget of application 1 may be included in a menu option of the widget.
Continuing with fig. 2, taking application 1 as a music application, a widget of the music application is called a music playing widget as an example. As shown in fig. 2, a music playing widget 201 of a music application is displayed on the desktop of the handset. The mobile phone receives an operation of the music playing widget 201 by the user, such as a long press operation (this operation may be a third operation in this embodiment of the present application). As shown in fig. 8, in response to the long press operation, the handset may display a menu option 801 of the music play widget 201. Menu options 801 may include one or more shortcut function option buttons. For example, menu option 801 includes a remove button for removing the music playing widget from the desktop of the cell phone and not displayed on the cell phone desktop. The menu option 801 further includes a share button 802, and the share button 802 may be a second control in this embodiment of the application. Where the share button 802 may be a control for sharing a widget of a music application. The user may perform a trigger operation, such as a click operation, on the sharing button to trigger the mobile phone to share the music playing widget 201 of the music application with other terminals. For example, the cell phone receives a user click operation on the share button 802. In response to the click operation, the mobile phone may share the music playing widget 201 with other terminals connected to the mobile phone, such as a tablet computer.
As another possible implementation, the sharing operation may be a drag operation on a widget of the application 1.
Illustratively, in conjunction with fig. 9, continuing with application 1 as a music application, a widget of the music application is referred to as a music play widget as an example. As shown in fig. 9 (a), the cellular phone displays a desktop 901. The mobile phone receives an operation used by a user to start the mobile phone desktop setting program, for example, the operation may be a long-press operation or a double-finger pinch operation in a blank of the mobile phone desktop 901. In response to this operation, as shown in (b) in fig. 9, the cell phone displays a desktop setting interface 902. Desktop setting interface 902 includes controls for performing desktop setting, such as thumbnails of sub-screens included in desktop 902, buttons for setting desktop wallpapers, widget 903, and the like. The mobile phone receives a trigger operation, such as a click operation, of the widget 903 by the user. As shown in (c) in fig. 9, in response to this operation, the cell phone displays a widget applied in the cell phone, such as a music play widget 904 including a music application, in the desktop setting interface 902. Or the mobile phone displays the thumbnail of the widget applied in the mobile phone in the desktop setting interface 902. The user can drag the music playing widget 904 (or a thumbnail thereof) to trigger the mobile phone to share the music playing widget 904 with other terminals, such as the tablet computer.
It is understood that dragging can be divided into intra-device dragging and cross-device dragging (or inter-device dragging). An intra-device drag may refer to a drag whose intent is to drag a dragged object from one location of the device to another location of the device. Cross-device dragging may refer to dragging in which the drag intent is to drag the object being dragged from one location of the device into another device. In this embodiment, after receiving a drag operation of a user on a widget, the mobile phone may determine whether a drag intention of the user is a cross-device drag. And if the dragging intention of the user is determined to be dragging across the devices, sharing the dragged widget to other terminals. If the dragging intention of the user is determined not to be dragging across the devices, the mobile phone can add the dragged widget to the desktop of the mobile phone according to the position when the user releases dragging. As described in conjunction with fig. 9 above, if the position where the user releases the drag is the position of the thumbnail of a certain sub-screen included in the desktop 902, the mobile phone may add the dragged widget to the sub-screen of the desktop 902 after the user releases the drag.
As an example, the cell phone can set a drag-aware region to determine whether the user's drag intent is to drag across devices. The drag sensing area may be an area on the display screen of the mobile phone that is a predetermined distance away from an edge of the display screen. The predetermined distance may be predefined or a setting interface may be provided for a user to set. The number of the dragging sensing areas of the mobile phone can be one or more. And a transparent view (view) control is arranged at the drag sensing area. After the dragged object, such as a widget of an application, is dragged into the drag sensing area, the view control set in the corresponding area can monitor the dragging of the widget. When the view control detects dragging of the widget, the mobile phone can determine that the dragging intention of the user is dragging across devices.
For example, with continued reference to FIG. 9, take the area of the drag sensing area of the mobile phone at a predetermined distance from the edge of the display screen of the mobile phone as an example. The specific implementation that the user drags the music playing widget 904 and triggers the mobile phone to share the music playing widget 904 with other terminals may be: the mobile phone receives a drag operation of the user on the music playing widget 904 in the desktop setting interface 902, such as an operation of pressing the music playing widget 904 for a long time and moving a finger (e.g., a user moves the finger from a drag start position to an upper edge of a display screen of the mobile phone). In response to this drag operation, the handset may display an animation of the music play widget 904 moving on the display of the handset 1 following the movement of the user's finger, giving the user the visual effect of the music play widget 904 being dragged by the user's finger. In the process that the music play widget 904 is dragged, the cell phone may determine whether the user's drag intent is a cross-device drag. If the user drags the music playing widget 904 to an area a predetermined distance away from the upper edge of the display of the mobile phone, i.e., the above-mentioned drag sensing area, the mobile phone may determine that the drag intention of the user is a cross-device drag. The handset may then share the music play widget 904 to other terminals. For example, after receiving a drag release operation by a user, the mobile phone shares the music playing widget 904 with other terminals.
Wherein, for the convenience of the user knows the position of the dragging sensing area, the corresponding indication can also be displayed in the dragging sensing area so as to prompt the user to drag the widget to the position, and then the mobile phone can be triggered to share the widget. For example, continue to take the area of the drag sensing area of the mobile phone at the predetermined distance from the edge of the display screen of the mobile phone as an example. As shown in (c) in fig. 9, after the mobile phone receives a trigger operation of the user on the widget 903, the mobile phone may further display a sharing prompt 905 at a position close to an upper edge of a display screen of the mobile phone in the desktop setting interface 902, so as to prompt the user to drag the widget to a display position of the sharing prompt 905, and then the mobile phone may be triggered to share the widget. As shown in fig. 9 (d), the user may drag the music playing widget 904 to the position of the sharing prompt 905 and then release the drag. In response, the handset may share the music play widget 904 to other terminals. For another example, after receiving a trigger operation of the user on the widget 903, the mobile phone may also not display the sharing prompt 905 on the desktop setting interface 902, but display the sharing prompt 905 when the user drags the music playing widget 904 to a position close to the upper edge of the display screen of the mobile phone, as shown in (d) in fig. 9, so as to prompt the user to release that the dragged music playing widget 904 will be shared with other terminals.
In the above example of fig. 9, the user drags the widget of the application 1 in the desktop setting interface to trigger sharing of the widget to another terminal. In other embodiments, the user may also perform a drag operation on a widget of the application 1 displayed in another interface to trigger the mobile phone to share the widget to another terminal. For example, continuing with the example where application 1 is a music application, a widget of the music application is referred to as a music play widget. The user can drag and drop a music playing widget (shown in fig. 2) displayed on the desktop of the mobile phone, so as to trigger the mobile phone to share the music playing widget with other terminals. Alternatively, the user may perform a drag operation on a music playing widget in a widget list (as shown in (c) in fig. 7) of the music application displayed by the mobile phone, so as to trigger the mobile phone to share the widget with other terminals. The embodiment is not particularly limited herein. The specific implementation is similar to that in the example shown in fig. 9, and is not described in detail here.
In the above example, in the case that the mobile phone is connected to only one terminal, such as the tablet pc, after the mobile phone is connected to the tablet pc or after receiving the sharing operation of the user, the widget of the application 1 may be directly shared with the tablet pc.
Under the condition that the mobile phone is connected with a plurality of terminals (the terminals include the tablet computer), the mobile phone can share the small parts of the application 1 with the tablet computer according to the operation of selecting the tablet computer by a user. As an example, referring to fig. 10, after the mobile phone is connected to the terminal or the mobile phone receives the sharing operation, as shown in (a) of fig. 10, the mobile phone displays a device list 1001. The device list 1001 includes device identifiers of terminals connected to a mobile phone. For example, the device list 1001 includes the device identifier of the terminal 1 connected to the mobile phone, the device identifier 1002 of the tablet computer, the device identifier of the terminal 2, and the device identifier of the terminal 3. The user may perform a selection operation, such as a click operation, on the device identifier 1002 of the tablet computer. The mobile phone receives the click operation. In response to this operation, the cell phone may share the widget of application 1 to the tablet.
In some embodiments, when the device list is displayed on the mobile phone, the terminals connected to the mobile phone may be classified and displayed in the device list according to whether the terminals and the mobile phone log in the same account. As described above with reference to the example shown in fig. 10, the terminal connected to the cellular phone includes: terminal 1, tablet, terminal 2 and terminal 3. The terminal 1 and the tablet computer both log in the same account with the mobile phone, and the terminal 2 and the terminal 3 do not log in the same account with the mobile phone. As shown in fig. 10 (a), the device list 1001 displayed by the cellular phone includes a my device list 1001-1 and an available device list 1001-2. The my device list 1001-1 includes a device identifier of the terminal 1 and a device identifier 1002 of the tablet pc, where the terminal and the mobile phone log in the same account. The available device list 1001-2 includes the device identifier of the terminal 2 and the device identifier of the terminal 3, which are not registered with the same account as the mobile phone. The mobile phone may also display each device identifier in the device list according to other rules, for example, the device identifier of the terminal that is closer to the mobile phone is ranked more forward in the device list, and the like. In addition, the device list may also include the device identifier of the terminal that is not connected to the mobile phone but is within the connectable range. The user may also choose to share the widgets of application 1 to these terminals. After the mobile phone receives the selection operation of the user on the device identifier of the terminal which is not connected with the mobile phone in the device list, the mobile phone can establish connection with the terminal first, and then share the small parts of the application 1 with the terminal.
In some embodiments of the present application, the mobile phone shares the widget of the application 1 to other terminals, for example, the specific implementation process of the tablet computer may be: the mobile phone can acquire layout information of the small parts of the application 1 and real-time service data, and send the layout information and the real-time service data to the tablet computer.
For example, as described in the foregoing embodiment, after the application 1 is installed, the layout information and the refresh frequency information of its widget may be registered in the system scheduling service of the mobile phone. With reference to fig. 5, after the mobile phone is connected to the tablet computer or receives the sharing operation, the widget service of the mobile phone may obtain layout information of the widget from the system scheduling service of the mobile phone, and send a message to the system scheduling service of the mobile phone to trigger the system scheduling service of the mobile phone to obtain real-time service data (or current service data) from the application 1. After the system scheduling service of the mobile phone acquires the real-time service data, the acquired real-time service can be sent to the widget service of the mobile phone. And then, the widget service of the mobile phone can transmit the obtained layout information and the real-time business data to the tablet computer through a transmission module of the mobile phone.
For another example, the widget of the application 1 is displayed on the desktop of the mobile phone. As described in the foregoing embodiment, the mobile phone may display the widget of the application 1 on the desktop of the mobile phone according to the layout information of the widget and the service data. And the system scheduling service of the mobile phone can regularly acquire real-time service data from the application 1 according to the refreshing frequency information and send the real-time service data to the desktop for updating the contents in the small parts by the desktop. With reference to fig. 5, after the mobile phone is connected to the tablet computer or after receiving the sharing operation, the widget service of the mobile phone may directly obtain layout information of the widget from the desktop of the mobile phone. In addition, the desktop of the mobile phone can send a message to the system scheduling service of the mobile phone, so as to trigger the system scheduling service of the mobile phone to acquire real-time refreshed service data from the application 1. After receiving the message, the system scheduling service of the mobile phone can read the service data refreshed in real time from the application 1 and send the service data to the desktop of the mobile phone. After the desktop of the mobile phone receives the service data refreshed in real time, on one hand, the content in the widget of the application 1 displayed on the desktop of the mobile phone can be updated, and on the other hand, the service data refreshed in real time can be sent to the widget service of the mobile phone, so that the widget service of the mobile phone can obtain the real-time service data. And then, the widget service of the mobile phone can transmit the obtained layout information and the real-time service data to the tablet personal computer through a transmission module of the mobile phone.
Before the layout information and the service data of the small parts are sent to the tablet computer, the mobile phone can also perform serialization processing on the layout information and the service data, that is to say, the layout information and the service data sent to the tablet computer by the mobile phone are data obtained after the serialization processing. As an example, the operating system of the mobile phone is taken as
Figure BDA0003002527040000181
The system is taken as an example. The mobile phone can configure the layout information and the service data to json files and then send the json files to the tablet computer, and for example, configure the layout information and the service data to different json files and then send the json files to the tablet computer. In particular, the layout information, e.g. of widgets, is usually
Figure BDA0003002527040000183
Figure BDA0003002527040000182
Extensible markup language (xml) document which can be used by mobile phone
Figure BDA0003002527040000184
And setting each item configuration in the xml file into the json file to realize serialization. For the service data, the mobile phone can integrate the service dataThe included character information and state information are written into a json file by using key value pairs, picture information is compressed into a binary file, and the file name of the binary file is written into the json file to realize serialization. And then, the mobile phone can send the json file and the binary file to the tablet computer.
S603, the tablet computer displays the widgets of the application 1 according to the received layout information of the widgets of the application 1 and the service data. No application 1 is installed in the tablet computer.
After the tablet computer receives the layout information and the business data of the small parts of the application 1 from the mobile phone, the tablet computer can display the small parts of the application 1 on the display screen of the tablet computer according to the received layout information and the business data under the condition that the application 1 is not installed on the tablet computer. For example, referring to fig. 5, after the transmission module of the tablet computer, such as the tablet computer, receives the layout information and the business data of the widget of the application 1 from the mobile phone, the transmission module of the tablet computer may send the layout information and the business data of the widget of the application 1 to the widget service of the tablet computer. The widget service of the tablet computer can restore the widget of the application 1 on the display screen of the tablet computer according to the layout information and the business data, for example, the widget of the application 1 can be displayed on the desk of the tablet computer.
If the tablet computer receives the layout information and the service data after the mobile phone is serialized, if the tablet computer receives a json file and a binary file, the tablet computer can restore the layout information according to various configurations set in the json file, namely, the identifier, the style and the layout position of each UI element in the widget are obtained. The tablet personal computer can restore the text information and/or the state information of the corresponding UI element according to the key value pair in the json file. And the tablet personal computer can also read the corresponding binary file according to the file name in the json file, so that the picture information of the corresponding UI element is obtained. In this way, the tablet computer can display the widget of the application 1 on the tablet computer according to the restored identifier, style, layout position of the widget, and one or more of the text information, state information, and picture information of each UI element.
For example, continuing with the example in S602, application 1 is taken as a music application, the widgets of the music application are referred to as music playing widgets, and the music playing widgets include album, lyrics, progress bar, play mode button, previous button, play/pause button, and next button. With reference to fig. 11, the tablet pc may receive the serialized layout information and service data, such as json file and binary file, of the music playing widget of the music application from the mobile phone. The tablet personal computer can restore the layout information of the music playing widgets according to the configuration of each item set in the json file. For example, the layout information includes: the music playing widget comprises an album, lyrics, a progress bar, a play mode button, a previous button, identifications of UI elements such as a play/pause button and a next button, styles and layout positions of the UIs in the widget. The tablet personal computer can also restore the text information corresponding to the lyrics, the progress bar, the state information corresponding to the play mode button and the play/pause button according to the key value pair in the json file, and restore the picture information corresponding to the album according to the binary file, namely, the service data of the music playing widget is obtained. And then, the tablet computer can display the music playing widget on the desktop of the tablet computer according to the layout information and the service data. For example, the tablet pc may display, according to the layout information, UI elements such as an album, lyrics, a progress bar, a play mode button, a previous button, a play/pause button, and a next button at a corresponding layout position, set corresponding characters to the lyric widget for display according to the restored character information, set corresponding bitmaps to the album widget for display according to the restored picture information, and set display patterns of the progress bar, the play mode button, and the play/pause button according to the state information, so as to implement display of the music play widget 1102 at the tablet pc.
As an example, as shown in fig. 11, the tablet pc may display a floating window 1101 on a current display interface of the tablet pc (for example, fig. 11 illustrates the current display interface as a desktop), and display a music playing widget 1102 in the floating window 1101. The floating window 1101 may be a window displayed in a predetermined area for displaying shared widgets, the predetermined area may be predefined (for example, the predetermined area is predefined as an area near the right edge of the display screen), and a setting interface may also be provided for a user to set. In this embodiment, the tablet computer may hide the floating window 1101 after determining that the operation of the floating window 1101 by the user is not received within a preset time period after displaying the floating window 1101. It can be seen that, under the condition that the music application is not installed on the tablet computer, the tablet computer can also display the music playing widget of the music application at the tablet computer end according to sharing of the mobile phone. It should be noted that other devices share different small components of the tablet computer, and may be displayed in the same floating window or different floating windows.
Under the condition that the business data of the small parts of the application 1 are refreshed in real time, after the small parts of the application 1 are shared by the mobile phone to the tablet computer, the mobile phone can also send the real-time refreshed business data to the tablet computer, so that the content of the small parts on the tablet computer can be timely updated. Exemplarily, in conjunction with fig. 5, the widget of the application 1 is displayed on the desktop of the mobile phone. After the mobile phone shares the small parts of the application 1 with the tablet computer, the mobile phone, such as a system scheduling service of the mobile phone, can periodically read real-time service data from the application 1 according to the refresh frequency information registered by the application 1, and send the obtained real-time service data to a desktop of the mobile phone. After the desktop of the mobile phone receives the real-time service data, on one hand, the content in the widget of the application 1 displayed on the desktop of the mobile phone can be updated, and on the other hand, the real-time service data can be sent to the widget service of the mobile phone. The widget service of the mobile phone can be sent to the tablet computer through the transmission module of the mobile phone. The tablet computer can refresh the content in the small parts of the application 1 displayed by the tablet computer according to the received real-time service data. For example, in conjunction with fig. 11, the tablet pc can update the content in the music playing widget 1102 according to the real-time service data from the mobile phone, such as updating the album, lyrics, progress of the progress bar, and the like.
In some embodiments of the present application, the widget of the application 1 is shared with other terminals by the mobile phone, and after the mobile phone is used as the tablet computer, the mobile phone can display prompt information for prompting the widget to be shared. For example, as shown in (b) in fig. 10, after the widget is shared with the tablet computer, the mobile phone may display a prompt message 1003 at a position corresponding to the device identifier 1002 of the tablet computer in the device list 1001, for prompting the user that the widget is distributed (or shared) with the tablet computer. In addition, with reference to fig. 10, after receiving a touch operation, such as a click operation, by the mobile phone on an area outside the device list 1001 by the user, the mobile phone may hide the device list 1001, and display an interface before the user performs an operation of sharing a widget, such as the interface shown in fig. 2, a desktop 701 shown in (a) in fig. 7, and a desktop 901 shown in (a) in fig. 9. As another example, in conjunction with fig. 2, as shown in fig. 12, in the case where the handset displays a widget of the application 1, such as the music playing widget 201 shown in fig. 12. After the mobile phone shares the music playing widget 201 with other terminals, such as a tablet computer, as shown in fig. 12, the mobile phone may display a prompt 1201 and/or a prompt 1202 at a corresponding position of the music playing widget 201. The prompt 1201 may be a colored (e.g., blue) stroke located at the outer circle of the music playing widget 201, and is used to prompt the user that the widget is shared. The prompt 1202 includes the word "mobile → tablet", which may be used to prompt the user that the widget is shared with the tablet. Similarly, after the tablet computer accepts the widget of the application 1 shared by the mobile phone, or displays the widget of the application 1 shared by the mobile phone 1, the tablet computer may also display the prompt information at the corresponding position of the widget, so as to prompt the user to share the widget from other terminals. For example, as shown in fig. 11, a prompt 1103 is displayed at a corresponding position of the music playing widget 1102. The prompt 1103 contains the word "widget ← from the cell phone", and can be used to prompt the user that the music playing widget 1102 is from sharing of the cell phone.
After the widget of the application 1 is displayed on the tablet computer, the user may operate the UI element of the manipulation class in the widget displayed on the tablet computer (this operation may be the fourth operation in this embodiment of the application), so as to implement the corresponding control operation. For example, after receiving an operation (such as a click operation or a slide operation) performed by a user on a UI-like element displayed on the tablet pc, the tablet pc may obtain corresponding control information (or an operation event). The control information may include an identifier of a UI element operated by the user and an operation type (e.g., a click operation, a slide operation, etc.). And then, the tablet computer can send the control information to the mobile phone. For example, the tablet computer writes the control information into a json file for serialization and then sends the control information to the mobile phone. After receiving the json file, the mobile phone performs deserialization processing to obtain corresponding control information. The mobile phone can deliver the control information to the application 1 for execution, so that the application 1 responds accordingly. After the mobile phone responds correspondingly, if the business data in the small parts are changed, the mobile phone can also send the changed business data to the tablet personal computer, so that the tablet personal computer can update the contents in the small parts in time.
For example, in conjunction with fig. 11, the tablet computer receives a user touch operation, such as a click operation, on the play/pause button in the music play widget 1102. According to the user operation, the tablet computer can obtain corresponding control information, such as the control information including the mark and click operation of the play/pause button. And then, the tablet computer can write the control information into the json file, serialize the control information and send the control information to the mobile phone. After receiving the json file, the mobile phone performs deserialization to obtain the control information. The handset may pass the control information to the music application for execution so that the music application pauses/begins playing music. It can be understood that the playing/pausing button has a different style when music is paused or started, that is, the status information (service data) of the playing/pausing button changes, and the mobile phone can send the status information of the playing/pausing button to the tablet pc, so that the tablet pc can update the display style of the playing/pausing button in the music playing widget 1102.
The above embodiments are described by taking the example that the mobile phone shares a widget. In other embodiments, the mobile phone may also share multiple widgets to other terminals at the same time. For example, in a scenario that a mobile phone is connected with another terminal and then automatically shares widgets to the other terminal, the mobile phone may automatically share all widgets added to a desktop of the mobile phone to the terminal at the same time after being connected with the other terminal. For another example, in a scenario that the mobile phone shares the widget to the other terminal according to the sharing operation of the user, the mobile phone may share the selected multiple widgets to the other terminal according to the user operation, and if the user performs the dragging operation on the multiple widgets, the mobile phone may share the multiple widgets dragged by the user to the other terminal.
For example, referring to fig. 13, it is taken as an example that a mobile phone is connected to another terminal and then automatically shares a widget to the other terminal. As shown in fig. 13 (a), a music playing widget 1302 of a music application, a memo widget 1303 and a widget 1304 of a stock application are added to a desktop 1301 of the mobile phone. After the mobile phone is connected with other terminals, such as a tablet computer, the mobile phone can share the music playing widget 1302, the widget 1303 and the widget 1304 added to the desktop 1301 with the tablet computer, that is, the layout information and the service data of the music playing widget 1302, the layout information and the service data of the widget 1303, and the layout information and the service data of the widget 1304 are sent to the tablet computer. After the tablet computer receives the data, the music playing widget 1302, the widget 1303 and the widget 1304 can be restored on the tablet computer according to the data without installing a music application, a memo and a stock application. As shown in fig. 13 (b), the tablet may display a suspended window 1305 on the desktop of the tablet, where the suspended window 1305 includes a widget 1306, a widget 1307, and a widget 1308. The widget 1306 is a music playing widget 1302 of the restored mobile phone music application, the widget 1307 is a widget 1303 of the restored mobile phone memo, and the widget 1308 is a widget 1304 of the restored mobile phone stock application. And then, the mobile phone can also acquire the updated service data of the corresponding small part at regular time and send the updated service data to the tablet computer, so that the tablet computer can update the service data in the corresponding small part in time. The specific implementation of the tablet computer for restoring each widget is similar to the specific implementation of the mobile phone sharing the widget of the application 1 to the tablet computer in the above embodiment, and details are not repeated here. In addition, after the user newly adds the widget on the mobile phone, the mobile phone can automatically share the widget with the tablet computer, and the widget is added on the tablet computer by the tablet computer.
It should be noted that, the above embodiment is described by taking an example that service data in a widget is refreshed periodically. In other embodiments, the business data in the widget may not be refreshed periodically, but only after the user performs the corresponding operation. In this embodiment, the mobile phone does not need to acquire refreshed service data at regular time, but after receiving the operation of the corresponding user, acquires the refreshed service data and sends the service data to the tablet pc, so that the tablet pc updates the corresponding content in the widget. In addition, in a scene in which a widget is added at the mobile phone end, the above embodiment is described by taking the widget as an example. In other embodiments, widgets may also be added to a minus one screen, or other interfaces such as a lock screen interface. Similarly, after the tablet computer receives the layout information and the business data of a widget of an application, the widget can be added on a negative screen or a screen locking interface according to the received layout information and the received business data under the condition that the application is not installed. The embodiment of the application does not limit the specific interface for adding the small parts on the terminal.
In some embodiments of the application, in a scene that the application 1 is not installed in the tablet computer and the widget of the application 1 is displayed according to the sharing of the mobile phone, if the tablet computer receives a trigger operation, such as a click operation, of the user on the widget of the application 1 displayed by the tablet computer, the tablet computer may trigger the mobile phone to project and display the interface of the application 1 on the tablet computer. For example, with reference to fig. 11, continuing to take the example that the application 1 is a music application, after the tablet computer receives a click operation of a user on a music playing widget 1102 of the music application displayed on the tablet computer, the tablet computer may send a screen projection request to the mobile phone, where the screen projection request is used to request the mobile phone to project and display an interface of the music application on the tablet computer. After receiving the screen projection request, the mobile phone can acquire screen recording data of the interface of the application 1 and send the screen recording data to the tablet personal computer. As shown in fig. 14, the tablet computer may display an interface 1401 of the application 1 on the tablet computer according to the received screen recording data.
In addition, in the embodiment of the present application, the small component of the application 1 displayed on the tablet computer side may also be hidden (or retracted) at the edge of the screen of the tablet computer. For example, referring to fig. 11, a music playing widget with a music application displayed on a desktop of a tablet computer is taken as an example. After the tablet computer does not receive the operation of the user on the widget within the preset time after the widget is displayed on the desktop of the tablet computer, or after the tablet computer receives the trigger operation of the user on the area outside the widget display area in the desktop, the tablet computer can hide and display the music playing widget, and the display effect can be 1501 shown in fig. 15. Thereafter, if the tablet computer receives a user operation on the hidden widget 1501, in response, the tablet computer may display the music playing widget, and the display effect may be as shown in the music playing widget 1102 shown in fig. 11. In addition, after the connection between the mobile phone and the tablet computer is disconnected, the tablet computer can not display the small parts of the application shared by the mobile phone.
By adopting the method provided by the embodiment of the application, the first terminal provided with the certain application, such as a mobile phone, can send the relevant information of the widget of the application to other second terminals not provided with the application, so that the second terminal can display the widget of the application for the user to view on the premise of not installing the corresponding application. The problem of many ends show the widget, need all install corresponding application is solved. The use cost of the user is saved, and the user experience is improved.
The above embodiment has been described taking as an example that the second terminal does not have the application 1 installed. In other embodiments of the present application, the second terminal may also be installed with the application 1. If the application 1 is installed on the second terminal, and the first terminal shares the widget of the application 1 with the second terminal, the second terminal may synchronize the content of the widget of the application 1 displayed on the second terminal with the widget of the first terminal according to the sharing of the first terminal.
Based on this, in conjunction with the above embodiment shown in fig. 6, an embodiment of the present application further provides a display method of an application widget, where the method may include the following steps:
step 1, establishing connection between the mobile phone and the tablet personal computer.
And step 2, the mobile phone sends layout information and service data of the small parts of the application 1 and the package name of the application 1 to the tablet computer.
Step 1 and step 2 are similar to the corresponding descriptions of S601 and S602 in the above embodiments, and are not described in detail here. The difference is that in step 2, the mobile phone needs to send the package name of the application 1 to the tablet computer in addition to sending the layout information and the service data of the widget of the application 1 to the tablet computer.
And step 3, the tablet computer judges whether the tablet computer comprises the application 1 or not according to the package name of the application 1.
After the tablet computer receives the layout information and the service data of the small parts of the application 1 from the mobile phone and the package name of the application 1, the tablet computer can perform local application scanning, that is, whether the application 1 is included or installed in the tablet computer is judged. If the tablet computer does not include the application 1, the following step 4 is performed. If the tablet computer includes the application 1, the following step 5 is performed.
And 4, the tablet computer displays the widgets of the application 1 according to the received layout information of the widgets of the application 1 and the service data.
Wherein, if the tablet computer does not include the application 1, the tablet computer may display the widget of the application 1 according to the layout information and the business data of the widget of the application 1 from the mobile phone.
In addition, under the condition that the content in the widget of the application 1 is updated regularly, the mobile phone can also send updated service data to the tablet computer regularly, so that the tablet computer can update the content in the widget of the application 1 displayed by the tablet computer in time. The detailed description is similar to that of the corresponding content in the above embodiment S603, and is not repeated here.
And step 5, the tablet computer updates the contents of the widgets of the application 1 displayed on the tablet computer or displays the contents of the widgets of the application 1 on the tablet computer according to the received layout information and the service data of the widgets of the application 1.
If the tablet computer comprises the application 1 and a small part is added in the tablet computer (such as a desktop of the tablet computer), the tablet computer can update the content of the small part of the application 1 displayed by the tablet computer according to the layout information and the business data of the small part of the application 1 from the mobile phone, so that the content of the small part of the application 1 displayed on the tablet computer is kept synchronous with the content of the small part of the application 1 of the mobile phone. If the tablet computer comprises the application 1 but no widget is added to the tablet computer, the tablet computer can display the widget of the application 1 on the tablet computer according to the layout information and the business data of the widget of the application 1 from the mobile phone.
In addition, when the content in the widget of the application 1 is updated periodically, the tablet computer also needs to update the content in the widget of the application 1 displayed on the tablet computer at regular intervals. In some embodiments, the updated service data may be periodically sent to the tablet computer by the mobile phone, so that the tablet computer periodically updates the content in the widget of the application 1 displayed on the local terminal. In other embodiments, since the application 1 is included in the tablet pc, the tablet pc may also periodically obtain real-time updated service data from the application 1 included in the local terminal, so as to update the content of the widget of the application 1 displayed in the local terminal.
In a scenario that the tablet computer obtains real-time updated service data from the application 1 included in the home terminal, in order to ensure that the service data obtained by the tablet computer from the home terminal application 1 and the service data of the application 1 on the mobile phone can be kept synchronous, in this embodiment, after the tablet computer determines that the home terminal includes the application 1, the tablet computer may further notify the mobile phone, and the tablet computer starts a service connection process, for example, the tablet computer sends a connection request (the connection request may be a request message in the embodiment of the present application) to the mobile phone, so as to notify the mobile phone that the tablet computer starts the service connection process. After receiving the connection request from the tablet computer, the mobile phone can acquire the real-time service data of the application 1 and send the real-time service data to the tablet computer. After receiving the real-time service data, the tablet computer can update the current state of the application 1 according to the real-time service data, so that the state of the application 1 at the tablet computer end is consistent with the state of the application 1 at the mobile phone end. Thereafter, the tablet may periodically obtain real-time business data from the application 1 for the tablet to update the content in the widget of the application 1. In addition, after the tablet computer restores the state of the home application 1 to be consistent with the state of the mobile phone application 1, the tablet computer can also send a notification message to the mobile phone to notify that the mobile phone service connection is completed, so that the mobile phone suspends the relevant service.
Illustratively, in conjunction with fig. 5, the process of initiating a service connection by the tablet computer and obtaining real-time service data may include: after the tablet computer determines that the local terminal comprises the application 1, the widget service of the tablet computer can send a connection request to the mobile phone through a transmission module of the tablet computer, or initiate service connection to the mobile phone. After receiving the connection request, the transmission module of the mobile phone, such as the mobile phone, sends the connection request to the widget service of the mobile phone. After receiving the connection request, the widget service of the mobile phone can acquire real-time service data from the application 1. And then, the widget service of the mobile phone can send the acquired real-time service data to the tablet computer through the transmission module of the mobile phone. And after receiving the real-time service data, the transmission module of the tablet computer can send the real-time service data to the small component service of the tablet computer. The widget service of the tablet computer can send the real-time service data to the application 1, and the application 1 is used for restoring the state of the local application 1 to be consistent with the state of the mobile phone application 1. And then, the widget service of the tablet computer can also send a notification message to the mobile phone through the transmission module, so as to notify the mobile phone that the service connection is completed. After receiving the notification message, a transmission module of the mobile phone, such as a mobile phone, may send the notification message to a widget service of the mobile phone. The widget service of the handset may suspend the associated service according to the notification message. If the application 1 is a music application, the mobile phone terminal is playing music by using the music application, and the mobile phone can stop playing music after receiving a notification message for notifying completion of connection from the tablet computer.
The above description is given by taking an example that after the tablet personal computer determines that the home terminal includes the application 1, the contents of the widget of the application 1 displayed by the tablet personal computer are updated according to the layout information of the widget and the service data from the mobile phone, and the subsequently updated service data is acquired from the home terminal of the tablet personal computer. In other embodiments, after determining that the local terminal includes the application 1, the tablet computer may also not update the content of the widget of the application 1 displayed by the tablet computer according to the layout information and the service data of the widget from the mobile phone, but directly send a connection request to the mobile phone, so that the mobile phone returns real-time service data for the tablet computer to update the service data in the local terminal application 1. And then, the tablet computer updates the content of the widget of the application 1 displayed by the tablet computer according to the local application 1 with the updated service data.
As an example, a widget service of a mobile phone and a tablet computer may respectively integrate a corresponding Software Development Kit (SDK), such as referred to as DUP-SDK, and an application 1 implements a corresponding Application Programming Interface (API) to implement the service connection process.
For example, in conjunction with fig. 16, the cell phone initiates a sharing process of the widget of application 1, such as receiving an operation of the user to share the widget of application 1. The widget service of the mobile phone calls the DUP-SDK to acquire the layout information and the service data of the widget of the application 1 and the package name (packagemame) of the application 1, and sends the package name to the tablet computer through a network interface, for example, the data are serialized to obtain a corresponding json file, and then the json file is sent to the tablet computer through the network interface. The widget service of the tablet personal computer receives the json file from the mobile phone through the network interface, and layout information and service data of the widget and the package name of the application 1 can be obtained after deserialization. The widget service of the tablet computer calls a detection local service (checkLocalservice) in the DUP-SDK so as to detect whether the tablet computer is locally provided with the application 1 or not according to the received packet name and detect whether a local terminal registers a service connection service or not. When detecting that the application 1 is not installed at the home terminal, the tablet computer can display the corresponding widget on the tablet computer according to the received layout information and service data of the widget.
If the local terminal is detected to be provided with the application 1 and the service connection service is registered, the widget service of the tablet computer can send a connection request to the mobile phone through the network interface. After receiving the connection request through the network interface, the widget service of the mobile phone, such as a mobile phone, may call an obtain local information (obeinLocalInfo) interface of the DUP-SDK to obtain real-time service data from the application 1. And then, the widget service of the mobile phone serializes the acquired real-time service data into a json file through a network interface and sends the json file to the tablet personal computer. The widget service of the tablet computer can receive the corresponding json file from the network interface, and real-time service data can be obtained after deserialization. Thereafter, the widget service of the tablet calls the DUP-SDK to set the obtained real-time service data to the application 1. If the application 1 realizes the information application to the Local (applyInfo 2 Local) interface, the applyInfo2Local interface is called, so that the setting of real-time service data to the Local application 1 can be realized, and the state of the Local application 1 and the state of the mobile phone application 1 can be recovered to be consistent by the tablet computer. After the setting is successful, the tablet computer can also notify the mobile phone of a service connection success interface (onServiceContinueSuccess), if the application 1 is successfully set, the result (if successful) is sent to the widget service, and the widget service of the mobile phone sends a notification message through a network interface, if the notification message is serialized into a json file, the notification message is sent to the mobile phone. When the mobile phone receives the json file, the notification message can be obtained through deserialization. The application 1 can then be notified by the widget service of the handset to suspend the associated service according to the notification message. The tablet computer may display the corresponding widget on the tablet computer according to the received layout information of the widget and the service data obtained from the local application 1, for example, the widget is displayed by the sinkactivity of the tablet computer.
It can be understood that, in the service continuing process, after the mobile phone end stops sharing the widget of the application 1, for example, the mobile phone is disconnected from the tablet computer, or receives an operation that the user stops sharing the widget of the application 1 (the operation may be executed at the mobile phone end, or at the tablet computer end), and the mobile phone and the tablet computer may exchange roles, the service continuing process is re-executed, so that the mobile phone may continue to provide services to the user through the tablet computer. For example, after the mobile phone end stops sharing the widget of the application 1, the mobile phone may send a connection request to the tablet computer. And then, the tablet computer can call the obitanlocalnfo interface of the DUP-SDK so as to acquire real-time service data from the application 1 of the tablet computer end and return the real-time service data to the mobile phone. After receiving the real-time service data, the mobile phone can call an applyInfo2Local interface to realize the setting of the real-time service data in the mobile phone application 1. After the setting is successful, the mobile phone sends a notification message to the onservicecontinuesucess interface of the tablet computer, so that the tablet computer terminal suspends the relevant service of the application 1, and thus, the service of the tablet computer can be continued at the mobile phone terminal.
The above process is briefly described below with reference to specific examples. For example, referring to fig. 17, continuing with the example that application 1 is a music application, the control for sharing the widget of the music application is included in the menu option of application 1. As shown in fig. 17 (a), an icon 1701 of a music application is included on the desktop of the mobile phone. The cellular phone receives a user's operation, such as a long press operation, on the icon 1701 of the music application. In response to the long press operation, the mobile phone may display a menu option 1702 of the music application as shown in fig. 17 (a). The menu option 1702 widget cross device button 1703. The widget cross device button 1703 is a control for sharing a widget of the music application. The mobile phone receives a trigger operation, such as a click operation, of the widget cross-device button 1703 by the user. In response to this operation, as shown in (b) in fig. 17, the cell phone displays the device list 1704. The device list 1704 includes device identifiers of terminals connected to the mobile phone, such as a device identifier 1705 of a tablet computer. The mobile phone receives a selection operation of the user on the device identifier 1705 of the tablet computer. In response to this operation, the cell phone may share the widget of the music application to the tablet. For example, the mobile phone sends layout information and service data of the widget of the music application, and a package name of the music application to the tablet computer. After receiving the data, the tablet computer can determine whether the local terminal is provided with the music application according to the package name of the music application. If the tablet personal computer determines that the music application is installed at the local terminal, a continuing request can be sent to the mobile phone. After receiving the connection request, the mobile phone can obtain real-time service data (such as a currently played music identifier, a playing progress, a volume and the like) of the music application and send the real-time service data to the mobile phone. And then, the tablet personal computer can update the state of the local music application according to the received real-time service data, such as setting the music application to the same music, progress, volume and the like as those of the mobile phone, so as to realize continuous connection. The tablet computer can also display the content of the small parts of the music application added in the tablet computer according to the local music application with the updated service data. The specific display effect may be as 1102 shown in fig. 11. In addition, in this embodiment, since the music application is installed in the tablet computer, and the data in the widget displayed by the tablet computer is also from the music application at the local end, the prompt information displayed by the tablet computer at the corresponding position of the widget for prompting the widget source may include a "local end" word. That is, in this embodiment, the prompt information 1103 in fig. 11, i.e., "widget ← comes from the mobile phone," can be replaced with "home-end" word, and is used to prompt the user that the music playing widget comes from the home end.
In addition, as described in the foregoing embodiment, after the tablet computer succeeds in connection, a notification message for notifying that the connection is successful may be sent to the mobile phone. In some embodiments, after receiving the notification message, the mobile phone may display a prompt message to prompt the user that the widget is successfully distributed. For example, as shown in fig. 17 (b), the cell phone may display a "successful distribution" typeface 1706 under the device identification 1703 of the tablet in the device list 1704 to prompt the user that the widget of the music application was successfully distributed to the tablet. For another example, as shown in (c) of fig. 17, the mobile phone may display the prompt information 1708 at a corresponding position of the widget 1707 of the music application displayed by the mobile phone. The prompt 1708 may include a "cell phone → tablet" script that may be used to prompt the user that the widget was successfully distributed to the tablet. If the user is playing music using the music application of the handset, the associated service may also be paused, such as stopping playing music, after the notification message is received by the handset.
In addition, as described in the embodiment shown in fig. 6, in a scenario that the application 1 is not installed in the tablet computer and the widget of the application 1 is displayed according to the sharing of the mobile phone, if the tablet computer receives a trigger operation of the user on an operable UI element in the widget of the application 1 displayed at the home terminal, the tablet computer may send corresponding control information to the mobile phone, so that the mobile phone makes a corresponding response. In a scenario that the application 1 is installed in the tablet computer and the widget is displayed under the condition that the service continuation process is executed, if the tablet computer receives a trigger operation (which may be a fourth operation in the embodiment of the present application) of a user on an operable UI element in the widget of the application 1 displayed at the home terminal, the tablet computer may send corresponding control information to the application 1 at the home terminal, so that the local application 1 makes a corresponding response. In addition, as described in the embodiment shown in fig. 6, in a scenario where the application 1 is not installed in the tablet computer and the widget of the application 1 is displayed according to the sharing of the mobile phone, if the tablet computer receives a trigger operation of the user on the widget of the application 1 displayed by the tablet computer, the tablet computer may trigger the mobile phone to project and display the interface of the application 1 on the tablet computer. In the scene that the application 1 is installed on the tablet computer and the widget is displayed under the condition that the service continuing process is executed, if the tablet computer receives the trigger operation of the widget of the application 1 displayed on the tablet computer by the user, the tablet computer can open the application 1 of the local terminal and display the interface of the application 1. For example, taking the application 1 as a music application as an example, as shown in fig. 18, after receiving a trigger operation of a user on a widget of the music application displayed on the tablet computer, the tablet computer may display an interface 1801 of the music application. That is to say, for a scenario in which the application 1 is installed on the tablet computer and the widget is displayed when the service continuation process is executed, the user does not respond to the widget of the application 1 by operating the widget on the tablet computer side with a mobile phone.
In some other embodiments of the present application, the application 1 is installed on the tablet computer, and a scene of the widget is displayed under the condition that the service continuation process is executed, when the widget of the application 1 is displayed on the tablet computer, in addition to displaying the corresponding UI element according to the layout information and the service data shared by the mobile phone, the application developer or the system developer may define the widget, and add another UI element of the application 1 to the widget (the UI element may be a second UI element in the embodiments of the present application). For example, continuing to use application 1 as a music application, the widget of the music application is called a music playing widget, and the music playing widget shared by the mobile phone includes an album, lyrics, a progress bar, a play mode button, a previous button, a play/pause button, and a next button. After the tablet computer receives the share from the mobile phone, the small parts displayed by the tablet computer can be added with other UI elements besides the album, the lyrics, the progress bar, the play mode button, the previous button, the play/pause button and the next button. As shown in (a) of fig. 19, the tablet computer displays a music play widget 1901, and the music play widget 1901 includes a song list 1902 in addition to an album, lyrics, a progress bar, a play mode button, a previous button, a play/pause button, and a next button, or further includes an album recommendation 1903 as shown in (b) of fig. 19.
By adopting the method provided by the embodiment of the application, the first terminal provided with the certain application, such as a mobile phone, can send the relevant information of the widget of the application to other second terminals not provided with the application, so that the widget of the application can be displayed for a user to view on the premise that the second terminal is not provided with the corresponding application. The problem of many ends show the widget, need all install corresponding application is solved. The use cost of the user is saved, and the user experience is improved. In addition, when the second terminal is provided with the corresponding application, the application connected to the second terminal can continue to provide services for the user, and the widget also acquires the corresponding content from the application of the second terminal. The distribution of the small parts supports the triggering of a dragging mode, the distribution is more flexible, the user operation is simpler, and the user experience is improved.
Fig. 20 is a schematic composition diagram of a display device using a small component according to an embodiment of the present application. As shown in fig. 20, the apparatus may be applied to a first terminal (such as a mobile phone described above) including a first application. The apparatus may include: a connection unit 2001 and a transmission unit 2002.
A connection unit 2001 for establishing a connection with the second terminal.
A sending unit 2002 for sending layout information of the widget of the first application to the second terminal, for the second terminal to display the widget without displaying the widget of the first application; wherein the layout information may include: the widget includes an identification of a first UI element, a style, and a layout position in the widget.
Further, the sending unit 2002 is further configured to send, to the second terminal, service data of a widget of the first application, where the service data is used by the second terminal to display content in a corresponding first UI element of the widget; the service data may include one or more of picture information, text information, and status information corresponding to the first UI element, where the status information may be used to indicate a current status of the first UI element.
Further, the displaying, by the second terminal, the widget of the first application may include: the second terminal does not include the first application; or, the second terminal includes the first application but does not add a widget of the first application to a desktop of the second terminal.
Further, the layout information and the service data of the widget may be further used for updating the content of the display widget by the second terminal in the case of displaying the widget of the first application.
Further, the widget is included in a desktop of the first terminal.
Further, the apparatus may further include: a determination unit 2003 is configured to determine that the second terminal and the second terminal log in the same account.
Further, the apparatus may further include: an input unit 2004 for receiving a first operation by a user, the first operation for indicating a distribution widget.
Further, the apparatus may further include: the display unit 2005 is configured to display an icon of the first application.
The input unit 2004 is further configured to receive a second operation of the icon of the first application by the user.
The display unit 2005 is further configured to display, in response to the second operation, a menu option, where the menu option includes a first control, and the first control is used to trigger the first terminal distribution widget; the first operation is an operation on a first control.
Further, the widget is selected by the user or recommended by the first terminal among the widgets of the first application.
Further, a display unit 2005 for displaying a widget.
The input unit 2004 is further configured to receive a third operation of the widget by the user.
The display unit 2005 is further configured to display a menu option in response to a third operation, where the operation menu includes a second control, and the second control is used to trigger the first terminal distribution widget; the first operation is an operation on a second control.
Further, the display unit 2005 is configured to display a desktop setting interface, where the desktop setting interface includes a widget; wherein the first operation is a drag operation on the widget.
The sending unit 2002 is specifically configured to send layout information of the widget to the second terminal when the widget is determined to be dragged to the predetermined area and then the dragging is released.
The sending unit 2002 is specifically configured to configure the layout information of the widget and the service data into a json file and send the json file to the second terminal.
Further, the apparatus may further include: an obtaining unit 2006, configured to obtain refreshed service data from the first application of the first terminal at regular time according to the refresh frequency information of the first application.
The sending unit 2002 is further configured to send the refreshed service data to the second terminal, so that the second terminal updates the content in the displayed widget.
Further, the apparatus may further include: a receiving unit 2007, configured to receive an identifier and an operation type of the first UI element from the second terminal, where the identifier and the operation type of the first UI element are sent by the second terminal after receiving a fourth operation by the user, and the fourth operation is an operation on the first UI element in the widget displayed by the second terminal.
The processing unit 2008 is configured to control the first application of the first terminal to respond to the fourth operation according to the identifier and the operation type of the first UI element.
Further, in case that the second terminal includes the first application, the receiving unit 2007 is configured to receive, by the first terminal, the request message from the second terminal.
An obtaining unit 2006, configured to respond to the request message, and obtain real-time service data of the first application in the first terminal.
The sending unit 2002 is further configured to send real-time service data of the first application in the first terminal to the second terminal.
Further, the receiving unit 2007 is further configured to receive the notification message from the second terminal.
The processing unit 2008 is further configured to control the first application of the first terminal to suspend the related service in response to the notification message.
Fig. 21 is a view illustrating a display device using a small component, which may be applied to a second terminal (e.g., a tablet computer as described above), according to an embodiment of the present application, and as shown in fig. 21, the display device may include: a connection unit 2101, a reception unit 2102, and a display unit 2103.
A connection unit 2101 is configured to establish a connection with a first terminal, where the first terminal includes a first application.
A receiving unit 2102 for receiving layout information of a widget of a first application from a first terminal in a case where the second terminal does not display the widget of the first application; the layout information comprises an identification of a first UI element included in the widget, a style and a layout position in the widget.
A display unit 2103 for displaying the widget according to the layout information of the widget, the widget including the first UI element.
Further, the receiving unit 2102 is further configured to receive the service data of the widget of the first application from the first terminal in a case that the widget of the first application is not displayed by the second terminal; the service data comprises one or more of picture information, text information and state information corresponding to the first UI element, and the state information is used for indicating the current state of the first UI element. The display unit 2103 is further configured to display content in the corresponding first UI element of the widget according to the business data.
Further, the not displaying of the widget of the first application by the second terminal may include: the second terminal does not include the first application; or, the second terminal includes the first application but does not add a widget of the first application to a desktop of the second terminal.
Further, the apparatus may further include: an obtaining unit 2104 configured to obtain the refreshed service data at regular time.
And the display unit 2103 is further used for updating the content in the displayed small parts according to the refreshed business data.
Further, in case the second terminal does not comprise the first application; the obtaining unit 2104 is specifically configured to: and receiving the refreshed service data sent by the first terminal at regular time.
Further, the apparatus may further include: an input unit 2105 for receiving a fourth operation of the first UI element in the widget displayed by the second terminal by the user. A sending unit 2106, configured to send the identifier of the first UI element and the operation type to the first terminal, for the first terminal to respond to the fourth operation.
Further, in case the second terminal comprises the first application; the obtaining unit 2104 is specifically configured to obtain refreshed service data from the first application of the second terminal at regular time according to the refresh frequency information of the first application.
Further, the sending unit 2106 is further configured to send a request message to the first terminal after receiving the layout information of the widget from the first terminal and when it is determined that the second terminal includes the first application, where the request message is used to trigger the first terminal to acquire real-time service data of the first application in the first terminal.
The receiving unit 2102 is further configured to receive real-time service data of a first application in a first terminal from the first terminal.
The apparatus may further include: an updating unit 2107, configured to update the current state of the first application in the second terminal according to the real-time service data.
Further, the sending unit 2106 is further configured to send a notification message to the first terminal, where the notification message is used for the first application of the first terminal to suspend the relevant service.
Further, the input unit 2105 is further configured to receive a fourth operation of the first UI element in the widget displayed by the second terminal by the user.
The apparatus may further include: the processing unit 2108 is configured to control the first application of the second terminal to respond to the fourth operation.
Further, a second UI element of the first application in the second terminal may also be included in the widget.
The embodiment of the present application further provides a display apparatus of an application widget, where the apparatus may be applied to the first terminal or the second terminal in the foregoing embodiments. The apparatus may include: a processor, and a memory for storing processor-executable instructions; the processor is configured to execute the instructions to implement the functions or steps executed by the mobile phone or the tablet computer in the above method embodiments.
An embodiment of the present application further provides a terminal (the terminal may be the first terminal or the second terminal in the foregoing embodiment), where the terminal may include: a display screen, a memory, and one or more processors. The display screen, memory and processor are coupled. The memory is for storing computer program code comprising computer instructions. When the processor executes the computer instructions, the terminal may perform each function or step performed by the mobile phone or the tablet computer in the above method embodiments. Of course, the terminal includes, but is not limited to, the display screen, memory, and one or more processors described above. For example, the structure of the terminal may refer to the structure of a handset shown in fig. 4.
The embodiment of the present application further provides a chip system, which may be applied to the terminal (such as the first terminal or the second terminal) in the foregoing embodiment. As shown in FIG. 22, the system-on-chip includes at least one processor 2201 and at least one interface circuit 2202. The processor 2201 may be a processor in the terminal described above. The processor 2201 and the interface circuit 2202 may be interconnected by wires. The processor 2201 may receive and execute computer instructions from the memory of the terminal via the interface circuit 2202. The computer instructions, when executed by the processor 2201, may cause the terminal to perform the steps performed by the mobile phone or the tablet computer in the above embodiments. Of course, the chip system may further include other discrete devices, which is not specifically limited in this embodiment of the present application.
The embodiment of the present application further provides a computer-readable storage medium, which is used for storing computer instructions executed by the terminal (such as a mobile phone or a tablet computer).
The embodiment of the present application further provides a computer program product, which includes computer instructions executed by the above terminal (such as a mobile phone or a tablet computer).
Through the description of the foregoing embodiments, it will be clear to those skilled in the art that, for convenience and simplicity of description, only the division of the functional modules is used for illustration, and in practical applications, the above function distribution may be completed by different functional modules as required, that is, the internal structure of the device may be divided into different functional modules to complete all or part of the above described functions.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described device embodiments are merely illustrative, and for example, the division of the modules or units is only one logical functional division, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or may be integrated into another device, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may be one physical unit or multiple physical units, that is, may be located in one place, or may be distributed in multiple different places. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a readable storage medium. Based on such understanding, the technical solutions of the embodiments of the present application may be essentially or partially contributed to by the prior art, or all or part of the technical solutions may be embodied in the form of a software product, where the software product is stored in a storage medium and includes several instructions to enable a device (which may be a single chip, a chip, or the like) or a processor (processor) to execute all or part of the steps of the methods described in the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The above description is only an embodiment of the present application, but the scope of the present application is not limited thereto, and any changes or substitutions within the technical scope of the present disclosure should be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (28)

1. A display method of an application widget, applied to a first terminal including a first application, the method comprising:
the first terminal establishes connection with a second terminal;
the first terminal sending layout information of the widget of the first application to the second terminal for the second terminal to display the widget without displaying the widget of the first application;
the layout information comprises an identification, a style and a layout position in the widget of a first user interface UI element included in the widget.
2. The method of claim 1, further comprising:
the first terminal sends business data of the widget of the first application to the second terminal, so that the second terminal displays content in the corresponding first UI element of the widget;
the service data comprises one or more of picture information, text information and state information corresponding to the first UI element, and the state information is used for indicating the current state of the first UI element.
3. The method according to claim 1 or 2, wherein the second terminal not displaying the widget of the first application comprises:
the second terminal does not include the first application; or the like, or a combination thereof,
the second terminal includes the first application but does not add a widget of the first application on a desktop of the second terminal.
4. The method according to any of claims 1-3, wherein the widget is included in a desktop of the first terminal.
5. The method of claim 4, wherein before the first terminal sends layout information of the widget of the first application to the second terminal, the method further comprises:
and the first terminal determines that the second terminal and the second terminal log in the same account.
6. The method according to any of claims 1-3, characterized in that before the first terminal sends layout information of the widget of the first application to the second terminal, the method further comprises:
the first terminal receives a first operation of a user, and the first operation is used for indicating distribution of the widget.
7. The method of claim 6, wherein before the first terminal receives the first operation of the user, the method further comprises:
the first terminal displays an icon of the first application;
the first terminal receives a second operation of the user on the icon of the first application;
in response to the second operation, the first terminal displaying a menu option, the menu option comprising a first control for triggering the first terminal to distribute the widget;
the first operation is an operation of the first control.
8. The method according to claim 7, characterized in that said widget is selected by a user or recommended by said first terminal among a plurality of widgets of said first application.
9. The method of claim 6, wherein before the first terminal receives the first operation of the user, the method further comprises:
the first terminal displaying the widget;
the first terminal receives a third operation of the widget by a user;
in response to the third operation, the first terminal displays a menu option, wherein the operation menu comprises a second control used for triggering the first terminal to distribute the widget;
the first operation is an operation on the second control.
10. The method of claim 6, wherein before the first terminal receives the first operation of the user, the method further comprises:
the first terminal displays a desktop setting interface, and the desktop setting interface comprises the widget;
wherein the first operation is a drag operation on the widget;
the first terminal transmitting layout information of the widget of the first application to the second terminal, including:
and when the first terminal releases the dragging after determining that the widget is dragged to the preset area, the first terminal sends the layout information of the widget to the second terminal.
11. The method of claim 2, wherein the transmitting the layout information to the second terminal by the first terminal and the transmitting the service data comprises:
and the first terminal configures the layout information and the service data into a json file and then sends the json file to the second terminal.
12. The method of any of claims 2-11, wherein after the first terminal sends the traffic data for the widget of the first application to the second terminal, the method further comprises:
the first terminal acquires the refreshed service data from the first application of the first terminal at regular time according to the refreshing frequency information of the first application;
and the first terminal sends the refreshed business data to the second terminal, so that the second terminal updates the content in the displayed small parts.
13. The method according to any one of claims 1-12, further comprising:
the first terminal receives an identifier and an operation type of the first UI element from the second terminal, wherein the identifier and the operation type of the first UI element are sent after the second terminal receives a fourth operation of a user, and the fourth operation is the operation of the first UI element in the widget displayed by the second terminal;
and the first terminal controls the first application of the first terminal to respond to the fourth operation according to the identifier of the first UI element and the operation type.
14. The method according to any one of claims 1 to 11, wherein in case that the second terminal includes the first application, after the first terminal transmits layout information of the widget of the first application to the second terminal, the method further comprises:
the first terminal receives a request message from the second terminal;
responding to the request message, the first terminal acquires real-time service data of the first application in the first terminal;
and the first terminal sends the real-time service data of the first application in the first terminal to the second terminal.
15. The method of claim 14, wherein after the first terminal sends the real-time service data of the first application in the first terminal to the second terminal, the method further comprises:
the first terminal receives a notification message from the second terminal;
and responding to the notification message, and controlling the first application of the first terminal to suspend the related service by the first terminal.
16. A display method of an application widget, applied to a second terminal, the method comprising:
the second terminal establishes connection with a first terminal, and the first terminal comprises a first application;
in case that the second terminal does not display the widget of the first application, the second terminal receives layout information of the widget of the first application from the first terminal; wherein the layout information comprises an identifier, a style and a layout position in the widget of a first User Interface (UI) element included in the widget;
and the second terminal displays the widget according to the layout information of the widget, wherein the widget comprises the first UI element.
17. The method of claim 15, further comprising:
in the case where the second terminal does not display the widget of the first application, the second terminal receives the service data of the widget of the first application from the first terminal; the service data comprises one or more of picture information, text information and state information corresponding to the first UI element, and the state information is used for indicating the current state of the first UI element
And the second terminal displays content in the corresponding first UI element of the widget according to the service data.
18. The method of claim 16 or 17, the second terminal not displaying the widget of the first application includes:
the second terminal does not include the first application; or the like, or a combination thereof,
the second terminal includes the first application but does not add a widget of the first application on a desktop of the second terminal.
19. The method according to any one of claims 16-18, further comprising:
the second terminal acquires the refreshed service data at regular time;
and the second terminal updates the content in the displayed small parts according to the refreshed business data.
20. The method according to claim 19, characterized in that in case the second terminal does not comprise the first application;
the second terminal periodically acquires the refreshed service data, and the method comprises the following steps:
and the second terminal receives the refreshed service data sent by the first terminal at regular time.
21. The method of claim 20, wherein after the second terminal displays the widget according to the layout information of the widget, the method further comprises:
the second terminal receives a fourth operation of the first UI element in the widget displayed by the second terminal by a user;
and the second terminal sends the identifier and the operation type of the first UI element to the first terminal, so that the first terminal responds to the fourth operation.
22. The method according to claim 19, characterized in that in case the second terminal comprises the first application;
the second terminal periodically acquires the refreshed service data, and the method includes:
and the second terminal acquires the refreshed service data from the first application of the second terminal at regular time according to the refreshing frequency information of the first application.
23. The method according to claim 22, wherein before the second terminal periodically obtains the refreshed service data from the first application of the second terminal according to the refresh frequency information of the first application, the method further comprises:
after receiving the layout information of the widget from the first terminal, the second terminal sends a request message to the first terminal when determining that the second terminal comprises the first application, wherein the request message is used for triggering the first terminal to acquire real-time service data of the first application in the first terminal;
the second terminal receives real-time service data of the first application in the first terminal from the first terminal;
and the second terminal updates the current state of the first application in the second terminal according to the real-time service data.
24. The method of claim 23, wherein after the second terminal updates the current state of the first application in the second terminal according to the real-time service data, the method further comprises:
and the second terminal sends a notification message to the first terminal, wherein the notification message is used for suspending the related service of the first application of the first terminal.
25. The method according to any of claims 22-24, wherein after the second terminal displays the widget according to the layout information of the widget, the method further comprises:
the second terminal receives a fourth operation of the first UI element in the widget displayed by the second terminal by a user;
and the second terminal controls the first application of the second terminal to respond to the fourth operation.
26. The method according to any of claims 22-25, characterized in that a second UI element of the first application in the second terminal is further included in the widget.
27. A display device employing widgets, comprising: a processor; a memory for storing the processor-executable instructions;
wherein the processor is configured to carry out the instructions when executing the method of any one of claims 1-15 or to carry out the method of any one of claims 16-26.
28. A computer-readable storage medium on which computer program instructions are stored, which computer program instructions, when executed by a processor, implement the method of any one of claims 1-15 or the method of any one of claims 16-26.
CN202110352490.1A 2021-03-31 2021-03-31 Display method and device for application widget and storage medium Active CN115150502B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202110352490.1A CN115150502B (en) 2021-03-31 2021-03-31 Display method and device for application widget and storage medium
PCT/CN2022/084103 WO2022206848A1 (en) 2021-03-31 2022-03-30 Method and device for displaying application widget

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110352490.1A CN115150502B (en) 2021-03-31 2021-03-31 Display method and device for application widget and storage medium

Publications (2)

Publication Number Publication Date
CN115150502A true CN115150502A (en) 2022-10-04
CN115150502B CN115150502B (en) 2024-06-11

Family

ID=83404920

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110352490.1A Active CN115150502B (en) 2021-03-31 2021-03-31 Display method and device for application widget and storage medium

Country Status (2)

Country Link
CN (1) CN115150502B (en)
WO (1) WO2022206848A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116679861A (en) * 2022-11-30 2023-09-01 荣耀终端有限公司 Content display method and electronic equipment thereof

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2010099551A2 (en) * 2009-02-27 2010-09-02 Chumby Industries, Inc. Systems and methods for widget rendering and sharing on a personal electronic device
CN109597789A (en) * 2018-12-11 2019-04-09 深圳市路畅科技股份有限公司 A kind of method, system and device that vehicle device is interacted with mobile phone audio-frequency data
CN111459592A (en) * 2020-03-31 2020-07-28 华为技术有限公司 Method and device for processing UX elements in distributed mode
CN111666075A (en) * 2020-05-30 2020-09-15 华为技术有限公司 Multi-device interaction method and system
CN112269516A (en) * 2020-11-16 2021-01-26 Oppo广东移动通信有限公司 Display method and access method of desktop element data and related devices
CN112286477A (en) * 2020-11-16 2021-01-29 Oppo广东移动通信有限公司 Screen projection display method and related product

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140032722A1 (en) * 2009-05-29 2014-01-30 Adobe Systems Incorporated Controlling Characteristics of Network Device Widgets through a Network Device
ES2936338T3 (en) * 2012-06-13 2023-03-16 Huawei Device Co Ltd Mobile terminal and widget sharing software product
CN107465949B (en) * 2017-07-13 2019-06-14 彭茂笑 A kind of sharing method keeping multimedia messages real-time display on intelligent terminal

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2010099551A2 (en) * 2009-02-27 2010-09-02 Chumby Industries, Inc. Systems and methods for widget rendering and sharing on a personal electronic device
CN109597789A (en) * 2018-12-11 2019-04-09 深圳市路畅科技股份有限公司 A kind of method, system and device that vehicle device is interacted with mobile phone audio-frequency data
CN111459592A (en) * 2020-03-31 2020-07-28 华为技术有限公司 Method and device for processing UX elements in distributed mode
CN111666075A (en) * 2020-05-30 2020-09-15 华为技术有限公司 Multi-device interaction method and system
CN112269516A (en) * 2020-11-16 2021-01-26 Oppo广东移动通信有限公司 Display method and access method of desktop element data and related devices
CN112286477A (en) * 2020-11-16 2021-01-29 Oppo广东移动通信有限公司 Screen projection display method and related product

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116679861A (en) * 2022-11-30 2023-09-01 荣耀终端有限公司 Content display method and electronic equipment thereof

Also Published As

Publication number Publication date
WO2022206848A1 (en) 2022-10-06
CN115150502B (en) 2024-06-11

Similar Documents

Publication Publication Date Title
WO2021013158A1 (en) Display method and related apparatus
WO2020238774A1 (en) Notification message preview method and electronic device
WO2020177622A1 (en) Method for displaying ui assembly and electronic device
WO2021000881A1 (en) Screen splitting method and electronic device
WO2021052279A1 (en) Foldable screen display method and electronic device
WO2021000804A1 (en) Display method and apparatus in locked state
WO2021063237A1 (en) Control method for electronic device, and electronic device
CN111758263A (en) Display method of flexible screen and terminal
CN112486363A (en) Cross-device content sharing method, electronic device and system
CN110825301A (en) Interface switching method and electronic equipment
WO2022042656A1 (en) Interface display method, and device
WO2021169399A1 (en) Method for caching application interface, and electronic apparatus
CN113553015B (en) Display method and electronic equipment
CN114089901B (en) Cross-device object dragging method and device
CN112130788A (en) Content sharing method and device
CN115187701A (en) Content editing method and terminal
CN113067940A (en) Method for presenting video by electronic equipment in incoming call and electronic equipment
WO2021190524A1 (en) Screenshot processing method, graphic user interface and terminal
CN114816294A (en) Display method and device
CN114840280A (en) Display method and electronic equipment
CN115657918A (en) Cross-device object dragging method and device
WO2022048453A1 (en) Unlocking method and electronic device
CN115016697A (en) Screen projection method, computer device, readable storage medium, and program product
WO2022206848A1 (en) Method and device for displaying application widget
WO2020228735A1 (en) Method for displaying application, and electronic device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant