WO2018032516A1 - 应用数据的共享方法、装置和终端设备 - Google Patents

应用数据的共享方法、装置和终端设备 Download PDF

Info

Publication number
WO2018032516A1
WO2018032516A1 PCT/CN2016/096100 CN2016096100W WO2018032516A1 WO 2018032516 A1 WO2018032516 A1 WO 2018032516A1 CN 2016096100 W CN2016096100 W CN 2016096100W WO 2018032516 A1 WO2018032516 A1 WO 2018032516A1
Authority
WO
WIPO (PCT)
Prior art keywords
application
data
control
interface
display
Prior art date
Application number
PCT/CN2016/096100
Other languages
English (en)
French (fr)
Inventor
李永德
郭乃荣
仲启强
Original Assignee
华为技术有限公司
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 华为技术有限公司 filed Critical 华为技术有限公司
Priority to PCT/CN2016/096100 priority Critical patent/WO2018032516A1/zh
Priority to CN201680087271.2A priority patent/CN109416652B/zh
Priority to PCT/CN2016/103883 priority patent/WO2018032612A1/zh
Publication of WO2018032516A1 publication Critical patent/WO2018032516A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/30Authentication, i.e. establishing the identity or authorisation of security principals
    • G06F21/44Program or device authentication

Definitions

  • the present invention relates to communication technologies, and in particular, to a method, an apparatus, and a terminal device for sharing application data.
  • APP applications
  • the chat content may include the user's personal information, itinerary information, picture information, etc. According to these chat contents, users can provide more and better services.
  • the user sends a message to a friend in WeChat "Tomorrow afternoon 3 o'clock to eat at Xinjiekou, you can create a schedule reminder for the user at 3 o'clock in the afternoon in the calendar app, or you can use Xinjiekou as a destination candidate in the map app, or you can In the group purchase APP recommendation, the food of Xinjiekou is recommended.
  • the content provider (ContentProvider) is used to implement data sharing between the two applications.
  • the application A and the application B are used as an example, and the application B needs to share the display data of the current interface of the application A.
  • B sends an application request to the operating system, where the request carries a first identifier (URI) of the Provider that the application B wants to share, and then the operating system according to the first URI in the application request and other applications previously recorded in the operating system
  • the declared URI is matched. Assuming that the first URI matches the URI of the Provider declared by the application A, the operating system indicates the operation to be performed by the application A and the returned data structure, and then the application A performs the operation and obtains the data of the corresponding data structure. , the data is returned to the operating system, and the data is transparently transmitted to the application B by the operating system.
  • the application data sharing method, device and terminal device provided by the embodiments of the present invention are used to solve the problem that the information monopoly and the information interoperability are poor due to the influence of the developer authorization limitation in the prior art, and the user experience is not good. High technical issues.
  • an embodiment of the present invention provides a method for sharing application data, including:
  • the display data of the first application on the current display interface is obtained according to the control on the current display interface of the first application, where the control is an interface element of the current display interface;
  • the method for sharing application data provided by the foregoing first aspect, when determining that the currently displayed first application is an application in a preset whitelist, acquiring the first application according to a control on a current display interface of the first application The display data on the interface is currently displayed, thereby determining whether to share the display data to the second application according to an authorized operation instruction input by the user.
  • the display data acquired by the terminal device by the data sharing unit is separated from the authorization limit of the first application, and thus the shared object of the display data of the first application on the current display interface is directly determined by the authorized operation instruction of the user. It is not limited to the authorization authority of the developer of the first application.
  • the obtaining, according to the control on the current display interface of the first application, the display data of the first application on the current display interface specifically includes:
  • the effective control is a control that carries data that meets a first preset condition;
  • the data attribute includes at least one of a length of the text in the control, a picture in the control occupies a size of the current interface, and an animation in the control occupies a size of the current interface;
  • the display data is acquired according to data of each of the valid controls.
  • the determining, according to the data attribute of each control on the current display interface of the first application, the effective control on the current display interface of the first application specifically includes:
  • the data attribute of the control is the length of the text in the control, and the length of the text in the control is greater than a preset first threshold, determining that the control is a valid control;
  • the data attribute of the control is that the picture in the control occupies the size of the current interface, and the picture in the control occupies the size of the current interface is greater than a preset second threshold, determining that the control is a valid control;
  • the data attribute of the control is the size of the current interface in the control, and the animation in the control occupies the size of the current interface is greater than a preset third threshold, determining that the control is a valid control;
  • the first preset condition includes that the text length of the data in the control is greater than the first threshold, the size of the current interface in the control is greater than the second threshold, and the animation in the control is occupied.
  • the size of the current interface is greater than any of the third thresholds.
  • the obtaining the display data according to the data of each of the valid controls includes:
  • the method is applicable to an Android operating system
  • the Android operating system includes an application framework layer integrated with a screen data sharing unit, and the screen data sharing unit provides a first application facing the first application a program API interface and a second API interface for the second application;
  • the screen data sharing unit acquires display data of the first application on the current display interface by using the first API interface according to the control on the current display interface of the first application;
  • the screen data sharing unit shares the display data to the second application through the second API interface.
  • the above various possible designs are provided by the method according to the first application currently displayed on the interface
  • the data property of the control determines the effective control on the current display interface of the first application, so as to obtain the display data of the current display interface of the first application according to the data of each valid control, the data acquisition manner can only be achieved by traversing the control Acquiring, the data acquisition method is simple and effective, and ensures that the data finally shared by the terminal device to the second application is data satisfying the first preset condition, that is, the data is ensured to meet the user's needs and can provide better service for the user.
  • Process data therefore, it greatly improves the user's experience, so that the interaction between the user and the terminal device is more intelligent; at the same time, according to the data integration mechanism of the second application, this embodiment will acquire each of the acquired The data of the effective control is integrated, and the integrated data is used as the display data of the first application on the current display interface, thereby greatly improving the effectiveness of the shared data, so that the second application can utilize the integrated display data better. Provide services to users.
  • the determining whether the currently displayed first application is an application in a preset whitelist includes:
  • Determining context information of the first application where the context information includes an identifier of the first application and a page identifier of a current display interface of the first application;
  • the first application is determined to be an application in the whitelist.
  • the method further includes:
  • the display data is data in JSON format, and the display data carries an identifier of the first application and/or a type of the first application.
  • the determining whether to share the display data to the second application according to the authorization operation instruction input by the user includes:
  • the user authorization interface is configured to receive an authorization operation instruction of the user
  • the authorized operation instruction is an authorization instruction, sharing the display data to the second application;
  • the authorized operation instruction is a prohibition instruction, prohibiting the second application to share the display number according to.
  • the method for sharing the application data provided by each of the foregoing possible designs, by determining the context information of the first application, and determining whether the identifier of the first application in the context information matches the identifier applied in the whitelist, and is in the first application.
  • the identifier of the application matches the identifier of the application, it is further determined whether the identifier of the page corresponding to the current display interface of the first application matches the identifier of the page of the application in the whitelist, and is in the identifier and whitelist of the second page.
  • the first application is determined to be an application in the whitelist, and the display data of the first application on the current display interface is obtained, thereby determining whether the data sharing is to be displayed according to the authorization operation instruction input by the user. Used for the second app.
  • the method traverses the display data of the first application acquired by the control on the current display interface by the data sharing unit, which does not require the first application to perform a corresponding operation, and thus the display data is separated from the authorization limit of the first application in the application layer.
  • the display data is independently present on the terminal device, and is not limited to the authorization authority of the developer of the first application.
  • the user can pass The corresponding authorization operation instruction shares the display data to any type of second application, thereby ensuring the openness of data sharing between any two applications, and the interconnection and intercommunication of data, thereby greatly improving the user experience.
  • an embodiment of the present invention provides a device for sharing application data, including: a determining module, a display module, an obtaining module, and a sharing module;
  • a determining module configured to determine whether the first application currently displayed by the display module is an application in a preset whitelist
  • An obtaining module configured to acquire, according to a control on a current display interface of the first application, the first application in a current display interface, when the determining module determines that the first application is an application in a preset whitelist Display data, the control is an interface element of the current display interface;
  • a sharing module configured to determine whether to share the display data to a second application according to an authorization operation instruction input by a user, where the authorization operation instruction includes indicating to share the display data to the second application And an authorization instruction for instructing prohibition of sharing the display data to the second application.
  • the acquiring module specifically includes:
  • a determining unit configured to determine, according to a data attribute of each control on the current display interface of the first application, a valid control on the current display interface of the first application; a control of data of a preset condition; the data attribute includes at least one of a text length in the control, a picture in the control occupies a size of a current interface, and an animation in the control occupies a size of a current interface;
  • an obtaining unit configured to acquire the display data according to data of each of the valid controls.
  • the determining unit is specifically configured to: when a data attribute of the control is a text length in the control, and a text length in the control is greater than a preset first threshold, determining The control is a valid control; or, when the data attribute of the control is the size of the current interface in the control, and the image in the control occupies the size of the current interface is greater than a preset second threshold, Determining that the control is a valid control; or, when the data attribute of the control is the size of the current interface in the control, and the animation in the control occupies the size of the current interface is greater than a preset third threshold Determining that the control is a valid control;
  • the first preset condition includes that the text length of the data in the control is greater than the first threshold, the size of the current interface in the control is greater than the second threshold, and the animation in the control is occupied.
  • the size of the current interface is greater than any of the third thresholds.
  • the obtaining unit is specifically configured to determine a data integration mechanism of the second application according to a type of the second application or registration information of the second application on an operating system, and Integrating data of all valid controls on the current display interface of the first application according to the data integration mechanism of the second application, and determining the integrated data as the display data; wherein the second application
  • the registration information carries the data integration mechanism of the second application.
  • the device is suitable for an Android operating system
  • the Android operating system includes an application framework layer integrated with a screen data sharing unit, and the screen data sharing unit provides a first application facing the first application a program API interface and a second API interface for the second application;
  • the screen data sharing unit acquires display data of the first application on the current display interface by using the first API interface according to the control on the current display interface of the first application;
  • the screen data sharing unit shares the display data to the second application through the second API interface.
  • the determining module is specifically configured to determine context information of the first application, where the context information includes an identifier of the first application and a page of a current display interface of the first application. And determining whether the identifier of the first application matches the identifier of the application in the whitelist; if the identifier of the first application is different from the identifier of the application in the whitelist And determining whether the page identifier of the current display interface of the first application matches the page identifier of the application in the whitelist; if yes, determining that the first application is an application in the whitelist.
  • the device further includes:
  • a storage module configured to cache the display data
  • a deleting module configured to delete the cached display data when the first application exits or closes.
  • the display data is data in JSON format, and the display data carries an identifier of the first application and/or a type of the first application.
  • the display module is further configured to display a user authorization interface, where the user authorization interface is configured to receive an authorized operation instruction of the user;
  • the sharing module is configured to share the display data to the second application when the authorized operation instruction is an authorization instruction; or prohibit the second application sharing when the authorization operation instruction is a prohibition instruction The display data.
  • an embodiment of the present invention provides a terminal device, including an input device, a display device, and a processor.
  • the processor is configured to determine whether the first application currently displayed by the display device is an application in a preset whitelist, and when the first application is an application in the whitelist, according to the first
  • the control on the current display interface of an application acquires display data of the first application on the current display interface, and the control is an interface element of the current display interface;
  • the input device is configured to receive an authorization operation instruction input by a user, where the authorization operation instruction includes an authorization instruction for indicating sharing the display data to the second application, and is used to indicate that the display data is prohibited from being shared. a prohibition instruction to the second application;
  • the processor is further configured to determine, according to the authorization operation instruction, whether to share the display data to a second application.
  • the processor is specifically configured to determine, according to data attributes of each control on the current display interface of the first application, effective control on the current display interface of the first application. And obtaining, according to data of each of the valid controls, the display data; wherein the valid control is a control carrying data that satisfies a first preset condition; the data attribute includes a text length in the control The picture in the control occupies at least one of a size of the current interface, and an animation in the control occupies a size of the current interface.
  • the processor is configured to determine, according to a data attribute of each control on the current display interface of the first application, a valid control on the current display interface of the first application, specifically:
  • the processor is specifically configured to: when the data attribute of the control is a text length in the control, and the text length in the control is greater than a preset first threshold, determine that the control is a valid control; or Determining that the control is a valid control when the data attribute of the control is that the picture in the control occupies a size of the current interface, and the picture in the control occupies a size of the current interface that is greater than a preset second threshold; Alternatively, when the data attribute of the control is the size of the current interface in the control, and the animation in the control occupies the size of the current interface is greater than a preset third threshold, determining that the control is a valid control ;
  • the first preset condition includes that the text length of the data in the control is greater than the first threshold, the size of the current interface in the control is greater than the second threshold, and the animation in the control is occupied.
  • the size of the current interface is greater than any of the third thresholds.
  • the processor is configured to acquire the display data according to data of each of the valid controls, and specifically includes:
  • the processor is specifically configured to determine, according to the type of the second application or the registration information of the second application on the operating system, a data integration mechanism of the second application, and according to the data of the second application.
  • An integration mechanism integrating data of all valid controls on the current display interface of the first application, and determining the integrated data as the display data; wherein the registration information of the second application carries the second Application data integration mechanism;
  • the terminal device is an Android operating system
  • the Android operating system includes an application framework layer integrated with a screen data sharing unit, and the screen data sharing unit provides a first application facing the first application.
  • the screen data sharing unit acquires display data of the first application on the current display interface by using the first API interface according to the control on the current display interface of the first application;
  • the screen data sharing unit shares the display data to the office through the second API interface Said second application.
  • the processor is configured to determine whether the currently displayed first application is an application in a preset whitelist, and specifically includes:
  • the processor is specifically configured to determine context information of the first application, where the context information includes an identifier of the first application and a page identifier of a current display interface of the first application; and determining the first Determining whether the identifier of the application matches the identifier of the application in the whitelist; if the identifier of the first application matches the identifier of the application in the whitelist, determining the page identifier of the current display interface of the first application Whether it matches the page identifier of the application in the whitelist; if it matches, determining that the first application is an application in the whitelist.
  • the processor is further configured to instruct the memory to cache the display data, and delete the cached display data when the first application is exited or closed.
  • the display data is data in JSON format, and the display data carries an identifier of the first application and/or a type of the first application.
  • the display device is further configured to display a user authorization interface, where the user authorization interface is configured to receive an authorized operation instruction of the user;
  • the processor is configured to: when the authorized operation instruction is an authorization instruction, share the display data to a second application; or, when the authorization operation instruction is a prohibition instruction, prohibit the second application
  • the display data is shared.
  • FIG. 1 is a schematic diagram of an application sharing scenario according to an embodiment of the present invention
  • FIG. 2 is a block diagram showing a hardware structure of a mobile phone according to an embodiment of the present invention
  • FIG. 3 is a structural block diagram of an Android operating system in the prior art according to an embodiment of the present invention.
  • FIG. 4 is a structural block diagram of an Android operating system according to an embodiment of the present invention.
  • FIG. 5 is a schematic flowchart of Embodiment 1 of a method for sharing application data according to an embodiment of the present disclosure
  • FIG. 6 is a schematic flowchart of Embodiment 2 of a method for sharing application data according to an embodiment of the present disclosure
  • FIG. 7 is a schematic flowchart of Embodiment 3 of a method for sharing application data according to an embodiment of the present disclosure
  • FIG. 8 is a schematic flowchart of Embodiment 4 of a method for sharing application data according to an embodiment of the present disclosure
  • FIG. 9 is a schematic diagram 1 of a user authorization interface according to an embodiment of the present invention.
  • FIG. 10 is a second schematic diagram of a user authorization interface according to an embodiment of the present invention.
  • FIG. 11 is a schematic structural diagram of Embodiment 1 of an application data sharing apparatus according to an embodiment of the present disclosure
  • FIG. 12 is a schematic structural diagram of Embodiment 2 of an application data sharing apparatus according to an embodiment of the present disclosure
  • FIG. 13 is a schematic structural diagram of Embodiment 3 of an application data sharing apparatus according to an embodiment of the present disclosure.
  • FIG. 14 is a schematic structural diagram of an embodiment of a terminal device according to an embodiment of the present invention.
  • the application data sharing method provided by the embodiment of the present invention can be applied to a scenario in which application data is shared between any two applications on the terminal device.
  • the application sharing scenario shown in FIG. 1 is used.
  • User-oriented, user-accessible application Application, referred to as APP.
  • the process data generated by the user when using the APP is generally very valuable to the user.
  • the chat content may include the user's personal information, itinerary information, picture information, etc., so some or all of the chat content may be shared with the third party application according to the chat content, for example, according to the user
  • the terminal device may include a mobile phone, a tablet computer, a PDA (Personal Digital Assistant), a POS (Point of Sales), an in-vehicle computer, and the like.
  • FIG. 2 is a block diagram showing a part of the structure of the mobile phone 100 related to the embodiment of the present invention.
  • the mobile phone 100 includes an RF (Radio Frequency) circuit 110, a memory 120, other input devices 130, a display 140, a sensor 150, an audio circuit 160, and an input/output (I/O).
  • Components such as system 170, processor 180, and power supply 190.
  • display 140 is a User Interface (UI) and that handset 100 may include a user interface that is smaller than shown or less.
  • UI User Interface
  • the components of the mobile phone 100 will be specifically described below with reference to FIG. 2:
  • the RF circuit 110 can be used for transmitting and receiving information or during a call, and receiving and transmitting the signal. Specifically, after receiving the downlink information of the base station, the processor 180 processes the data. In addition, the uplink data is designed to be sent to the base station.
  • RF circuits include, but are not limited to, an antenna, at least one amplifier, a transceiver, a coupler, an LNA (Low Noise Amplifier), a duplexer, and the like.
  • RF circuitry 110 can also communicate with the network and other devices via wireless communication.
  • the wireless communication may use any communication standard or protocol, including but not limited to GSM (Global System of Mobile communication), GPRS (General Packet Radio Service), CDMA (Code Division Multiple Access). , Code Division Multiple Access), WCDMA (Wideband Code Division Multiple Access), LTE (Long Term Evolution), e-mail, SMS (Short Messaging Service), and the like.
  • the memory 120 can be used to store software programs and modules, and the processor 180 is stored by running The software programs and modules of the memory 120 perform various functional applications and data processing of the handset 100.
  • the memory 120 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application required for at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may be stored. Data created according to the use of the mobile phone 100 (such as audio data, phone book, etc.).
  • memory 120 can include high speed random access memory, and can also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
  • Other input devices 130 can be used to receive input numeric or character information, as well as generate key signal inputs related to user settings and function controls of the handset 100.
  • other input devices 130 may include, but are not limited to, a physical keyboard, function keys (such as volume control buttons, switch buttons, etc.), trackballs, mice, joysticks, and light mice (the light mouse is not sensitive to display visual output).
  • function keys such as volume control buttons, switch buttons, etc.
  • trackballs mice, joysticks, and light mice (the light mouse is not sensitive to display visual output).
  • Other input devices 130 are coupled to other input device controllers 171 of I/O subsystem 170 for signal interaction with processor 180 under the control of other device input controllers 171.
  • the display screen 140 can be used to display information input by the user or information provided to the user as well as various menus of the mobile phone 100, and can also accept user input.
  • the display screen 140 may include a display panel 141 and a touch panel 142.
  • the display panel 141 can be configured by using an LCD (Liquid Crystal Display), an OLED (Organic Light-Emitting Diode), or the like.
  • the touch panel 142 also referred to as a touch screen, a touch sensitive screen, etc., can collect contact or non-contact operations on or near the user (eg, the user uses any suitable object or accessory such as a finger, a stylus, etc. on the touch panel 142.
  • the operation in the vicinity of the touch panel 142 may also include a somatosensory operation; the operation includes a single-point control operation, a multi-point control operation, and the like, and drives the corresponding connection device according to a preset program.
  • the touch panel 142 may include two parts: a touch detection device and a touch controller. Wherein, the touch detection device detects the touch orientation and posture of the user, and detects a signal brought by the touch operation, and transmits a signal to the touch controller; the touch controller receives the touch information from the touch detection device, and converts the signal into a processor. The processed information is sent to the processor 180 and can receive commands from the processor 180 and execute them.
  • the touch panel 142 can be implemented by using various types such as resistive, capacitive, infrared, and surface acoustic waves, and the touch panel 142 can be implemented by any technology developed in the future. Further, the touch panel 142 can cover the display panel 141, and the user can display the content according to the display panel 141.
  • the touch panel 142 detects an operation on or near it Transmitted to the processor 180 by the I/O subsystem 170 to determine user input, the processor 180 then provides a corresponding visual output on the display panel 141 via the I/O subsystem 170 in accordance with user input.
  • the touch panel 142 and the display panel 141 are two independent components to implement the input and input functions of the mobile phone 100, in some embodiments, the touch panel 142 and the display panel 141 may be Integration and implementation of the input and output functions of the handset 100.
  • the handset 100 can also include at least one type of sensor 150, such as a light sensor, motion sensor, and other sensors.
  • the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display panel 141 according to the brightness of the ambient light, and the proximity sensor may close the display panel 141 when the mobile phone 100 moves to the ear. / or backlight.
  • the accelerometer sensor can detect the magnitude of acceleration in all directions (usually three axes). When it is stationary, it can detect the magnitude and direction of gravity. It can be used to identify the gesture of the mobile phone (such as horizontal and vertical screen switching, related Game, magnetometer attitude calibration), vibration recognition related functions (such as pedometer, tapping), etc.
  • the mobile phone 100 can also be configured with gyroscopes, barometers, hygrometers, thermometers, infrared sensors and other sensors, here Let me repeat.
  • the audio circuit 160, the speaker 161, and the microphone 162 can provide an audio interface between the user and the handset 100.
  • the audio circuit 160 can transmit the converted audio data to the speaker 161 for conversion to the sound signal output by the speaker 161; on the other hand, the microphone 162 converts the collected sound signal into a signal, which is received by the audio circuit 160.
  • the audio data is converted to audio data, which is then output to the RF circuit 110 for transmission to, for example, another mobile phone, or the audio data is output to the memory 120 for further processing.
  • the I/O subsystem 170 is used to control external devices for input and output, and may include other device input controllers 171, sensor controllers 172, and display controllers 173.
  • one or more other input control device controllers 171 receive signals from other input devices 130 and/or send signals to other input devices 130.
  • Other input devices 130 may include physical buttons (press buttons, rocker buttons, etc.) , dial, slide switch, joystick, click wheel, light mouse (light mouse is a touch-sensitive surface that does not display visual output, or an extension of a touch-sensitive surface formed by a touch screen). It is worth noting that other input control device controllers 171 can be connected to any one or more of the above devices.
  • Display controller 173 in I/O subsystem 170 receives signals from display 140 and/or displays Screen 140 sends a signal. After the display 140 detects the user input, the display controller 173 converts the detected user input into an interaction with the user interface object displayed on the display screen 140, ie, implements human-computer interaction. Sensor controller 172 can receive signals from one or more sensors 150 and/or send signals to one or more sensors 150.
  • the processor 180 is the control center of the handset 100, connecting various portions of the entire handset with various interfaces and lines, by running or executing software programs and/or modules stored in the memory 120, and recalling data stored in the memory 120, The various functions and processing data of the mobile phone 100 are executed to perform overall monitoring of the mobile phone.
  • the processor 180 may include one or more processing units; preferably, the processor 180 may integrate an application processor and a modem processor, where the application processor mainly processes an operating system, a user interface, an application, and the like.
  • the modem processor primarily handles wireless communications. It can be understood that the above modem processor may not be integrated into the processor 180.
  • the handset 100 also includes a power source 190 (such as a battery) that supplies power to the various components.
  • a power source 190 such as a battery
  • the power source can be logically coupled to the processor 180 via a power management system to manage functions such as charging, discharging, and power consumption through the power management system.
  • the mobile phone 100 may further include a camera, a Bluetooth module, and the like, and details are not described herein.
  • FIG. 2 introduces the structural framework of the terminal device by using the mobile phone as an example, and the application data sharing method according to the embodiment of the present invention also relates to the software architecture of the terminal device.
  • the method according to the embodiment of the present invention can be applied to an operating system such as an Android system, an OS system, a Darwin system, an RTXC system, a Linux system, a Unix system, a Windows system, an embedded operating system such as VxWorks.
  • an operating system such as an Android system, an OS system, a Darwin system, an RTXC system, a Linux system, a Unix system, a Windows system, an embedded operating system such as VxWorks.
  • the system framework of the software operating system involved in the method of the embodiment of the present invention is described by taking the operating system as the Android system on the mobile phone as an example.
  • Android is an open source mobile operating system. As a mobile device platform, its hierarchy includes an operating system, middleware (Middle Ware) and applications (Application), as shown in Figure 3, the Android operating system. Divided into the following levels:
  • SDK Android Software Development Kit
  • the operating system itself also includes some basic applications, such as SMS, phone, photo viewer, web browser and other system level. application.
  • Android's application framework layer provides various application programming interfaces (APIs) for the application layer. It contains various controls required in the User Interface (UI) program, for example: Views (views) Components) include TextView, ListView, Buttons, WebView (Web Browser Control)
  • APIs application programming interfaces
  • This layer includes two parts: various libraries and runtime environment.
  • the various libraries are mainly C library, multimedia library, graphics processing engine, etc.
  • the runtime environment is mainly Dalvik virtual machine, which is different from the standard JAVA virtual machine.
  • the .dex file is a virtual machine that has been tailored and optimized for mobile devices.
  • Linux kernel development is based on the Linux kernel development, and its core system services, memory management, process management, network protocols and drivers all depend on the Linux kernel.
  • Linux kernel layer is the hardware layer of the phone described in Figure 2.
  • FIG. 2 and Figure 3 above illustrate the architecture of the terminal device from the perspective of hardware and software.
  • the application B when any two applications on the terminal device (assume that the application A and the application B) are sharing application data, the application B must obtain the authorization of the application A to share the data of the application A, but the actual The situation is that for the sake of commercial interests, each application developer generally does not share its own data with other applications, resulting in information monopoly, poor information interoperability, and low user experience.
  • the application data sharing method, device, and terminal device provided by the embodiments of the present invention are intended to solve the problem that the information monopoly and the information interoperability are poor due to the influence of the developer authorization limitation in the prior art, and the user experience is Not a high technical problem.
  • the Android system is taken as an example, and the embodiment of the present invention adds screen data in the Framework layer of the Android operating system based on the Android operating system architecture level shown in FIG. 3 above.
  • Screen Data Share hereinafter referred to as the data sharing unit. It provides two API interfaces for the display system (View System) and third-party applications (such as the schedule, map APP, group purchase APP, etc. involved in the above examples).
  • the display framework passes the control tree of the currently displayed application (the control tree includes a collection of parent controls and child controls of the current display interface of the application) to the data sharing unit through one of the API interfaces, and the data sharing unit acquires the data according to the control tree.
  • the application data of the current display interface is applied to share the application data to the third-party application through another API interface.
  • the executor of the method embodiment may be a terminal device, or may be a sharing device of application data integrated in the terminal device, and the device may be implemented by software, hardware, or a combination of software and hardware.
  • the following method embodiment is described by taking an execution subject as a terminal device as an example.
  • FIG. 5 is a schematic flowchart of Embodiment 1 of a method for sharing application data according to an embodiment of the present invention.
  • the embodiment relates to the display data of the current display interface of the first application that the terminal device matches the preset white list, and determines whether to share the display data to other third-party applications according to the authorization instruction of the user. process.
  • the method includes the following steps:
  • S101 Determine whether the currently displayed first application is an application in a preset whitelist.
  • the terminal device determines whether the first application matches the attribute information of the application in the preset whitelist.
  • the application in the whitelist may be an application that is set by the developer according to the development experience or the corresponding threshold.
  • the display interface of the application includes data that can provide better service for the user.
  • the application in the whitelist is also It can be a third-party application (ie, an application that wants to share display data of other applications) to inform the operating system which application application data is intended to be shared by itself, and such third-party application can also be notified to the operating system application.
  • the whitelist may include an identifier of the application, a type of the application, an identifier of a page that carries data in the application, and the like.
  • the terminal device may The control on the current display interface of the first application obtains the display data of the first application on the current display interface, and the control is an interface element of the current application interface of the source application.
  • the first application is WeChat
  • the current display interface is The chat interface of the WeChat
  • the text content, the image or the time in the chat interface as a whole the chat interface is the control of the chat interface.
  • the embodiment of the present invention passes Obtained in FIG.
  • the screen data sharing unit provides a first API interface facing the first application and a second API interface facing the second application, located on the application framework layer
  • the display system transmits the obtained control of the first application in the current display interface to the screen data sharing unit through the first API interface, and the screen data sharing unit can obtain the first application in the current display interface by traversing the control on the current display interface.
  • the display data may be all the data displayed on the current display interface of the first application, and may be part of the data that is filtered by the terminal device to display all the data displayed on the current display interface of the first application. This is not a limitation.
  • the display data of the first application on the current display interface is obtained, which does not require the first application to perform the corresponding operation, and thus the display data is separated from the authorization limit of the first application in the application layer.
  • the display data is independently present on the terminal device, and when the display data is shared to other applications, it is not necessary to consider whether the developer of the first application is authorized.
  • S103 Determine whether to share the display data to the second application according to an authorization operation instruction input by the user.
  • the authorization operation instruction includes an authorization instruction for indicating sharing of the display data to the second application and a prohibition instruction for instructing the sharing of the display data to the second application.
  • the authorization operation instruction includes indicating the display data.
  • the display data on the display interface is shared to the second application, and the second application may be any type of application except the first application on the terminal device.
  • the embodiment of the present invention does not limit the type of the second application.
  • the second API interface for the third-party application ie, the second application
  • the application can support the third-party application to actively query the current display data, and can also support the third-party application.
  • the application subscribes to the current display data, that is, when the terminal obtains the display data of the first application, it determines whether to share to the third-party application according to the authorized operation instruction of the user, and there is no possibility of sharing to other third-party applications.
  • the terminal device acquires the display of the first application on the current display interface After the data, the acquired display data is equivalent to being free from the first application and is not restricted by the first application, and is owned by the terminal device, and thus the shared object of the display data may be authorized by the user to operate the instruction, which is not limited to the first Authorization authority of an application developer, therefore, as long as the user decides to share the display data of the first application on the current display interface, the user can share the display data to any type of second application through a corresponding authorization operation instruction. This ensures the openness of data sharing between any two applications, as well as the interconnection of data, greatly improving the user experience.
  • the application data sharing method obtaineds the first application in the current application according to the control on the current display interface of the first application when determining that the currently displayed first application is an application in the preset white list. Display data on the display interface to determine whether to share the display data for use by the second application according to an authorized operation instruction input by the user.
  • the display data acquired by the terminal device by the data sharing unit is separated from the authorization limit of the first application, and thus the shared object of the display data of the first application on the current display interface is directly determined by the authorized operation instruction of the user. It is not limited to the authorization authority of the developer of the first application.
  • FIG. 6 is a schematic flowchart of Embodiment 2 of a method for sharing application data according to an embodiment of the present invention.
  • the embodiment relates to a specific process of the terminal device acquiring the display data of the first application on the current display interface according to the valid email of the first application on the current display interface.
  • the foregoing S102 may specifically include the following steps:
  • S201 Determine, according to the data attribute of each control on the current display interface of the first application, a valid control on the current display interface of the first application.
  • the valid control is a control that carries data that satisfies a first preset condition; the data attribute includes a text length in the control, a picture in the control occupies a size of a current interface, and an animation in the control At least one of the size of the current interface;
  • the UI interface of each application on the terminal device involves various controls, such as a TextView, a ListView, a Buttons, a WebView, and these controls. Subclasses, etc., each with a corresponding type of number according to.
  • the terminal device may acquire the control set corresponding to the first application (for the acquisition manner, refer to the prior art, and details are not described herein again), the control set includes the first Applying all the controls on the current display interface; optionally, the control set may be a control tree corresponding to the first application, the control tree includes a parent control and various child controls, for example, if the first application is WeChat, the current display interface For the chat interface of WeChat, the chat interface is a parent control as a whole, and the text content, image or time in the chat interface is a child control. For example, if an expression image is inserted into the text content, the expression image is a child control. Child control.
  • the terminal device traverses all the controls in the control set to determine which controls carry the data that meets the first preset condition, so that the carried meets the first preset.
  • the control of the conditional data is determined to be a valid control.
  • Common examples of carrying user data can be found in the following example of Table 1:
  • Control name data 1 Text control TextView text 2 Text editing control EditText text 3 Image control ImageView image 4 Web page control WebView Web page
  • control itself will carry its own data acquisition method.
  • the text control can obtain the data on the file control through getText().
  • the methods for obtaining data for common controls are shown in the following Table 2:
  • the above URL is a Uniform Resource Locator (URL).
  • the terminal device acquires the data on each control through the method of acquiring data carried by each control itself, and then determines whether the data carried on the control satisfies the data according to the data attribute of the data of each first control.
  • a preset condition if satisfied, the terminal device determines that the control is The control determines the valid controls on the current display interface of the first application, and the first preset condition is a condition preset by the developer regarding whether the data on the control is valuable to the user.
  • the foregoing data attribute may include at least one of a text length of the data in the control, a picture in the control occupies a size of the current interface, and an animation in the control occupies at least one of a size of the current interface, and may be broken
  • the first preset The condition may be: the text length of the data in the control is greater than the first threshold, the size of the picture in the control is greater than the second threshold, and the size of the current interface in the control is greater than the current interface. Any one of the third thresholds.
  • the terminal device determines, according to the data attribute of the data of each control, in combination with the first preset condition, the valid control in the control set corresponding to the first application, which may be: if the data attribute of the data of the control is the control The length of the text in the data, and the length of the text in the first control is greater than the preset first threshold, determining that the control is a valid control; or, if the data attribute of the control data is the image in the control occupying the current interface The size, and the image in the control accounts for the size of the current interface is greater than the preset second threshold, then the control is determined to be a valid control; or, if the data property of the control data is the size of the current interface in the control, And the animation in the control accounts for the size of the current interface is greater than the preset third threshold, then the control is determined to be a valid control.
  • S202 Acquire the display data according to data of each of the valid controls.
  • the terminal device can directly use the data collection on each valid control as the display data, and can also perform corresponding integration on the data on each control, and use the integrated data as the display data, and the integration method can be specifically Referring to the third embodiment shown in FIG. 7, as shown in FIG. 7, the method may specifically include the following steps:
  • S301 Determine a data integration mechanism of the second application according to the type of the second application or the registration information of the second application on the operating system, where the registration information of the second application carries the second The data integration mechanism of the application.
  • each second application when it is required to share the display data of the currently displayed first application, is registered in the operating system in advance, thereby sending its own registration information to the operating system, where the registration information carries the second application.
  • the data integration mechanism is designed to inform the operating system of the form or type of data it needs.
  • the terminal device can know the data integration mechanism of each second application based on the operating system.
  • the terminal device may further determine data of the second application according to the type of the second application.
  • the integration mechanism, the type of the second application may include any one of a chat application, a shopping application, a express application, a video application, and a music application.
  • S302 Integrate data of all valid controls on the current display interface of the first application according to the data integration mechanism of the second application, and determine the integrated data as the display data.
  • the terminal device After the terminal device obtains the display data of the first application on the current display interface, and further determines which one or several second applications are to be shared, the terminal device performs a data integration mechanism according to the second application. And integrating data of all valid controls on the current display interface of the first application, and determining the integrated data as the display data. For example, it is assumed that the first application currently displayed is WeChat, and the current display interface is a WeChat chat interface, where the nickname, the conversation content, and the time are displayed in three different effective controls.
  • the first application is The data integration mechanism of the second application is ⁇ sender nickname, receiver nickname, message content, timestamp ⁇ , so the terminal device can output the contents of the three valid controls in the first application as a whole, as a dialog, format It is: ⁇ sender nickname, receiver nickname, message content, timestamp ⁇ , and further can integrate multiple conversations into one session in chronological order.
  • the integrated data can be used as the display data of the first application on the current display interface, thereby greatly improving the validity of the shared data, so that the second application can better provide the user with the integrated display data. service.
  • the current display interface changes at any time, so the data on the current display interface also changes according to the interface change. Therefore, the terminal device obtains the first application at the current time.
  • the display data may be cached, and when the user exits the first application or closes the first application, the cached display data is deleted, thereby greatly improving data security and avoiding current The display interface changes and the display data is lost.
  • the display data may be set to data in a JSON format, where the display data carries the identifier of the first application and/or the type of the first application. .
  • the application data sharing method determines the effective control on the current display interface of the first application according to the data attribute of each control on the current display interface of the first application, thereby acquiring according to the data of each valid control.
  • the display data of the current display interface of the first application, the number According to the manner of obtaining the traversal of the control, the data acquisition method is simple and effective, and the data finally shared by the terminal device to the second application is the data satisfying the first preset condition, that is, the data is ensured to satisfy the user.
  • the data integration mechanism integrates the data of each valid control obtained, and uses the integrated data as the display data of the first application on the current display interface, thereby greatly improving the validity of the shared data, so that the second The application can use the integrated display data to better serve the user.
  • FIG. 8 is a schematic flowchart of Embodiment 4 of a method for sharing application data according to an embodiment of the present invention.
  • the embodiment relates to the display data of the current display interface of the first application acquired by the terminal device according to the foregoing embodiments, and determining whether to share the display data to the second application according to the authorization instruction of the user. the process of.
  • the application in the whitelist is an application that meets the foregoing first preset condition
  • the attribute information of the application in the whitelist includes an identifier of the application, an identifier of a page of the application, and is carried in the page.
  • the data satisfies the first preset condition (that is, the data carried in the page may be data valuable to the user).
  • the method may include the following steps:
  • S401 Determine context information of the first application, where the context information includes an identifier of the first application and a page identifier of a current display interface of the first application.
  • the terminal device may obtain the context information of the first application from the control set corresponding to the first application, and obtain the context information of the first application by using the operating system.
  • the context information includes an identifier of the first application and a page identifier of a current display interface of the first application.
  • the context information may further include a type of the first application.
  • S402 Determine whether the identifier of the first application matches the identifier of the application in the whitelist.
  • the whitelist includes an identifier of an application that satisfies the first preset condition and an identifier of a page that displays data that is valuable to the user in the application.
  • the whitelist may further include the first The type of application for which the condition is preset.
  • the developer can filter and classify the mainstream applications in the application market according to the first preset condition, and sort out a white list.
  • developers can classify applications in the application market into the following categories, as shown in the example in Table 3:
  • the terminal device After the terminal device obtains the context information of the first application, the terminal device matches the identifier of the first application in the context information with the identifier of each application in the whitelist. If the matching is performed, the following S403 is performed.
  • S403 If the identifier of the first application matches the identifier of the application in the whitelist, determine whether the page identifier of the current display interface of the first application matches the identifier of the page of the application in the whitelist.
  • the terminal device determines that the first application is an application in the whitelist, and then performs S405 described below.
  • S405 Acquire, according to a control on the current display interface of the first application, display data of the first application on the current display interface.
  • the terminal device determines that the first application matches the application in the whitelist
  • the display data of the first application on the current display interface is obtained.
  • the specific acquisition process refer to the description in the foregoing Embodiment 1 to Embodiment 3, where No longer.
  • S406 Display a user authorization interface, where the user authorization interface is used to receive an authorization operation instruction of the user.
  • the terminal displays a user authorization interface to the user, prompting the user to input a corresponding authorization operation instruction, thereby
  • the display data of the first application current display interface is shared to the second application.
  • the user authorization operation instruction in the embodiment of the present invention includes instructions for indicating that the display data is common
  • An authorization instruction for the second application and a prohibition instruction for instructing sharing of the display data to the second application are prohibited.
  • the user authorization interface shown in FIG. 9. may be suspended on the current display interface, and may also be displayed in a message notification column. The user may pull down the notification bar to view the user authorization interface, and FIG.
  • the user authorization interface may include two options, one option for receiving an authorization command of the user, and another option for receiving a prohibition instruction of the user; optionally, the user authorization interface may also be a voice.
  • Authorization interface the interface displays a voice input control, the user operates the voice input control to input a corresponding voice instruction, to input a corresponding authorization or prohibition instruction to the terminal, as shown in FIG. 10, of course, FIG. 10 is only a user authorization.
  • An example of an interface. The embodiment of the present invention does not limit the form of the user authorization interface and the manner in which the user inputs the authorization operation instruction.
  • the application data sharing method determines the context information of the first application by using the context information of the first application, and determines whether the identifier of the first application in the context information matches the identifier applied in the whitelist, and is in the first application.
  • the identifier matches the identifier of the application, it is further determined whether the identifier of the page corresponding to the current display interface of the first application matches the identifier of the page of the application in the whitelist, and the identifier of the second page and the whitelist are When the identifier of the page of the application matches, the first application is determined to be an application in the whitelist, and the display data of the first application on the current display interface is obtained, thereby determining whether to share the display data according to the authorization operation instruction input by the user.
  • the second application is used.
  • the method of the embodiment of the present invention traverses the display data of the first application acquired by the control on the current display interface by the data sharing unit, which does not require the first application to perform a corresponding operation, and thus the display data is separated from the first in the application layer.
  • the authorization limit of the application, the display data is independently existed on the terminal device, and is not limited to the authorization authority of the developer of the first application, therefore, as long as the user decides to share the display data of the first application on the current display interface
  • the user can share the display data to any type of second application through the corresponding authorization operation instruction, thereby ensuring the openness of data sharing between any two applications, and the interconnection and intercommunication of data, thereby greatly improving the user's Experience.
  • the foregoing program may be stored in a computer readable storage medium, and when executed, the program includes the steps of the foregoing method embodiment; and the foregoing storage medium includes: ROM, RAM A variety of media that can store program code, such as a disk or a disc.
  • FIG. 11 is a schematic structural diagram of Embodiment 1 of an application data sharing apparatus according to an embodiment of the present invention.
  • the sharing device may be a stand-alone terminal device, or may be a device integrated in the terminal device, and the device may be implemented by software, hardware or a combination of software and hardware.
  • the sharing device of the application data includes: a determining module 10, a display module 13, an obtaining module 11, and a sharing module 12.
  • the determining module 10 is configured to determine whether the first application currently displayed by the display module 13 is an application in a preset whitelist
  • the obtaining module 11 is configured to: when the determining module 10 determines that the first application is an application in a preset whitelist, acquire the first application according to a control on a current display interface of the first application Displaying display data on the interface, where the control is an interface element of the current display interface;
  • a sharing module 12 configured to determine, according to an authorized operation instruction input by a user, whether to share the display data to a second application, wherein the authorization operation instruction includes indicating to share the display data to the second An authorization instruction of the application and a prohibition instruction for instructing the sharing of the display data to the second application.
  • the device for sharing the application data provided in the embodiment of the present invention may perform the foregoing method embodiments, and the implementation principle and technical effects are similar, and details are not described herein again.
  • FIG. 12 is a schematic structural diagram of Embodiment 2 of an application data sharing apparatus according to an embodiment of the present disclosure.
  • the acquiring module 11 further includes:
  • the determining unit 111 is configured to determine, according to the data attribute of each control on the current display interface of the first application, a valid control on the current display interface of the first application; the effective control is to carry the first preset condition a control of the data; the data attribute includes at least one of a length of the text in the control, a picture in the control occupies a size of the current interface, and an animation in the control occupies a size of the current interface;
  • the obtaining unit 112 is configured to acquire the display data according to data of each of the valid controls.
  • the determining unit 111 is specifically configured to: when a data attribute of the control is a text length in the control, and a text length in the control is greater than a preset first threshold, determine The control is a valid control; or, when the data attribute of the control is the size of the current interface in the control, and the image in the control occupies the size of the current interface is greater than a preset second threshold, Determining that the control is a valid control; or, when the data attribute of the control is the size of the current interface in the control, and the animation in the control occupies the size of the current interface is greater than a preset third threshold Determining that the control is a valid control;
  • the first preset condition includes that the text length of the data in the control is greater than the first threshold, the size of the current interface in the control is greater than the second threshold, and the animation in the control is occupied.
  • the size of the current interface is greater than any of the third thresholds.
  • the obtaining unit 112 is specifically configured to determine, according to the type of the second application or the registration information of the second application on the operating system, a data integration mechanism of the second application, and according to the a data integration mechanism of the application, integrating data of all valid controls on the current display interface of the first application, and determining the integrated data as the display data; wherein the registration information of the second application is carried The data integration mechanism of the second application.
  • the device for sharing the application data provided in the embodiment of the present invention may perform the foregoing method embodiments, and the implementation principle and technical effects are similar, and details are not described herein again.
  • the apparatus is applicable to an Android operating system, the Android operating system including an application framework layer of an integrated screen data sharing unit, the screen data sharing unit providing a first application API interface facing the first application and a second API interface for the second application;
  • the screen data sharing unit acquires display data of the first application on the current display interface by using the first API interface according to the control on the current display interface of the first application;
  • the screen data sharing unit shares the display data to the second application through the second API interface.
  • the determining module 10 is specifically configured to determine context information of the first application, where the context information includes an identifier of the first application and a page identifier of a current display interface of the first application; Determining whether the identifier of the first application matches the identifier of the application in the whitelist; if the identifier of the first application matches the identifier of the application in the whitelist, determining the identifier of the first application Whether the page identifier of the current display interface matches the page identifier of the application in the whitelist; if yes, the first application is determined to be an application in the whitelist.
  • FIG. 13 is a schematic structural diagram of Embodiment 3 of the application device sharing device. Further, the device may further include: a storage module 14, Module 15 is deleted. a storage module 14 configured to cache the display data;
  • the deletion module 15 is configured to delete the cached display data when the first application is exited or closed; the display data is data in a JSON format, and the display data carries the identifier of the first application and/or Or the type of the first application.
  • the display module 13 is further configured to display a user authorization interface, where the user authorization interface is configured to receive an authorized operation instruction of the user;
  • the sharing module 12 is configured to share the display data to the second application when the authorized operation instruction is an authorization instruction; or prohibit the second application when the authorization operation instruction is a prohibition instruction
  • the display data is shared.
  • the device for sharing the application data provided in the embodiment of the present invention may perform the foregoing method embodiments, and the implementation principle and technical effects are similar, and details are not described herein again.
  • FIG. 14 is a schematic structural diagram of an embodiment of a terminal device according to an embodiment of the present invention.
  • the terminal may include a processor 20, such as a CPU, a memory 21, at least one communication bus 22, a display device 23, and an input device 24.
  • Communication bus 22 is used to implement a communication connection between components.
  • the memory 21 may include a high speed RAM memory, and may also include a nonvolatile memory NVM, such as at least one disk memory, in which various programs may be stored for performing various processing functions and implementing the method steps of the present embodiment;
  • the input device 24 is configured to provide an input interface to a user, receive an operation or instruction input by the user, and the like.
  • the processor 20 is configured to determine whether the first application currently displayed by the display device 23 is an application in a preset whitelist, and in the whitelist in the first application. And obtaining, by the control on the current display interface of the first application, display data of the first application on the current display interface, where the control is an interface element of the current display interface;
  • the input device 24 is configured to receive an authorization operation instruction input by a user, where the authorization operation instruction includes an authorization instruction for indicating sharing the display data to the second application, and for indicating that the display data is prohibited from being used. a prohibition instruction shared to the second application;
  • the processor 20 is further configured to determine, according to the authorization operation instruction, whether to share the display data to a second application.
  • the terminal device provided by the embodiment of the present invention may perform the foregoing method embodiments, and the implementation principles and technical effects thereof are similar, and details are not described herein again.
  • the processor 20 is specifically configured to determine, according to a data attribute of each control on the current display interface of the first application, a valid control on the current display interface of the first application, and valid according to each The data of the control is obtained by acquiring the display data; wherein the valid control is a control that carries data that satisfies a first preset condition; the data attribute includes a length of text in the control, and a picture in the control occupies a current The size of the interface, the animation in the control, and at least one of the size of the current interface.
  • the processor 20 is configured to determine, according to a data attribute of each control on the current display interface of the first application, a valid control on the current display interface of the first application, specifically:
  • the processor 20 is configured to determine that the control is a valid control when a data attribute of the control is a text length in the control, and a text length in the control is greater than a preset first threshold; Or determining that the control is a valid control when the data attribute of the control is that the picture in the control occupies the size of the current interface, and the picture in the control occupies a size of the current interface that is greater than a preset second threshold. Or, when the data attribute of the control is the size of the current interface in the control, and the animation in the control occupies the size of the current interface is greater than a preset third threshold, determining that the control is valid Control
  • the first preset condition includes that the text length of the data in the control is greater than the first threshold, the size of the current interface in the control is greater than the second threshold, and the animation in the control is occupied.
  • the size of the current interface is greater than any of the third thresholds.
  • the processor 20 is configured to obtain the display data according to the data of each of the valid controls, and specifically includes:
  • the processor 20 is configured to determine a data integration mechanism of the second application according to the type of the second application or the registration information of the second application on the operating system, and according to the second application a data integration mechanism, integrating data of all valid controls on the current display interface of the first application, and determining the integrated data as the display data; wherein the registration information of the second application carries the Second application data integration mechanism;
  • the terminal device is an Android operating system
  • the Android operating system includes an application framework layer integrated with a screen data sharing unit, and the screen data sharing unit provides a first application API interface facing the first application and a second API interface for the second application;
  • the screen data sharing unit acquires display data of the first application on the current display interface by using the first API interface according to the control on the current display interface of the first application;
  • the screen data sharing unit shares the display data to the second application through the second API interface.
  • the processor 20 is configured to determine whether the currently displayed first application is an application in a preset whitelist, and specifically includes:
  • the processor 20 is specifically configured to determine context information of the first application, where the context information includes an identifier of the first application and a page identifier of a current display interface of the first application; and determining the Determining whether the identifier of an application matches the identifier of the application in the whitelist; if the identifier of the first application matches the identifier of the application in the whitelist, determining a page of the current display interface of the first application Whether the identifier matches the page identifier of the application in the whitelist; if the identifier is matched, determining that the first application is an application in the whitelist.
  • the processor 20 is further configured to instruct the memory 21 to cache the display data, and delete the cached display data when the first application is exited or closed.
  • the display data is data in a JSON format, and the display data carries an identifier of the first application and/or a type of the first application.
  • the display device 23 is further configured to display a user authorization interface, where the user authorization interface is configured to receive an authorization operation instruction of the user;
  • the processor 20 is configured to: when the authorized operation instruction is an authorization instruction, share the display data to a second application; or, when the authorization operation instruction is a prohibition instruction, prohibit the second The application shares the display data.
  • the terminal device provided by the embodiment of the present invention may perform the foregoing method embodiments, and the implementation principles and technical effects thereof are similar, and details are not described herein again.

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • User Interface Of Digital Computer (AREA)
  • Telephone Function (AREA)

Abstract

本发明实施例提供一种应用数据的共享方法、装置和终端设备。该方法包括:在判断当前显示的第一应用为白名单中的应用时,根据第一应用当前显示界面上的控件获取显示数据,并根据用户输入的授权操作指令确定是否将显示数据共享给第二应用使用,该显示数据的共享并不受限于第一应用的授权权限,大大提高了用户的体验。

Description

应用数据的共享方法、装置和终端设备 技术领域
本发明涉及通信技术,尤其涉及一种应用数据的共享方法、装置和终端设备。
背景技术
随着移动设备的不断发展,各式各样的应用程序(Application,简称APP)出现在移动设备上,为用户的生活提供方便和娱乐。以安卓系统的移动设备为例,其通过APP完成某个特定功能,用户在使用APP时就会产生过程数据,而这些数据对用户是很有价值的,例如,用户在微信中和朋友聊天,聊天内容可能包含了用户的个人信息、行程信息、图片信息等,根据这些聊天内容其实可以为用户提供更多、更好的服务,比如用户在微信中对某个朋友发送了一条消息“明天下午3点在新街口吃饭”,可以在日程APP中为用户创建一个明天下午3点的日程提醒,或者,可以在地图APP中把新街口作为目的地的候选项,再或者,还可以在团购APP推荐中把新街口的美食作为推荐项。
现有技术中采用内容提供方(ContentProvider)的方式实现两个应用之间的数据共享,具体可以为:以应用A和应用B为例,假设应用B需要共享应用A当前界面的显示数据,应用B向操作系统发送一申请请求,该请求中携带应用B想要共享的Provider的第一标识符(URI),然后操作系统根据该申请请求中第一URI和操作系统中之前记录的其他应用事先申明的URI进行匹配,假设第一URI与应用A申明的Provider的URI匹配,则操作系统指示应用A所要执行的操作和返回的数据结构,然后应用A执行该操作并获得相应数据结构的数据后,将数据返回给操作系统,由操作系统将数据透传给应用B。
但是,现有技术的这种应用间数据共享的方式,应用B必须要得到应用A的授权才能共享应用A的数据,而实际情况是各个应用开发商出于商业利益的考虑,一般都不会把各自的数据共享给其他应用使用,从而造成了信息垄断,信息的互联互通性较差,用户体验度不高。
发明内容
本发明实施例提供的应用数据的共享方法、装置和终端设备,用以解决现有技术中应用之间因开发商授权限制的影响导致信息垄断、信息的互联互通性较差,用户体验度不高的技术问题。
第一方面,本发明实施例提供一种应用数据的共享方法,包括:
判断当前显示的第一应用是否为预设的白名单中的应用;
若是,则根据所述第一应用的当前显示界面上的控件获取所述第一应用在当前显示界面上的显示数据,所述控件为所述当前显示界面的界面元素;
根据用户输入的授权操作指令,确定是否将所述显示数据共享给第二应用使用;其中,所述授权操作指令包括用于指示将所述显示数据共享给所述第二应用的授权指令和用于指示禁止将所述显示数据共享给所述第二应用的禁止指令。
上述第一方面所提供的应用数据的共享方法,通过在判断当前显示的第一应用为预设的白名单中的应用时,根据第一应用的当前显示界面上的控件获取该第一应用在当前显示界面上的显示数据,从而根据用户输入的授权操作指令,确定是否将所述显示数据共享给第二应用使用。本发明实施例的方法,终端设备通过数据共享单元所获取的显示数据脱离第一应用的授权限制,因而第一应用在当前显示界面上的显示数据的共享对象由用户的授权操作指令直接决定,其并不受限于第一应用的开发商的授权权限,因此,只要用户决定将第一应用在当前显示界面上的显示数据进行共享,用户就可以通过相应的授权操作指令将该显示数据共享至任意类型的第二应用,这样保证了任意两个应用之间进行数据共享的开放性,以及数据的互联互通,大大提高了用户的体验。
在一种可能的设计中,所述根据所述第一应用的当前显示界面上的控件获取所述第一应用在当前显示界面上的显示数据,具体包括:
根据所述第一应用当前显示界面上每个控件的数据属性,确定所述第一应用当前显示界面上的有效控件;所述有效控件为携带满足第一预设条件的数据的控件;所述数据属性包括所述控件中的文本长度、所述控件中的图片占当前界面的大小、所述控件中的动画占当前界面的大小中的至少一个;
根据每个所述有效控件的数据,获取所述显示数据。
在一种可能的设计中,所述根据所述第一应用当前显示界面上每个控件的数据属性,确定所述第一应用当前显示界面上的有效控件,具体包括:
若所述控件的数据属性为所述控件中的文本长度,且所述控件中的文本长度大于预设的第一阈值,则确定所述控件为有效控件;
或者,
若所述控件的数据属性为所述控件中的图片占当前界面的大小,且所述控件中的图片占当前界面的大小大于预设的第二阈值,则确定所述控件为有效控件;
或者,
若所述控件的数据属性为所述控件中的动画占当前界面的大小,且所述控件中的动画占当前界面的大小大于预设的第三阈值,则确定所述控件为有效控件;
其中,所述第一预设条件包括所述控件中数据的文本长度大于所述第一阈值、所述控件中的图片占当前界面的大小大于所述第二阈值、所述控件中的动画占当前界面的大小大于所述第三阈值中的任一个。
在一种可能的设计中,所述根据每个所述有效控件的数据,获取所述显示数据,具体包括:
根据所述第二应用的类型或者所述第二应用在操作系统上的注册信息,确定所述第二应用的数据整合机制;其中,所述第二应用的注册信息携带所述第二应用的数据整合机制;
根据所述第二应用的数据整合机制,对所述第一应用当前显示界面上的所有有效控件的数据进行整合,并将整合后的数据确定为所述显示数据。
在一种可能的设计中,所述方法适用于安卓操作系统,所述安卓操作系统包括集成屏幕数据共享单元的应用框架层,所述屏幕数据共享单元提供面向所述第一应用的第一应用程序API接口和面向第二应用的第二API接口;
所述屏幕数据共享单元根据所述第一应用的当前显示界面上的控件,通过所述第一API接口获取所述第一应用在当前显示界面上的显示数据;
所述屏幕数据共享单元通过所述第二API接口将所述显示数据共享给所述第二应用。
上述各可能的设计所提供的方法,通过根据第一应用当前显示界面上每 个控件的数据属性,确定第一应用当前显示界面上的有效控件,从而根据每个有效控件的数据,获取第一应用当前显示界面的显示数据,该数据获取方式仅通过遍历控件的方式就可以获取,数据获取方式简单有效,并且确保了终端设备最终共享给第二应用的数据为满足第一预设条件的数据,即确保了该数据为满足用户需求、能够为用户提供更好的服务的过程数据,因此,其很大程度上提高了用户的体验效果,使得用户与终端设备之间的交互更加智能化;同时,本实施例根据第二应用的数据整合机制,将所获取的每个有效控件的数据进行整合,并将整合后的数据作为第一应用在当前显示界面上的显示数据,从而大大提高了共享数据的有效性,使得第二应用能够利用该整合后的显示数据更好的为用户提供服务。
在一种可能的设计中,所述判断当前显示的第一应用是否为预设的白名单中的应用,具体包括:
确定所述第一应用的上下文信息,所述上下文信息包括所述第一应用的标识和所述第一应用的当前显示界面的页面标识;
判断所述第一应用的标识是否与所述白名单中的应用的标识匹配;
若所述第一应用的标识与所述白名单中的应用的标识匹配,则判断所述第一应用的当前显示界面的页面标识是否与所述白名单中所述应用的页面标识匹配;
若匹配,则确定所述第一应用为所述白名单中的应用。
在一种可能的设计中,所述方法还包括:
将所述显示数据进行缓存;
若所述第一应用退出或者关闭,将所缓存的显示数据删除。
在一种可能的设计中,所述显示数据为JSON格式的数据,且所述显示数据携带所述第一应用的标识和/或所述第一应用的类型。
在一种可能的设计中,所述根据用户输入的授权操作指令,确定是否将所述显示数据共享给第二应用使用,具体包括:
显示用户授权界面,所述用户授权界面用于接收用户的授权操作指令;
若所述授权操作指令为授权指令,则将所述显示数据共享给第二应用使用;
若所述授权操作指令为禁止指令,则禁止所述第二应用共享所述显示数 据。
上述各可能的设计提供的应用数据的共享方法,通过确定所述第一应用的上下文信息,并判断上下文信息中第一应用的标识是否与上述白名单中应用的标识匹配,并在第一应用的标识与所述应用的标识匹配时,进一步判断第一应用的当前显示界面对应的页面的标识是否与上述白名单中所述应用的页面的标识匹配,在第二页面的标识与白名单中所述应用的页面的标识匹配时确定第一应用为白名单中的应用,进而获取该第一应用在当前显示界面上的显示数据,从而根据用户输入的授权操作指令,确定是否将显示数据共享给第二应用使用。该方法通过数据共享单元遍历控件获取的第一应用在当前显示界面上的显示数据,其不需要第一应用执行相应的操作,因而该显示数据脱离了应用程序层中第一应用的授权限制,该显示数据独立存在于终端设备上,其并不受限于第一应用的开发商的授权权限,因此,只要用户决定将第一应用在当前显示界面上的显示数据进行共享,用户就可以通过相应的授权操作指令将该显示数据共享至任意类型的第二应用,这样保证了任意两个应用之间进行数据共享的开放性,以及数据的互联互通,大大提高了用户的体验。
第二方面,本发明实施例提供一种应用数据的共享装置,包括:判断模块、显示模块、获取模块和共享模块;
判断模块,用于判断所述显示模块当前显示的第一应用是否为预设的白名单中的应用;
获取模块,用于在所述判断模块判断所述第一应用为预设的白名单中的应用时,根据所述第一应用的当前显示界面上的控件获取所述第一应用在当前显示界面上的显示数据,所述控件为所述当前显示界面的界面元素;
共享模块,用于根据用户输入的授权操作指令,确定是否将所述显示数据共享给第二应用使用;其中,所述授权操作指令包括用于指示将所述显示数据共享给所述第二应用的授权指令和用于指示禁止将所述显示数据共享给所述第二应用的禁止指令。
在一种可能的设计中,所述获取模块,具体包括:
确定单元,用于根据所述第一应用当前显示界面上每个控件的数据属性,确定所述第一应用当前显示界面上的有效控件;所述有效控件为携带满足第 一预设条件的数据的控件;所述数据属性包括所述控件中的文本长度、所述控件中的图片占当前界面的大小、所述控件中的动画占当前界面的大小中的至少一个;
获取单元,用于根据每个所述有效控件的数据,获取所述显示数据。
在一种可能的设计中,所述确定单元,具体用于当所述控件的数据属性为所述控件中的文本长度,且所述控件中的文本长度大于预设的第一阈值时,确定所述控件为有效控件;或者,当所述控件的数据属性为所述控件中的图片占当前界面的大小,且所述控件中的图片占当前界面的大小大于预设的第二阈值时,确定所述控件为有效控件;或者,当所述控件的数据属性为所述控件中的动画占当前界面的大小,且所述控件中的动画占当前界面的大小大于预设的第三阈值时,确定所述控件为有效控件;
其中,所述第一预设条件包括所述控件中数据的文本长度大于所述第一阈值、所述控件中的图片占当前界面的大小大于所述第二阈值、所述控件中的动画占当前界面的大小大于所述第三阈值中的任一个。
在一种可能的设计中,所述获取单元,具体用于根据所述第二应用的类型或者所述第二应用在操作系统上的注册信息,确定所述第二应用的数据整合机制,并根据所述第二应用的数据整合机制,对所述第一应用当前显示界面上的所有有效控件的数据进行整合,并将整合后的数据确定为所述显示数据;其中,所述第二应用的注册信息携带所述第二应用的数据整合机制。
在一种可能的设计中,所述装置适用于安卓操作系统,所述安卓操作系统包括集成屏幕数据共享单元的应用框架层,所述屏幕数据共享单元提供面向所述第一应用的第一应用程序API接口和面向第二应用的第二API接口;
所述屏幕数据共享单元根据所述第一应用的当前显示界面上的控件,通过所述第一API接口获取所述第一应用在当前显示界面上的显示数据;
所述屏幕数据共享单元通过所述第二API接口将所述显示数据共享给所述第二应用。
在一种可能的设计中,所述判断模块,具体用于确定所述第一应用的上下文信息,所述上下文信息包括所述第一应用的标识和所述第一应用的当前显示界面的页面标识;以及,判断所述第一应用的标识是否与所述白名单中的应用的标识匹配;若所述第一应用的标识与所述白名单中的应用的标识匹 配,则判断所述第一应用的当前显示界面的页面标识是否与所述白名单中所述应用的页面标识匹配;若匹配,则确定所述第一应用为所述白名单中的应用。
在一种可能的设计中,所述装置还包括:
存储模块,用于将所述显示数据进行缓存;
删除模块,用于在所述第一应用退出或者关闭时,将所缓存的显示数据删除。
在一种可能的设计中,所述显示数据为JSON格式的数据,且所述显示数据携带所述第一应用的标识和/或所述第一应用的类型。
在一种可能的设计中,所述显示模块,还用于显示用户授权界面,所述用户授权界面用于接收用户的授权操作指令;
所述共享模块,用于在所述授权操作指令为授权指令时,将所述显示数据共享给第二应用使用;或者,在所述授权操作指令为禁止指令时,禁止所述第二应用共享所述显示数据。
上述第二方面以及第二方面的各可能的设计所提供的应用数据的共享装置,其有益效果可以参照上述第一方面以及第一方面的各可能的设计所带来的有益效果,在此不再赘述。
第三方面,本发明实施例提供一种终端设备,包括输入设备、显示设备和处理器;
所述处理器,用于判断所述显示设备当前显示的第一应用是否为预设的白名单中的应用,并在所述第一应用为所述白名单中的应用时,根据所述第一应用的当前显示界面上的控件获取所述第一应用在当前显示界面上的显示数据,所述控件为所述当前显示界面的界面元素;
所述输入设备,用于接收用户输入的授权操作指令,所述授权操作指令包括用于指示将所述显示数据共享给所述第二应用的授权指令和用于指示禁止将所述显示数据共享给所述第二应用的禁止指令;
所述处理器,还用于根据所述授权操作指令,确定是否将所述显示数据共享给第二应用使用。
在一种可能的设计中,所述处理器,具体用于根据所述第一应用当前显示界面上每个控件的数据属性,确定所述第一应用当前显示界面上的有效控 件,并根据每个所述有效控件的数据,获取所述显示数据;其中,所述有效控件为携带满足第一预设条件的数据的控件;所述数据属性包括所述控件中的文本长度、所述控件中的图片占当前界面的大小、所述控件中的动画占当前界面的大小中的至少一个。
在一种可能的设计中,所述处理器,用于根据所述第一应用当前显示界面上每个控件的数据属性,确定所述第一应用当前显示界面上的有效控件,具体包括:
所述处理器,具体用于当所述控件的数据属性为所述控件中的文本长度,且所述控件中的文本长度大于预设的第一阈值时,确定所述控件为有效控件;或者,当所述控件的数据属性为所述控件中的图片占当前界面的大小,且所述控件中的图片占当前界面的大小大于预设的第二阈值时,确定所述控件为有效控件;或者,当所述控件的数据属性为所述控件中的动画占当前界面的大小,且所述控件中的动画占当前界面的大小大于预设的第三阈值时,确定所述控件为有效控件;
其中,所述第一预设条件包括所述控件中数据的文本长度大于所述第一阈值、所述控件中的图片占当前界面的大小大于所述第二阈值、所述控件中的动画占当前界面的大小大于所述第三阈值中的任一个。
在一种可能的设计中,所述处理器,用于根据每个所述有效控件的数据,获取所述显示数据,具体包括:
所述处理器,具体用于根据所述第二应用的类型或者所述第二应用在操作系统上的注册信息,确定所述第二应用的数据整合机制,并根据所述第二应用的数据整合机制,对所述第一应用当前显示界面上的所有有效控件的数据进行整合,并将整合后的数据确定为所述显示数据;其中,所述第二应用的注册信息携带所述第二应用的数据整合机制;
在一种可能的设计中,所述终端设备为安卓操作系统,所述安卓操作系统包括集成屏幕数据共享单元的应用框架层,所述屏幕数据共享单元提供面向所述第一应用的第一应用程序API接口和面向第二应用的第二API接口;
所述屏幕数据共享单元根据所述第一应用的当前显示界面上的控件,通过所述第一API接口获取所述第一应用在当前显示界面上的显示数据;
所述屏幕数据共享单元通过所述第二API接口将所述显示数据共享给所 述第二应用。
在一种可能的设计中,所述处理器,用于判断当前显示的第一应用是否为预设的白名单中的应用,具体包括:
所述处理器,具体用于确定所述第一应用的上下文信息,所述上下文信息包括所述第一应用的标识和所述第一应用的当前显示界面的页面标识;以及判断所述第一应用的标识是否与所述白名单中的应用的标识匹配;若所述第一应用的标识与所述白名单中的应用的标识匹配,则判断所述第一应用的当前显示界面的页面标识是否与所述白名单中所述应用的页面标识匹配;若匹配,则确定所述第一应用为所述白名单中的应用。
在一种可能的设计中,所述处理器,还用于指示存储器将所述显示数据进行缓存;并在所述第一应用退出或者关闭时,将所缓存的显示数据删除。
在一种可能的设计中,所述显示数据为JSON格式的数据,且所述显示数据携带所述第一应用的标识和/或所述第一应用的类型。
在一种可能的设计中,所述显示设备,还用于显示用户授权界面,所述用户授权界面用于接收用户的授权操作指令;
所述处理器,具体用于当所述授权操作指令为授权指令时,将所述显示数据共享给第二应用使用;或者,当所述授权操作指令为禁止指令时,禁止所述第二应用共享所述显示数据。
上述第三方面以及第三方面的各可能的设计所提供的终端设备,其有益效果可以参照上述第一方面以及第一方面的各可能的设计所带来的有益效果,在此不再赘述。
附图说明
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作一简单地介绍,显而易见地,下面描述中的附图是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1为本发明实施例提供的应用程序共享场景示意图;
图2为本发明实施例提供的手机的硬件结构框图;
图3为本发明实施例提供的现有技术中的安卓操作系统的结构框图;
图4为本发明实施例提供的安卓操作系统的结构框图;
图5为本发明实施例提供的应用数据的共享方法实施例一的流程示意图;
图6为本发明实施例提供的应用数据的共享方法实施例二的流程示意图;
图7为本发明实施例提供的应用数据的共享方法实施例三的流程示意图;
图8为本发明实施例提供的应用数据的共享方法实施例四的流程示意图;
图9为本发明实施例提供的用户授权界面示意图一;
图10为本发明实施例提供的用户授权界面示意图二;
图11为本发明实施例提供的应用数据的共享装置实施例一的结构示意图;
图12为本发明实施例提供的应用数据的共享装置实施例二的结构示意图;
图13为本发明实施例提供的应用数据的共享装置实施例三的结构示意图;
图14为本发明实施例提供的终端设备实施例的结构示意图。
具体实施方式
为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。
本发明实施例提供的应用数据的共享方法,可以适用于终端设备上任意两个应用程序之间共享应用数据的场景,参见图1所示的应用程序共享场景示意图,该场景中的应用程序为面向用户、可供用户操作的应用程序(Application,简称APP)。用户在使用APP时产生过程数据对用户来说一般是很有价值的,用户希望终端设备中的第三方应用能够利用这些过程数据为用户提供更好的服务,例如,用户在微信中和朋友聊天,聊天内容可能包含了用户的个人信息、行程信息、图片信息等,因此可以根据这些聊天内容将这些聊天内容中的部分或者全部数据共享给第三方应用,比如,根据用户 在微信中对某个朋友发送的一条消息“明天下午3点在新街口吃饭”,可以在日程APP中为用户创建一个明天下午3点的日程提醒(即将消息内容共享至日程应用),或者,可以在地图APP中把新街口作为目的地的候选项(即将消息内容共享至地图APP),再或者,还可以在团购APP推荐中把新街口的美食作为推荐项(即将消息内容共享至团购APP)。
另外,本发明实施例所涉及的终端设备可以包括手机、平板电脑、PDA(Personal Digital Assistant,个人数字助理)、POS(Point of Sales,销售终端)、车载电脑等。
以移动终端为手机为例,图2示出的是与本发明实施例相关的手机100的部分结构的框图。参考图2,手机100包括、RF(Radio Frequency,射频)电路110、存储器120、其他输入设备130、显示屏140、传感器150、音频电路160、输入输出(Input or Output,简称I/O)子系统170、处理器180、以及电源190等部件。本领域技术人员可以理解,图2中示出的手机结构并不构成对手机的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。本领领域技术人员可以理解显示屏140属于用户界面(UI,User Interface),且手机100可以包括比图示或者更少的用户界面。
下面结合图2对手机100的各个构成部件进行具体的介绍:
RF电路110可用于收发信息或通话过程中,信号的接收和发送,特别地,将基站的下行信息接收后,给处理器180处理;另外,将设计上行的数据发送给基站。通常,RF电路包括但不限于天线、至少一个放大器、收发信机、耦合器、LNA(Low Noise Amplifier,低噪声放大器)、双工器等。此外,RF电路110还可以通过无线通信与网络和其他设备通信。所述无线通信可以使用任一通信标准或协议,包括但不限于GSM(Global System of Mobile communication,全球移动通讯系统)、GPRS(General Packet Radio Service,通用分组无线服务)、CDMA(Code Division Multiple Access,码分多址)、WCDMA(Wideband Code Division Multiple Access,宽带码分多址)、LTE(Long Term Evolution,长期演进)、电子邮件、SMS(Short Messaging Service,短消息服务)等。
存储器120可用于存储软件程序以及模块,处理器180通过运行存储在 存储器120的软件程序以及模块,从而执行手机100的各种功能应用以及数据处理。存储器120可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序(比如声音播放功能、图象播放功能等)等;存储数据区可存储根据手机100的使用所创建的数据(比如音频数据、电话本等)等。此外,存储器120可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。
其他输入设备130可用于接收输入的数字或字符信息,以及产生与手机100的用户设置以及功能控制有关的键信号输入。具体地,其他输入设备130可包括但不限于物理键盘、功能键(比如音量控制按键、开关按键等)、轨迹球、鼠标、操作杆、光鼠(光鼠是不显示可视输出的触摸敏感表面,或者是由触摸屏形成的触摸敏感表面的延伸)等中的一种或多种。其他输入设备130与I/O子系统170的其他输入设备控制器171相连接,在其他设备输入控制器171的控制下与处理器180进行信号交互。
显示屏140可用于显示由用户输入的信息或提供给用户的信息以及手机100的各种菜单,还可以接受用户输入。具体的,显示屏140可包括显示面板141,以及触控面板142。其中显示面板141可以采用LCD(Liquid Crystal Display,液晶显示器)、OLED(Organic Light-Emitting Diode,有机发光二极管)等形式来配置显示面板141。触控面板142,也称为触摸屏、触敏屏等,可收集用户在其上或附近的接触或者非接触操作(比如用户使用手指、触笔等任何适合的物体或附件在触控面板142上或在触控面板142附近的操作,也可以包括体感操作;该操作包括单点控制操作、多点控制操作等操作类型。),并根据预先设定的程式驱动相应的连接装置。可选的,触控面板142可包括触摸检测装置和触摸控制器两个部分。其中,触摸检测装置检测用户的触摸方位、姿势,并检测触摸操作带来的信号,将信号传送给触摸控制器;触摸控制器从触摸检测装置上接收触摸信息,并将它转换成处理器能够处理的信息,再送给处理器180,并能接收处理器180发来的命令并加以执行。此外,可以采用电阻式、电容式、红外线以及表面声波等多种类型实现触控面板142,也可以采用未来发展的任何技术实现触控面板142。进一步的,触控面板142可覆盖显示面板141,用户可以根据显示面板141显示的内容(该显示内容 包括但不限于,软键盘、虚拟鼠标、虚拟按键、图标等等),在显示面板141上覆盖的触控面板142上或者附近进行操作,触控面板142检测到在其上或附近的操作后,通过I/O子系统170传送给处理器180以确定用户输入,随后处理器180根据用户输入通过I/O子系统170在显示面板141上提供相应的视觉输出。虽然在图,2中,触控面板142与显示面板141是作为两个独立的部件来实现手机100的输入和输入功能,但是在某些实施例中,可以将触控面板142与显示面板141集成而实现手机100的输入和输出功能。
手机100还可包括至少一种传感器150,比如光传感器、运动传感器以及其他传感器。具体地,光传感器可包括环境光传感器及接近传感器,其中,环境光传感器可根据环境光线的明暗来调节显示面板141的亮度,接近传感器可在手机100移动到耳边时,关闭显示面板141和/或背光。作为运动传感器的一种,加速计传感器可检测各个方向上(一般为三轴)加速度的大小,静止时可检测出重力的大小及方向,可用于识别手机姿态的应用(比如横竖屏切换、相关游戏、磁力计姿态校准)、振动识别相关功能(比如计步器、敲击)等;至于手机100还可配置的陀螺仪、气压计、湿度计、温度计、红外线传感器等其他传感器,在此不再赘述。
音频电路160、扬声器161,麦克风162可提供用户与手机100之间的音频接口。音频电路160可将接收到的音频数据转换后的信号,传输到扬声器161,由扬声器161转换为声音信号输出;另一方面,麦克风162将收集的声音信号转换为信号,由音频电路160接收后转换为音频数据,再将音频数据输出至RF电路110以发送给比如另一手机,或者将音频数据输出至存储器120以便进一步处理。
I/O子系统170用来控制输入输出的外部设备,可以包括其他设备输入控制器171、传感器控制器172、显示控制器173。可选的,一个或多个其他输入控制设备控制器171从其他输入设备130接收信号和/或者向其他输入设备130发送信号,其他输入设备130可以包括物理按钮(按压按钮、摇臂按钮等)、拨号盘、滑动开关、操纵杆、点击滚轮、光鼠(光鼠是不显示可视输出的触摸敏感表面,或者是由触摸屏形成的触摸敏感表面的延伸)。值得说明的是,其他输入控制设备控制器171可以与任一个或者多个上述设备连接。所述I/O子系统170中的显示控制器173从显示屏140接收信号和/或者向显 示屏140发送信号。显示屏140检测到用户输入后,显示控制器173将检测到的用户输入转换为与显示在显示屏140上的用户界面对象的交互,即实现人机交互。传感器控制器172可以从一个或者多个传感器150接收信号和/或者向一个或者多个传感器150发送信号。
处理器180是手机100的控制中心,利用各种接口和线路连接整个手机的各个部分,通过运行或执行存储在存储器120内的软件程序和/或模块,以及调用存储在存储器120内的数据,执行手机100的各种功能和处理数据,从而对手机进行整体监控。可选的,处理器180可包括一个或多个处理单元;优选的,处理器180可集成应用处理器和调制解调处理器,其中,应用处理器主要处理操作系统、用户界面和应用程序等,调制解调处理器主要处理无线通信。可以理解的是,上述调制解调处理器也可以不集成到处理器180中。
手机100还包括给各个部件供电的电源190(比如电池),优选的,电源可以通过电源管理系统与处理器180逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗等功能。
尽管未示出,手机100还可以包括摄像头、蓝牙模块等,在此不再赘述。
综上,上述图2从硬件组成角度介绍了以手机为例的终端设备的结构框架,本发明实施例涉及的应用数据的共享方法,也涉及终端设备的软件层面的系统架构,需要说明的是,本发明实施例涉及的方法,可以适用于安卓(Android)系统、OS系统、Darwin系统、RTXC系统、Linux系统、Unix系统、Windows系统、嵌入式操作系统例如VxWorks等操作系统。同样的,基于上述图2以手机为例的基础上,下述图3以操作系统为手机上的Android系统为例,介绍本发明实施例的方法所涉及的软件操作系统的系统框架。
具体的,Android是一种开源的移动操作系统,作为一个移动设备平台,其层次结构包含了一个操作系统,中间件(Middle Ware)和应用程序(Application),如图3所示,Android操作系统分为如下几个层次:
(1)应用程序层(Application)
开发人员可以基于安卓软件开发工具包(Software Development Kit,简称SDK)开发应用程序,同时操作系统本身也包含了一些基础应用,例如短信、电话、图片查看器、网页(Web)浏览器等系统级应用。
(2)应用程序框架层(Application Framework)
Android的应用程序框架层为应用层提供各种应用程序接口(Application Programming Interface,简称API),它包含了用户界面(User Interface,简称UI)程序中所需的各种控件,例如:Views(视图组件)包括TextView(文本控件)、ListView(列表)、Buttons(按钮)、WebView(网页浏览器控件)
(3)系统库和运行时环境层(Libraries&Android Runtime)
这一层包括各种库和运行时环境两部分,各种库主要是C库、多媒体库、图形处理引擎等;运行时环境主要是Dalvik虚拟机,它和标准的JAVA虚拟机不同,它执行的是.dex文件,是针对移动设别进行过裁剪和优化的虚拟机。
(4)Linux内核层(Kernel)
Android是基于Linux内核开发,其核心系统服务、内存管理、进程管理、网络协议及驱动都依赖于Linux内核。该Linux内核层的下方即就是图2介绍的手机的硬件层。
上述图2和图3从硬件和软件的角度分别阐述了终端设备的架构。现有技术中终端设备的上的任意两个应用(假设为应用A和应用B)之间在进行应用数据的共享时,应用B必须要得到应用A的授权才能共享应用A的数据,而实际情况是各个应用开发商出于商业利益的考虑,一般都不会把各自的数据共享给其他应用使用,从而造成了信息垄断,信息的互联互通性较差,用户体验度不高。
因此,本发明实施例提供的应用数据的共享方法、装置和终端设备,旨在解决现有技术中应用之间因开发商授权限制的影响导致信息垄断、信息的互联互通性较差,用户体验度不高的技术问题。
参见图4所示,为了解决现有技术中的上述问题,以安卓系统为例,本发明实施例基于上述图3所示的安卓操作系统架构层次,在Android操作系统的Framework层增加了屏幕数据共享单元(Screen Data Share),以下简称数据共享单元。它提供2个API接口供显示系统(View System)和第三方应用(例如上述例子中涉及的日程、地图APP、团购APP等)使用。显示框架通过其中一个API接口将当前正在显示的应用的控件树(该控件树包括应用的当前显示界面的父控件和子控件的集合)传递给数据共享单元,数据共享单元根据该控件树获取到该应用当前显示界面的应用数据,从而通过另一个API接口将该应用数据共享给第三方应用。
可选的,下述方法实施例的执行主体可以是终端设备,还可以是集成在终端设备中的应用数据的共享装置,该装置可以通过软件、硬件或者软硬结合的方式实现。可选的,下述方法实施例以执行主体为终端设备为例来进行说明。
下面以具体地实施例对本发明的技术方案进行详细说明。下面这几个具体的实施例可以相互结合,对于相同或相似的概念或过程可能在某些实施例不再赘述。
图5为本发明实施例提供的应用数据的共享方法实施例一的流程示意图。本实施例涉及的是终端设备将获取到的与预设的白名单匹配的第一应用当前显示界面的显示数据,依据用户的授权指令,确定是否将该显示数据共享至其他第三方应用的具体过程。如图5所示,该方法包括如下步骤:
S101:判断当前显示的第一应用是否为预设的白名单中的应用。
具体的,当终端设备识别到第一应用在终端设备上启动,并且显示在当前界面,终端设备判断该第一应用是否与预设的白名单中的应用的属性信息匹配。该白名单中的应用可以是开发人员根据开发经验或者相应的阈值默认设置的应用,这些应用的显示界面均包括能够为用户提供更好的服务的数据,可选的,白名单中的应用还可以是第三方应用(即想要共享其他应用的显示数据的应用)告知操作系统哪些应用的应用数据对自己来说是想要共享的,这类第三方应用告知给操作系统的应用也可以被添加至白名单中。可选的,白名单中可以包括应用的标识、该应用的类型、该应用中携带数据的页面的标识等。
S102:若匹配,则根据所述第一应用的当前显示界面上的控件获取所述第一应用在当前显示界面上的显示数据。
具体的,当终端设备判断当前在终端设备上的第一应用为白名单中的应用时,即终端设备确定该第一应用携带了能够为用户提供更好的服务的数据,则终端设备可以根据该第一应用的当前显示界面上的控件获取该第一应用在当前显示界面上的显示数据,该控件为源应用当前显示界面的界面元素,例如,假设第一应用为微信,当前显示界面为微信的聊天界面,则该聊天界面整体、聊天界面中的文本内容、图像或者时间均为该聊天界面的控件。可选的,本发明实施例在获取第一应用在当前显示界面上的显示数据时,是通过 图4中位于应用程序框架层上的屏幕数据共享单元来获取的,该屏幕数据共享单元提供面向第一应用的第一API接口和面向第二应用的第二API接口,位于应用程序框架层上的显示系统通过该第一API接口将获得的第一应用在当前显示界面的控件传输给屏幕数据共享单元,屏幕数据共享单元可以通过遍历当前显示界面上的控件,获得第一应用在当前显示界面上的显示数据;屏幕数据共享单元通过第二API接口将显示数据共享给第二应用。可选的,该显示数据可以是第一应用当前显示界面上显示的所有数据,还可以是终端设备将第一应用当前显示界面上显示的所有数据进行筛选后的部分数据,本发明实施例对此并不做限定。
需要说明的是,通过数据共享共享获取得到第一应用在当前显示界面上的显示数据,其不需要第一应用执行相应的操作,因而该显示数据脱离了应用程序层中第一应用的授权限制,该显示数据独立存在于终端设备上,在将该显示数据分享给其他应用时,无需考虑第一应用的开发商是否授权。
S103:根据用户输入的授权操作指令,确定是否将所述显示数据共享给第二应用使用。
其中,该授权操作指令包括用于指示将显示数据共享给第二应用的授权指令和用于指示禁止将上述显示数据共享给第二应用的禁止指令。
当图4中的数据共享单元获得第一应用在当前显示界面上的显示数据之后,此时,若终端设备接收到用户输入的授权操作指令,该授权操作指令包括用于指示将所述显示数据共享给所述第二应用的授权指令和用于指示禁止将所述显示数据共享给所述第二应用的禁止指令,因此终端设备可以根据该授权指令或者禁止指令确定是否将第一应用在当前显示界面上的显示数据共享给第二应用,该第二应用可以为终端设备上除第一应用之外的任一类型的应用,本发明实施例对第二应用的类型并不做限制。可选的,上述图4中涉及的数据共享单元所提供的面向第三方应用(即第二应用)的第二API接口,既可以支持第三方应用主动查询当前的显示数据,也可以支持第三方应用订阅当前的显示数据,即当终端获取到第一应用的显示数据后会根据用户的授权操作指令决定是否共享至该第三方应用,而不存在共享至其他第三方应用的可能。
由上述描述可知,当终端设备获取到第一应用在当前显示界面上的显示 数据之后,该获取的显示数据相当于可以脱离第一应用不受第一应用的限制,由终端设备所有,因而该显示数据的共享对象可以由用户的授权操作指令,其并不受限于第一应用的开发商的授权权限,因此,只要用户决定将第一应用在当前显示界面上的显示数据进行共享,用户就可以通过相应的授权操作指令将该显示数据共享至任意类型的第二应用,这样保证了任意两个应用之间进行数据共享的开放性,以及数据的互联互通,大大提高了用户的体验。
本发明实施例提供的应用数据的共享方法,通过在判断当前显示的第一应用为预设的白名单中的应用时,根据第一应用的当前显示界面上的控件获取该第一应用在当前显示界面上的显示数据,从而根据用户输入的授权操作指令,确定是否将所述显示数据共享给第二应用使用。本发明实施例的方法,终端设备通过数据共享单元所获取的显示数据脱离第一应用的授权限制,因而第一应用在当前显示界面上的显示数据的共享对象由用户的授权操作指令直接决定,其并不受限于第一应用的开发商的授权权限,因此,只要用户决定将第一应用在当前显示界面上的显示数据进行共享,用户就可以通过相应的授权操作指令将该显示数据共享至任意类型的第二应用,这样保证了任意两个应用之间进行数据共享的开放性,以及数据的互联互通,大大提高了用户的体验。
图6为本发明实施例提供的应用数据的共享方法实施例二的流程示意图。本实施例涉及的是终端设备根据第一应用在当前显示界面上的有效邮件获取第一应用在当前显示界面上的显示数据的具体过程。在上述实施例的基础上,进一步地,上述S102具体可以包括如下步骤:
S201:根据所述第一应用当前显示界面上每个控件的数据属性,确定所述第一应用当前显示界面上的有效控件。
其中,所述有效控件为携带满足第一预设条件的数据的控件;所述数据属性包括所述控件中的文本长度、所述控件中的图片占当前界面的大小、所述控件中的动画占当前界面的大小中的至少一个;
具体的,终端设备上的各个应用程序的UI界面上均涉及各种各样的控件,例如TextView(文本控件)、ListView(列表)、Buttons(按钮)、WebView(网页浏览器控件)以及这些控件的子类等,每个控件上分别具有相应类型的数 据。当终端设备确定第一应用为白名单中的应用匹配时,终端设备可以获取该第一应用对应的控件集合(获取方式可以参见现有技术,在此不再赘述),该控件集合包括第一应用当前显示界面上的全部控件;可选的,该控件集合可以为第一应用对应的控件树,该控件树包括父控件和各种子控件,例如,假设第一应用为微信,当前显示界面为微信的聊天界面,则该聊天界面整体是一个父控件,聊天界面中的文本内容、图像或者时间就是子控件,再例如,如果文本内容中插入了表情图片,则这个表情图片就是子控件的子控件。
进一步地,终端设备在获取第一应用对应的控件集合之后,会遍历该控件集合中的所有控件,确定哪些控件携带了满足第一预设条件的数据,从而将这些携带了满足第一预设条件的数据的控件确定为有效控件。常见的携带用户数据的控件可以参见下述表1的举例:
表1
序号 控件类型 控件名 数据
1 文本控件 TextView 文本
2 文本编辑控件 EditText 文本
3 图像控件 ImageView 图片
4 网页控件 WebView 网页
需要说明的是,控件本身会携带自身数据的获取方法,例如,文本控件可以通过getText()获取文件控件上的数据。常见控件的获取数据的方法下述表2所举的例子:
表2
控件名 获取的数据 获取数据的方法
Text View 文本内容 public String getText()
Edit Text 文本内容 public String getText()
Image View 图片二进制数据 public Drable getDrable()
Web View 网页URL public String getUrl()
上述URL为统一资源定位符(Uniform Resource Locator,简称URL)。
因此,终端设备会通过每个控件自身所携带的获取数据的方法,获取每个控件上的数据,然后根据每个第一控件的数据的数据属性,确定该一控件上携带的数据是否满足第一预设条件,若满足,则终端设备确定该控件为有 效控件,从而确定出第一应用当前显示界面上的所有有效控件,该第一预设条件为开发人员预置的关于控件上的数据对用户是否有价值所设置的条件。
可选的,上述数据属性可以包括控件中数据的文本长度、控件中的图片占当前界面的大小、控件中的动画占当前界面的大小中的至少一个,则可断的,该第一预设条件具体可以为:所述控件中数据的文本长度大于所述第一阈值、所述控件中的图片占当前界面的大小大于所述第二阈值、所述控件中的动画占当前界面的大小大于所述第三阈值中的任一个条件。
故而,终端设备根据每个控件的数据的数据属性,并结合上述第一预设条件,确定第一应用对应的控件集合中的有效控件,具体可以为:若控件的数据的数据属性为该控件中数据的文本长度,且该第一控件中的文本长度大于预设的第一阈值,则确定该控件为有效控件;或者,若控件的数据的数据属性为该控件中的图片占当前界面的大小,且该控件中的图片占当前界面的大小大于预设的第二阈值,则确定该控件为有效控件;或者,若控件的数据的数据属性为该控件中的动画占当前界面的大小,且该控件中的动画占当前界面的大小大于预设的第三阈值,则确定该控件为有效控件。
采用上述S201的方法,即可以确定出第一应用对应的控件集合中的所有有效控件。
S202:根据每个所述有效控件的数据,获取所述显示数据。
可选的,终端设备可以将每个有效控件上的数据的集合直接作为显示数据,还可以对每个控件上的数据进行相应的整合,将整合之后的数据作为显示数据,该整合方法具体可以参见图7所示的实施例三,如图7所示,该方法具体可以包括如下步骤:
S301:根据所述第二应用的类型或者所述第二应用在操作系统上的注册信息,确定所述第二应用的数据整合机制;其中,所述第二应用的注册信息携带所述第二应用的数据整合机制。
可选的,每个第二应用在需要共享当前显示的第一应用的显示数据时,会提前在操作系统进行注册,从而向操作系统发送自己的注册信息,该注册信息中携带第二应用得数据整合机制,旨在告知操作系统自己所需要的数据的形式或者类型,终端设备基于操作系统就可以获知每个第二应用的数据整合机制。可选的,终端设备还可以根据第二应用的类型确定第二应用的数据 整合机制,该第二应用的类型可以包括聊天类应用、购物类应用、快递类应用、视频类应用、音乐类应用中的任一个。
S302:根据所述第二应用的数据整合机制,对所述第一应用当前显示界面上的所有有效控件的数据进行整合,并将整合后的数据确定为所述显示数据。
具体的,当终端设备获得第一应用在当前显示界面上的显示数据之后,也确定要将该显示数据共享给哪一个或者几个第二应用,则终端设备根据该第二应用的数据整合机制,对第一应用当前显示界面上的所有有效控件的数据进行整合,并将整合后的数据确定为所述显示数据。例如假设当前显示的第一应用为微信,当前显示界面为微信的聊天界面,该聊天界面中展示了昵称、对话内容、时间3种不同的有效控件,若第二应用为日历应用,则该第二应用的数据整合机制为{发送者昵称、接收者昵称、消息内容、时间戳},因此终端设备可以将第一应用中的这3个有效控件的内容作为一个整体输出,作为一次对话,格式为:{发送者昵称、接收者昵称、消息内容、时间戳},进一步可以将多次对话按照时间顺序整合成一次会话。这样,就可以将整合后的数据作为第一应用在当前显示界面上的显示数据,从而大大提高了共享数据的有效性,使得第二应用能够利用该整合后的显示数据更好的为用户提供服务。
可选的,用户在使用第一应用过程中,当前显示界面会随时发生变化,因此当前显示界面上的数据也会随着界面的变化而发生变化,故,终端设备在得到第一应用在当前显示界面的显示数据之后,可以将该显示数据进行缓存,并在用户退出第一应用或者关闭第一应用时,将所缓存的显示数据进行删除,这样大大提高了数据的安全性,避免因当前显示界面的变化而导致显示数据丢失的情况发生。
可选的,为了方便将上述显示数据更好的共享给其他第二应用使用,可以将上述显示数据设置为JSON格式的数据,该显示数据携带第一应用的标识和/或第一应用的类型。
本发明实施例提供的应用数据的共享方法,通过根据第一应用当前显示界面上每个控件的数据属性,确定第一应用当前显示界面上的有效控件,从而根据每个有效控件的数据,获取第一应用当前显示界面的显示数据,该数 据获取方式仅通过遍历控件的方式就可以获取,数据获取方式简单有效,并且确保了终端设备最终共享给第二应用的数据为满足第一预设条件的数据,即确保了该数据为满足用户需求、能够为用户提供更好的服务的过程数据,因此,其很大程度上提高了用户的体验效果,使得用户与终端设备之间的交互更加智能化;同时,本实施例根据第二应用的数据整合机制,将所获取的每个有效控件的数据进行整合,并将整合后的数据作为第一应用在当前显示界面上的显示数据,从而大大提高了共享数据的有效性,使得第二应用能够利用该整合后的显示数据更好的为用户提供服务。
图8为本发明实施例提供的应用数据的共享方法实施例四的流程示意图。本实施例涉及的是在上述各实施例的基础上,终端设备将获取到的第一应用当前显示界面的显示数据,依据用户的授权指令确定是否将该显示数据共享至第二应用的更加详尽的过程。本实施例中,白名单中的应用均为满足上述第一预设条件的应用,该白名单中的应用的的属性信息包括该应用的标识、该应用的页面的标识,该页面中所携带的数据满足上述第一预设条件(即该页面中所携带的数据可以为对用户有价值的数据)。如图8所示,该方法可以包括如下步骤:
S401:确定所述第一应用的上下文信息,所述上下文信息包括所述第一应用的标识和所述第一应用的当前显示界面的页面标识。
可选的,终端设备可以从第一应用对应的控件集合中获取第一应用的上下文信息,还可以通过操作系统获取第一应用的上下文信息。该上下文信息包括第一应用的标识和第一应用的当前显示界面的页面标识。可选的,该上下文信息还可以包括该第一应用的类型。
S402:判断所述第一应用的标识是否与所述白名单中的应用的标识匹配。
具体的,该白名单中包括满足上述第一预设条件的应用的标识和该应用中展示对用户有价值的数据的页面的标识,可选的,该白名单中还可以包括满足上述第一预设条件的应用的类型。可选的,由于用户使用的应用数量较多,功能也各不相同,开发人员可以对应用市场里面的主流应用按照第一预设条件进行筛选和归类,整理出一个白名单。可选的,开发人员可以将应用市场中的应用归为以下几类,参见表3所示的例子:
表3
序号 类型 数据内容 数据字段 应用举例
1 聊天类 聊天内容 昵称、对话内容、时间 微信
2 购物类 商品信息 商品名、价格 淘宝
3 快递类 快递信息 快递单号、物流信息 快递100
4 音乐类 歌曲信息 歌曲名、歌手名、专辑名 酷我音乐
5 视频类 视频信息 视频名、选集 优酷视频
6 阅读类 文章信息 标题、正文、URL 网易新闻
终端设备获得第一应用的上下文信息之后,终端设备将该上下文信息中的第一应用的标识与上述白名单中的各应用的标识进行匹配,如果匹配上,则执行下述S403。
S403:若所述第一应用的标识与白名单中的应用的标识匹配,则判断第一应用的当前显示界面的页面标识是否与所述白名单中所述应用的页面的标识匹配。
S404:若匹配,则确定所述第一应用为所述白名单中的应用。
具体的,当第一应用的标识与上述白名单中的某一应用(假设为应用A)的标识匹配,则进一步地将第一应用当前显示界面的页面的标识与该应用A的页面标识再次进行匹配,如果二者均匹配上,则终端设备确定第一应用为白名单中的应用,进而执行下述S405。
S405:根据第一应用的当前显示界面上的控件获取所述第一应用在当前显示界面上的显示数据。
当终端设备确定第一应用与白名单中的应用匹配时,获取该第一应用在当前显示界面上的显示数据,具体的获取过程可以参见上述实施例一至上述实施例三中的描述,在此不再赘述。
S406:显示用户授权界面,所述用户授权界面用于接收用户的授权操作指令。
具体的,当第一应用的当前显示界面的页面标识与上述白名单中的任一应用的页面标识匹配时,则终端会向用户显示用户授权界面,提示用户输入相应的授权操作指令,从而将第一应用当前显示界面的显示数据共享至第二应用。本发明实施例中的用户授权操作指令包括用于指示将上述显示数据共 享给第二应用的授权指令和用于指示禁止将上述显示数据共享给所述第二应用的禁止指令。可选的,可以参见图9所示的用户授权界面,该用户授权界面可以悬浮在当前显示界面上,还可以显示在消息通知栏中,用户可以下拉通知栏查看用户授权界面,图9仅是用户授权界面的一种示例。可选的,该用户授权界面可以包括两个选项(Option),一个选项用于接收用户的授权指令,另一个选项用于接收用户的禁止指令;可选的,该用户授权界面还可以是语音授权界面,该界面上显示一语音输入控件,用户操作该语音输入控件输入相应的语音指令,以向终端输入相应的授权或者禁止指令,可以参见图10所示,当然图10也仅是用户授权界面的一种示例。本发明实施例对用户授权界面的形式和用户输入授权操作指令的方式均不做限定。
S407:若所述授权操作指令为授权指令,则将所述显示数据共享给第二应用使用。
S408:若所述授权操作指令为禁止指令,则禁止所述第二应用共享所述显示数据。
本发明实施例提供的应用数据的共享方法,通过确定所述第一应用的上下文信息,并判断上下文信息中第一应用的标识是否与上述白名单中应用的标识匹配,并在第一应用的标识与所述应用的标识匹配时,进一步判断第一应用的当前显示界面对应的页面的标识是否与上述白名单中所述应用的页面的标识匹配,在第二页面的标识与白名单中所述应用的页面的标识匹配时确定第一应用为白名单中的应用,进而获取该第一应用在当前显示界面上的显示数据,从而根据用户输入的授权操作指令,确定是否将显示数据共享给第二应用使用。本发明实施例的方法,通过数据共享单元遍历控件获取的第一应用在当前显示界面上的显示数据,其不需要第一应用执行相应的操作,因而该显示数据脱离了应用程序层中第一应用的授权限制,该显示数据独立存在于终端设备上,其并不受限于第一应用的开发商的授权权限,因此,只要用户决定将第一应用在当前显示界面上的显示数据进行共享,用户就可以通过相应的授权操作指令将该显示数据共享至任意类型的第二应用,这样保证了任意两个应用之间进行数据共享的开放性,以及数据的互联互通,大大提高了用户的体验。
本领域普通技术人员可以理解:实现上述方法实施例的全部或部分步骤 可以通过程序指令相关的硬件来完成,前述的程序可以存储于一计算机可读取存储介质中,该程序在执行时,执行包括上述方法实施例的步骤;而前述的存储介质包括:ROM、RAM、磁碟或者光盘等各种可以存储程序代码的介质。
图11为本发明实施例提供的应用数据的共享装置实施例一的结构示意图。该共享装置可以为独立的终端设备,还可以为集成在终端设备中的装置,该装置可以通过软件、硬件或者软硬结合的方式实现。如图11所示,该应用数据的共享装置包括:判断模块10、显示模块13、获取模块11和共享模块12。
其中,判断模块10,用于判断所述显示模块13当前显示的第一应用是否为预设的白名单中的应用;
获取模块11,用于在所述判断模块10判断所述第一应用为预设的白名单中的应用时,根据所述第一应用的当前显示界面上的控件获取所述第一应用在当前显示界面上的显示数据,所述控件为所述当前显示界面的界面元素;
共享模块12,用于根据用户输入的授权操作指令,确定是否将所述显示数据共享给第二应用使用;其中,所述授权操作指令包括用于指示将所述显示数据共享给所述第二应用的授权指令和用于指示禁止将所述显示数据共享给所述第二应用的禁止指令。
本发明实施例提供的应用数据的共享装置,可以执行上述方法实施例,其实现原理和技术效果类似,在此不再赘述。
图12为本发明实施例提供的应用数据的共享装置实施例二的结构示意图。在上述实施例的基础上,进一步地,上述获取模块11,具体包括:
确定单元111,用于根据所述第一应用当前显示界面上每个控件的数据属性,确定所述第一应用当前显示界面上的有效控件;所述有效控件为携带满足第一预设条件的数据的控件;所述数据属性包括所述控件中的文本长度、所述控件中的图片占当前界面的大小、所述控件中的动画占当前界面的大小中的至少一个;
获取单元112,用于根据每个所述有效控件的数据,获取所述显示数据。
进一步地,所述确定单元111,具体用于当所述控件的数据属性为所述控件中的文本长度,且所述控件中的文本长度大于预设的第一阈值时,确定 所述控件为有效控件;或者,当所述控件的数据属性为所述控件中的图片占当前界面的大小,且所述控件中的图片占当前界面的大小大于预设的第二阈值时,确定所述控件为有效控件;或者,当所述控件的数据属性为所述控件中的动画占当前界面的大小,且所述控件中的动画占当前界面的大小大于预设的第三阈值时,确定所述控件为有效控件;
其中,所述第一预设条件包括所述控件中数据的文本长度大于所述第一阈值、所述控件中的图片占当前界面的大小大于所述第二阈值、所述控件中的动画占当前界面的大小大于所述第三阈值中的任一个。
进一步地,所述获取单元112,具体用于根据所述第二应用的类型或者所述第二应用在操作系统上的注册信息,确定所述第二应用的数据整合机制,并根据所述第二应用的数据整合机制,对所述第一应用当前显示界面上的所有有效控件的数据进行整合,并将整合后的数据确定为所述显示数据;其中,所述第二应用的注册信息携带所述第二应用的数据整合机制。
本发明实施例提供的应用数据的共享装置,可以执行上述方法实施例,其实现原理和技术效果类似,在此不再赘述。
更进一步地,所述装置适用于安卓操作系统,所述安卓操作系统包括集成屏幕数据共享单元的应用框架层,所述屏幕数据共享单元提供面向所述第一应用的第一应用程序API接口和面向第二应用的第二API接口;
所述屏幕数据共享单元根据所述第一应用的当前显示界面上的控件,通过所述第一API接口获取所述第一应用在当前显示界面上的显示数据;
所述屏幕数据共享单元通过所述第二API接口将所述显示数据共享给所述第二应用。
可选的,所述判断模块10,具体用于确定所述第一应用的上下文信息,所述上下文信息包括所述第一应用的标识和所述第一应用的当前显示界面的页面标识;以及,判断所述第一应用的标识是否与所述白名单中的应用的标识匹配;若所述第一应用的标识与所述白名单中的应用的标识匹配,则判断所述第一应用的当前显示界面的页面标识是否与所述白名单中所述应用的页面标识匹配;若匹配,则确定所述第一应用为所述白名单中的应用。
在上述图12所示的实施例二的基础上,图13提供了应用数据的共享装置实施例三的结构示意图,进一步地,上述装置还可以包括:存储模块14、 删除模块15。存储模块14,用于将所述显示数据进行缓存;
删除模块15,用于在所述第一应用退出或者关闭时,将所缓存的显示数据删除;所述显示数据为JSON格式的数据,且所述显示数据携带所述第一应用的标识和/或所述第一应用的类型。
可选的,所述显示模块13,还用于显示用户授权界面,所述用户授权界面用于接收用户的授权操作指令;
所述共享模块12,用于在所述授权操作指令为授权指令时,将所述显示数据共享给第二应用使用;或者,在所述授权操作指令为禁止指令时,禁止所述第二应用共享所述显示数据。
本发明实施例提供的应用数据的共享装置,可以执行上述方法实施例,其实现原理和技术效果类似,在此不再赘述。
图14为本发明实施例提供的终端设备实施例的结构示意图。如图14所示,该终端可以包括:处理器20,例如CPU;存储器21,至少一个通信总线22、显示设备23和输入设备24。通信总线22用于实现元件之间的通信连接。存储器21可能包含高速RAM存储器,也可能还包括非易失性存储器NVM,例如至少一个磁盘存储器,存储器21中可以存储各种程序,用于完成各种处理功能以及实现本实施例的方法步骤;所述输入设备24,用于向用户提供输入接口,接收用户输入的操作或指令等。
在本实施例中,所述处理器20,用于判断所述显示设备23当前显示的第一应用是否为预设的白名单中的应用,并在所述第一应用为所述白名单中的应用时,根据所述第一应用的当前显示界面上的控件获取所述第一应用在当前显示界面上的显示数据,所述控件为所述当前显示界面的界面元素;
所述输入设备24,用于接收用户输入的授权操作指令,所述授权操作指令包括用于指示将所述显示数据共享给所述第二应用的授权指令和用于指示禁止将所述显示数据共享给所述第二应用的禁止指令;
所述处理器20,还用于根据所述授权操作指令,确定是否将所述显示数据共享给第二应用使用。
本发明实施例提供的终端设备,可以执行上述方法实施例,其实现原理和技术效果类似,在此不再赘述。
进一步地,所述处理器20,具体用于根据所述第一应用当前显示界面上每个控件的数据属性,确定所述第一应用当前显示界面上的有效控件,并根据每个所述有效控件的数据,获取所述显示数据;其中,所述有效控件为携带满足第一预设条件的数据的控件;所述数据属性包括所述控件中的文本长度、所述控件中的图片占当前界面的大小、所述控件中的动画占当前界面的大小中的至少一个。
可选的,所述处理器20,用于根据所述第一应用当前显示界面上每个控件的数据属性,确定所述第一应用当前显示界面上的有效控件,具体包括:
所述处理器20,具体用于当所述控件的数据属性为所述控件中的文本长度,且所述控件中的文本长度大于预设的第一阈值时,确定所述控件为有效控件;或者,当所述控件的数据属性为所述控件中的图片占当前界面的大小,且所述控件中的图片占当前界面的大小大于预设的第二阈值时,确定所述控件为有效控件;或者,当所述控件的数据属性为所述控件中的动画占当前界面的大小,且所述控件中的动画占当前界面的大小大于预设的第三阈值时,确定所述控件为有效控件;
其中,所述第一预设条件包括所述控件中数据的文本长度大于所述第一阈值、所述控件中的图片占当前界面的大小大于所述第二阈值、所述控件中的动画占当前界面的大小大于所述第三阈值中的任一个。
可选的,所述处理器20,用于根据每个所述有效控件的数据,获取所述显示数据,具体包括:
所述处理器20,具体用于根据所述第二应用的类型或者所述第二应用在操作系统上的注册信息,确定所述第二应用的数据整合机制,并根据所述第二应用的数据整合机制,对所述第一应用当前显示界面上的所有有效控件的数据进行整合,并将整合后的数据确定为所述显示数据;其中,所述第二应用的注册信息携带所述第二应用的数据整合机制;
可选的,所述终端设备为安卓操作系统,所述安卓操作系统包括集成屏幕数据共享单元的应用框架层,所述屏幕数据共享单元提供面向所述第一应用的第一应用程序API接口和面向第二应用的第二API接口;
所述屏幕数据共享单元根据所述第一应用的当前显示界面上的控件,通过所述第一API接口获取所述第一应用在当前显示界面上的显示数据;
所述屏幕数据共享单元通过所述第二API接口将所述显示数据共享给所述第二应用。
可选的,所述处理器20,用于判断当前显示的第一应用是否为预设的白名单中的应用,具体包括:
所述处理器20,具体用于确定所述第一应用的上下文信息,所述上下文信息包括所述第一应用的标识和所述第一应用的当前显示界面的页面标识;以及判断所述第一应用的标识是否与所述白名单中的应用的标识匹配;若所述第一应用的标识与所述白名单中的应用的标识匹配,则判断所述第一应用的当前显示界面的页面标识是否与所述白名单中所述应用的页面标识匹配;若匹配,则确定所述第一应用为所述白名单中的应用。
可选的,所述处理器20,还用于指示存储器21将所述显示数据进行缓存;并在所述第一应用退出或者关闭时,将所缓存的显示数据删除。所述显示数据为JSON格式的数据,且所述显示数据携带所述第一应用的标识和/或所述第一应用的类型。
可选的,所述显示设备23,还用于显示用户授权界面,所述用户授权界面用于接收用户的授权操作指令;
所述处理器20,具体用于当所述授权操作指令为授权指令时,将所述显示数据共享给第二应用使用;或者,当所述授权操作指令为禁止指令时,禁止所述第二应用共享所述显示数据。
本发明实施例提供的终端设备,可以执行上述方法实施例,其实现原理和技术效果类似,在此不再赘述。
最后应说明的是:以上各实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述各实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分或者全部技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的范围。

Claims (27)

  1. 一种应用数据的共享方法,其特征在于,包括:
    判断当前显示的第一应用是否为预设的白名单中的应用;
    若是,则根据所述第一应用的当前显示界面上的控件获取所述第一应用在当前显示界面上的显示数据,所述控件为所述当前显示界面的界面元素;
    根据用户输入的授权操作指令,确定是否将所述显示数据共享给第二应用使用;其中,所述授权操作指令包括用于指示将所述显示数据共享给所述第二应用的授权指令和用于指示禁止将所述显示数据共享给所述第二应用的禁止指令。
  2. 根据权利要求1所述的方法,其特征在于,所述根据所述第一应用的当前显示界面上的控件获取所述第一应用在当前显示界面上的显示数据,具体包括:
    根据所述第一应用当前显示界面上每个控件的数据属性,确定所述第一应用当前显示界面上的有效控件;所述有效控件为携带满足第一预设条件的数据的控件;所述数据属性包括所述控件中的文本长度、所述控件中的图片占当前界面的大小、所述控件中的动画占当前界面的大小中的至少一个;
    根据每个所述有效控件的数据,获取所述显示数据。
  3. 根据权利要求2所述的方法,其特征在于,所述根据所述第一应用当前显示界面上每个控件的数据属性,确定所述第一应用当前显示界面上的有效控件,具体包括:
    若所述控件的数据属性为所述控件中的文本长度,且所述控件中的文本长度大于预设的第一阈值,则确定所述控件为有效控件;
    或者,
    若所述控件的数据属性为所述控件中的图片占当前界面的大小,且所述控件中的图片占当前界面的大小大于预设的第二阈值,则确定所述控件为有效控件;
    或者,
    若所述控件的数据属性为所述控件中的动画占当前界面的大小,且所述控件中的动画占当前界面的大小大于预设的第三阈值,则确定所述控件为有效控件;
    其中,所述第一预设条件包括所述控件中数据的文本长度大于所述第一阈值、所述控件中的图片占当前界面的大小大于所述第二阈值、所述控件中的动画占当前界面的大小大于所述第三阈值中的任一个。
  4. 根据权利要求2所述的方法,其特征在于,所述根据每个所述有效控件的数据,获取所述显示数据,具体包括:
    根据所述第二应用的类型或者所述第二应用在操作系统上的注册信息,确定所述第二应用的数据整合机制;其中,所述第二应用的注册信息携带所述第二应用的数据整合机制;
    根据所述第二应用的数据整合机制,对所述第一应用当前显示界面上的所有有效控件的数据进行整合,并将整合后的数据确定为所述显示数据。
  5. 根据权利要求1-4任一项所述的方法,其特征在于,所述方法适用于安卓操作系统,所述安卓操作系统包括集成屏幕数据共享单元的应用框架层,所述屏幕数据共享单元提供面向所述第一应用的第一应用程序API接口和面向第二应用的第二API接口;
    所述屏幕数据共享单元根据所述第一应用的当前显示界面上的控件,通过所述第一API接口获取所述第一应用在当前显示界面上的显示数据;
    所述屏幕数据共享单元通过所述第二API接口将所述显示数据共享给所述第二应用。
  6. 根据权利要求1所述的方法,其特征在于,所述判断当前显示的第一应用是否为预设的白名单中的应用,具体包括:
    确定所述第一应用的上下文信息,所述上下文信息包括所述第一应用的标识和所述第一应用的当前显示界面的页面标识;
    判断所述第一应用的标识是否与所述白名单中的应用的标识匹配;
    若所述第一应用的标识与所述白名单中的应用的标识匹配,则判断所述第一应用的当前显示界面的页面标识是否与所述白名单中所述应用的页面标识匹配;
    若匹配,则确定所述第一应用为所述白名单中的应用。
  7. 根据权利要求1所述的方法,其特征在于,所述方法还包括:
    将所述显示数据进行缓存;
    若所述第一应用退出或者关闭,将所缓存的显示数据删除。
  8. 根据权利要求1-7任一项所述的方法,其特征在于,所述显示数据为JSON格式的数据,且所述显示数据携带所述第一应用的标识和/或所述第一应用的类型。
  9. 根据权利要求1-8任一项所述的方法,其特征在于,所述根据用户输入的授权操作指令,确定是否将所述显示数据共享给第二应用使用,具体包括:
    显示用户授权界面,所述用户授权界面用于接收用户的授权操作指令;
    若所述授权操作指令为授权指令,则将所述显示数据共享给第二应用使用;
    若所述授权操作指令为禁止指令,则禁止所述第二应用共享所述显示数据。
  10. 一种应用数据的共享装置,其特征在于,包括:判断模块、显示模块、获取模块和共享模块;
    所述判断模块,用于判断所述显示模块当前显示的第一应用是否为预设的白名单中的应用;
    所述获取模块,用于在所述判断模块判断所述第一应用为预设的白名单中的应用时,根据所述第一应用的当前显示界面上的控件获取所述第一应用在当前显示界面上的显示数据,所述控件为所述当前显示界面的界面元素;
    所述共享模块,用于根据用户输入的授权操作指令,确定是否将所述显示数据共享给第二应用使用;其中,所述授权操作指令包括用于指示将所述显示数据共享给所述第二应用的授权指令和用于指示禁止将所述显示数据共享给所述第二应用的禁止指令。
  11. 根据权利要求10所述的装置,其特征在于,所述获取模块,具体包括:
    确定单元,用于根据所述第一应用当前显示界面上每个控件的数据属性,确定所述第一应用当前显示界面上的有效控件;所述有效控件为携带满足第一预设条件的数据的控件;所述数据属性包括所述控件中的文本长度、所述控件中的图片占当前界面的大小、所述控件中的动画占当前界面的大小中的至少一个;
    获取单元,用于根据每个所述有效控件的数据,获取所述显示数据。
  12. 根据权利要求11所述的装置,其特征在于,所述确定单元,具体用于当所述控件的数据属性为所述控件中的文本长度,且所述控件中的文本长度大于预设的第一阈值时,确定所述控件为有效控件;或者,当所述控件的数据属性为所述控件中的图片占当前界面的大小,且所述控件中的图片占当前界面的大小大于预设的第二阈值时,确定所述控件为有效控件;或者,当所述控件的数据属性为所述控件中的动画占当前界面的大小,且所述控件中的动画占当前界面的大小大于预设的第三阈值时,确定所述控件为有效控件;
    其中,所述第一预设条件包括所述控件中数据的文本长度大于所述第一阈值、所述控件中的图片占当前界面的大小大于所述第二阈值、所述控件中的动画占当前界面的大小大于所述第三阈值中的任一个。
  13. 根据权利要求11所述的装置,其特征在于,所述获取单元,具体用于根据所述第二应用的类型或者所述第二应用在操作系统上的注册信息,确定所述第二应用的数据整合机制,并根据所述第二应用的数据整合机制,对所述第一应用当前显示界面上的所有有效控件的数据进行整合,并将整合后的数据确定为所述显示数据;其中,所述第二应用的注册信息携带所述第二应用的数据整合机制。
  14. 根据权利要求10-13任一项所述的装置,其特征在于,所述装置适用于安卓操作系统,所述安卓操作系统包括集成屏幕数据共享单元的应用框架层,所述屏幕数据共享单元提供面向所述第一应用的第一应用程序API接口和面向第二应用的第二API接口;
    所述屏幕数据共享单元根据所述第一应用的当前显示界面上的控件,通过所述第一API接口获取所述第一应用在当前显示界面上的显示数据;
    所述屏幕数据共享单元通过所述第二API接口将所述显示数据共享给所述第二应用。
  15. 根据权利要求10所述的装置,其特征在于,所述判断模块,具体用于确定所述第一应用的上下文信息,所述上下文信息包括所述第一应用的标识和所述第一应用的当前显示界面的页面标识;以及,判断所述第一应用的标识是否与所述白名单中的应用的标识匹配;若所述第一应用的标识与所述白名单中的应用的标识匹配,则判断所述第一应用的当前显示界面的页面标识是否与所述白名单中所述应用的页面标识匹配;若匹配,则确定所述第一 应用为所述白名单中的应用。
  16. 根据权利要求10所述的装置,其特征在于,所述装置还包括:
    存储模块,用于将所述显示数据进行缓存;
    删除模块,用于在所述第一应用退出或者关闭时,将所缓存的显示数据删除。
  17. 根据权利要求10-16任一项所述的装置,其特征在于,所述显示数据为JSON格式的数据,且所述显示数据携带所述第一应用的标识和/或所述第一应用的类型。
  18. 根据权利要求10-17任一项所述的装置,其特征在于,
    所述显示模块,还用于显示用户授权界面,所述用户授权界面用于接收用户的授权操作指令;
    所述共享模块,用于在所述授权操作指令为授权指令时,将所述显示数据共享给第二应用使用;或者,在所述授权操作指令为禁止指令时,禁止所述第二应用共享所述显示数据。
  19. 一种终端设备,其特征在于,包括输入设备、显示设备和处理器;
    所述处理器,用于判断所述显示设备当前显示的第一应用是否为预设的白名单中的应用,并在所述第一应用为所述白名单中的应用时,根据所述第一应用的当前显示界面上的控件获取所述第一应用在当前显示界面上的显示数据,所述控件为所述当前显示界面的界面元素;
    所述输入设备,用于接收用户输入的授权操作指令,所述授权操作指令包括用于指示将所述显示数据共享给所述第二应用的授权指令和用于指示禁止将所述显示数据共享给所述第二应用的禁止指令;
    所述处理器,还用于根据所述授权操作指令,确定是否将所述显示数据共享给第二应用使用。
  20. 根据权利要求19所述的终端设备,其特征在于,所述处理器,具体用于根据所述第一应用当前显示界面上每个控件的数据属性,确定所述第一应用当前显示界面上的有效控件,并根据每个所述有效控件的数据,获取所述显示数据;其中,所述有效控件为携带满足第一预设条件的数据的控件;所述数据属性包括所述控件中的文本长度、所述控件中的图片占当前界面的 大小、所述控件中的动画占当前界面的大小中的至少一个。
  21. 根据权利要求20所述的终端设备,其特征在于,所述处理器,用于根据所述第一应用当前显示界面上每个控件的数据属性,确定所述第一应用当前显示界面上的有效控件,具体包括:
    所述处理器,具体用于当所述控件的数据属性为所述控件中的文本长度,且所述控件中的文本长度大于预设的第一阈值时,确定所述控件为有效控件;或者,当所述控件的数据属性为所述控件中的图片占当前界面的大小,且所述控件中的图片占当前界面的大小大于预设的第二阈值时,确定所述控件为有效控件;或者,当所述控件的数据属性为所述控件中的动画占当前界面的大小,且所述控件中的动画占当前界面的大小大于预设的第三阈值时,确定所述控件为有效控件;
    其中,所述第一预设条件包括所述控件中数据的文本长度大于所述第一阈值、所述控件中的图片占当前界面的大小大于所述第二阈值、所述控件中的动画占当前界面的大小大于所述第三阈值中的任一个。
  22. 根据权利要求20所述的终端设备,其特征在于,所述处理器,用于根据每个所述有效控件的数据,获取所述显示数据,具体包括:
    所述处理器,具体用于根据所述第二应用的类型或者所述第二应用在操作系统上的注册信息,确定所述第二应用的数据整合机制,并根据所述第二应用的数据整合机制,对所述第一应用当前显示界面上的所有有效控件的数据进行整合,并将整合后的数据确定为所述显示数据;其中,所述第二应用的注册信息携带所述第二应用的数据整合机制;
  23. 根据权利要求19-22任一项所述的终端设备,其特征在于,所述终端设备为安卓操作系统,所述安卓操作系统包括集成屏幕数据共享单元的应用框架层,所述屏幕数据共享单元提供面向所述第一应用的第一应用程序API接口和面向第二应用的第二API接口;
    所述屏幕数据共享单元根据所述第一应用的当前显示界面上的控件,通过所述第一API接口获取所述第一应用在当前显示界面上的显示数据;
    所述屏幕数据共享单元通过所述第二API接口将所述显示数据共享给所述第二应用。
  24. 根据权利要求19所述的终端设备,其特征在于,所述处理器,用于 判断当前显示的第一应用是否为预设的白名单中的应用,具体包括:
    所述处理器,具体用于确定所述第一应用的上下文信息,所述上下文信息包括所述第一应用的标识和所述第一应用的当前显示界面的页面标识;以及判断所述第一应用的标识是否与所述白名单中的应用的标识匹配;若所述第一应用的标识与所述白名单中的应用的标识匹配,则判断所述第一应用的当前显示界面的页面标识是否与所述白名单中所述应用的页面标识匹配;若匹配,则确定所述第一应用为所述白名单中的应用。
  25. 根据权利要求19所述的终端设备,其特征在于,所述处理器,还用于指示存储器将所述显示数据进行缓存;并在所述第一应用退出或者关闭时,将所缓存的显示数据删除。
  26. 根据权利要求19-25任一项所述的终端设备,其特征在于,所述显示数据为JSON格式的数据,且所述显示数据携带所述第一应用的标识和/或所述第一应用的类型。
  27. 根据权利要求19-26任一项所述的终端设备,其特征在于,所述显示设备,还用于显示用户授权界面,所述用户授权界面用于接收用户的授权操作指令;
    所述处理器,具体用于当所述授权操作指令为授权指令时,将所述显示数据共享给第二应用使用;或者,当所述授权操作指令为禁止指令时,禁止所述第二应用共享所述显示数据。
PCT/CN2016/096100 2016-08-19 2016-08-19 应用数据的共享方法、装置和终端设备 WO2018032516A1 (zh)

Priority Applications (3)

Application Number Priority Date Filing Date Title
PCT/CN2016/096100 WO2018032516A1 (zh) 2016-08-19 2016-08-19 应用数据的共享方法、装置和终端设备
CN201680087271.2A CN109416652B (zh) 2016-08-19 2016-10-29 应用数据的共享方法、装置和终端设备
PCT/CN2016/103883 WO2018032612A1 (zh) 2016-08-19 2016-10-29 应用数据的共享方法、装置和终端设备

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2016/096100 WO2018032516A1 (zh) 2016-08-19 2016-08-19 应用数据的共享方法、装置和终端设备

Publications (1)

Publication Number Publication Date
WO2018032516A1 true WO2018032516A1 (zh) 2018-02-22

Family

ID=61196268

Family Applications (2)

Application Number Title Priority Date Filing Date
PCT/CN2016/096100 WO2018032516A1 (zh) 2016-08-19 2016-08-19 应用数据的共享方法、装置和终端设备
PCT/CN2016/103883 WO2018032612A1 (zh) 2016-08-19 2016-10-29 应用数据的共享方法、装置和终端设备

Family Applications After (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/103883 WO2018032612A1 (zh) 2016-08-19 2016-10-29 应用数据的共享方法、装置和终端设备

Country Status (2)

Country Link
CN (1) CN109416652B (zh)
WO (2) WO2018032516A1 (zh)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109413647A (zh) * 2018-10-18 2019-03-01 深圳壹账通智能科技有限公司 数据共享方法、装置、电子设备以及计算机可读存储介质
CN109813955A (zh) * 2019-02-25 2019-05-28 努比亚技术有限公司 充电电压异常提示方法、系统、穿戴式设备及存储介质
CN111159738A (zh) * 2019-12-26 2020-05-15 维沃移动通信有限公司 权限配置方法、应用登录方法及装置

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108415786B (zh) * 2018-03-13 2022-05-31 联想(北京)有限公司 信息处理方法及装置、电子设备和计算机可读介质
CN114679511A (zh) * 2020-12-24 2022-06-28 荣耀终端有限公司 操作控制方法、装置和电子设备
CN113888104B (zh) * 2021-06-21 2024-03-01 北京字跳网络技术有限公司 一种日程分享方法、装置及设备
CN113885764A (zh) * 2021-08-20 2022-01-04 阿里巴巴新加坡控股有限公司 数据处理方法及计算机程序产品
CN116795809B (zh) * 2023-04-27 2024-06-14 深圳市易立德信息科技有限公司 一种数据共享协同方法及其系统

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090287646A1 (en) * 2008-05-19 2009-11-19 Qualcomm Incorporated System and method for presenting a contextual action for an indicator
CN101923432A (zh) * 2010-06-10 2010-12-22 北京捷通华声语音技术有限公司 一种移动终端中应用程序的调用方法及装置
CN104933028A (zh) * 2015-06-23 2015-09-23 百度在线网络技术(北京)有限公司 信息推送方法和装置
CN105159788A (zh) * 2015-09-11 2015-12-16 Tcl集团股份有限公司 一种Android应用间动态共享资源的方法及系统
CN105278970A (zh) * 2014-06-16 2016-01-27 中兴通讯股份有限公司 一种数据处理方法、装置和终端

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4208085B2 (ja) * 2005-08-30 2009-01-14 インターナショナル・ビジネス・マシーンズ・コーポレーション アプリケーションプログラムの制御方法およびその装置
CN100556007C (zh) * 2007-03-30 2009-10-28 腾讯科技(深圳)有限公司 一种整合多个服务商提供的电子邮箱的方法及系统
US8433623B2 (en) * 2011-06-03 2013-04-30 Target Brands, Inc. Methods for creating a gift registry web page with recommendations and assistance
CN103324540B (zh) * 2012-03-21 2016-06-29 宏碁股份有限公司 电子系统与无缝分享方法
US9170714B2 (en) * 2012-10-31 2015-10-27 Google Technology Holdings LLC Mixed type text extraction and distribution
KR20140116682A (ko) * 2013-03-25 2014-10-06 (주)아펙스씨앤에스 컨텐츠 공유 방법
KR102187569B1 (ko) * 2013-07-08 2020-12-07 엘지전자 주식회사 이동 단말기 및 그것의 제어방법
US9514477B2 (en) * 2013-07-10 2016-12-06 AVG Netherlands B.V. Systems and methods for providing user-specific content on an electronic device
WO2015139246A1 (zh) * 2014-03-19 2015-09-24 华为终端有限公司 一种应用数据同步的方法及装置
CA2902105A1 (en) * 2014-08-28 2016-02-28 Radicalogic Technologies, Inc. Dba Rl Solutions System and method for health care data integration

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090287646A1 (en) * 2008-05-19 2009-11-19 Qualcomm Incorporated System and method for presenting a contextual action for an indicator
CN101923432A (zh) * 2010-06-10 2010-12-22 北京捷通华声语音技术有限公司 一种移动终端中应用程序的调用方法及装置
CN105278970A (zh) * 2014-06-16 2016-01-27 中兴通讯股份有限公司 一种数据处理方法、装置和终端
CN104933028A (zh) * 2015-06-23 2015-09-23 百度在线网络技术(北京)有限公司 信息推送方法和装置
CN105159788A (zh) * 2015-09-11 2015-12-16 Tcl集团股份有限公司 一种Android应用间动态共享资源的方法及系统

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109413647A (zh) * 2018-10-18 2019-03-01 深圳壹账通智能科技有限公司 数据共享方法、装置、电子设备以及计算机可读存储介质
CN109413647B (zh) * 2018-10-18 2022-08-05 深圳壹账通智能科技有限公司 数据共享方法、装置、电子设备以及计算机可读存储介质
CN109813955A (zh) * 2019-02-25 2019-05-28 努比亚技术有限公司 充电电压异常提示方法、系统、穿戴式设备及存储介质
CN111159738A (zh) * 2019-12-26 2020-05-15 维沃移动通信有限公司 权限配置方法、应用登录方法及装置
CN111159738B (zh) * 2019-12-26 2023-05-23 维沃移动通信有限公司 权限配置方法、应用登录方法及装置

Also Published As

Publication number Publication date
WO2018032612A1 (zh) 2018-02-22
CN109416652A (zh) 2019-03-01
CN109416652B (zh) 2022-10-04

Similar Documents

Publication Publication Date Title
WO2018032516A1 (zh) 应用数据的共享方法、装置和终端设备
US11798107B2 (en) Scenario-based application recommendation method and apparatus
KR102150514B1 (ko) 디바이스 및 그를 이용한 컨텐츠 공유 방법
JP6442076B2 (ja) 推奨コンテンツに基づく対話方法、端末及びサーバ
US10164984B2 (en) Method and apparatus for sharing data
AU2010327453B2 (en) Method and apparatus for providing user interface of portable device
WO2016169465A1 (zh) 一种显示弹幕信息的方法、装置和系统
WO2019206158A1 (zh) 一种界面显示方法、装置及设备
CN115454286B (zh) 应用数据的处理方法、装置和终端设备
WO2018153100A1 (zh) 一种显示收藏对象的方法和终端
EP3726376B1 (en) Program orchestration method and electronic device
US10637804B2 (en) User terminal apparatus, communication system, and method of controlling user terminal apparatus which support a messenger service with additional functionality
WO2015035796A1 (zh) 桌面显示方法、装置及终端
TW201519073A (zh) 一種終端裝置快捷回覆操作方法和終端裝置
WO2016184295A1 (zh) 即时通讯方法、用户设备及系统
KR20170137821A (ko) 자원 이전을 위한 시스템 및 방법
WO2019101043A1 (zh) 图像处理方法、终端、计算机存储介质及计算机程序
TW201911066A (zh) 文件夾發送方法、發送終端、接收終端以及存儲介質
WO2015003636A1 (zh) 一种页面元素的拦截方法和装置
US20180270179A1 (en) Outputting reengagement alerts by a computing device
KR102138787B1 (ko) 디바이스 및 그를 이용한 컨텐츠 공유 방법
TWI575458B (zh) 基於應用的服務提供方法、裝置及系統
CN107357651B (zh) 应用加速方法、装置以及终端
CN108427549B (zh) 通知消息的声音处理方法、装置、存储介质及终端
KR101876394B1 (ko) 단말기에 미디어 데이터를 재생하는 방법 및 장치

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 16913272

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 16913272

Country of ref document: EP

Kind code of ref document: A1