WO2015188771A1 - Method and apparatus for processing application notification message, and terminal device - Google Patents

Method and apparatus for processing application notification message, and terminal device Download PDF

Info

Publication number
WO2015188771A1
WO2015188771A1 PCT/CN2015/081285 CN2015081285W WO2015188771A1 WO 2015188771 A1 WO2015188771 A1 WO 2015188771A1 CN 2015081285 W CN2015081285 W CN 2015081285W WO 2015188771 A1 WO2015188771 A1 WO 2015188771A1
Authority
WO
WIPO (PCT)
Prior art keywords
application
notification message
identification information
processing
desktop
Prior art date
Application number
PCT/CN2015/081285
Other languages
French (fr)
Inventor
Yongzhi Guo
Bin Li
Cheng Luo
Original Assignee
Tencent Technology (Shenzhen) Company Limited
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 Tencent Technology (Shenzhen) Company Limited filed Critical Tencent Technology (Shenzhen) Company Limited
Publication of WO2015188771A1 publication Critical patent/WO2015188771A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/26Power supply means, e.g. regulation thereof
    • G06F1/32Means for saving power
    • G06F1/3203Power management, i.e. event-based initiation of a power-saving mode
    • 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/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces

Definitions

  • the present disclosure relates to the field of data processing technologies, and in particular, to a method and an apparatus for processing an application notification message, and a terminal device.
  • An application notification message refers to an application message that is acquired by using an application installed in a terminal device and needs to be notified to a user.
  • the application notification message may be an instant messaging message;
  • the application notification message may be content of an email.
  • the application notification message may be directly displayed on the application interface, so that a user may intuitively learn the application notification message;
  • the terminal device displays a prompt message in a notification bar of the current interface, so as to prompt the user that an application in the terminal device acquires an application notification message; however, the prompt message only can be used for prompting acquisition of the application notification message, and cannot display specific content of the application notification message; if the specific content of the application notification message needs to be acquired, the user needs to manually set the application running in the background to a state of running in the foreground, and the application notification message can be displayed only after the application interface is entered.
  • embodiments of the present invention provide a method and an apparatus for processing an application notification message, and a terminal device, so as to solve a problem, which is brought by a manner that in an existing situation that an application acquiring an application notification message is in a state of running in the background, a user needs to set the application running in the background to a state of running in the foreground, and the application notification message can be displayed only after an application interface is entered, that operations of a user are complicated in a process of displaying the application notification message.
  • a method for processing an application notification message includes:
  • An embodiment of the present invention further provides an apparatus for processing an application notification message, including:
  • an encapsulation module configured to: when an application running in the background acquires an application notification message, encapsulate the application notification message into a notification bar object, the application being registered to a desktop starter in advance;
  • a display module configured to display an area on a desktop corresponding to the desktop application, so as to display the application notification message.
  • An embodiment of the present invention further provides a terminal device, including the foregoing apparatus for processing an application notification message.
  • the application notification message acquired by the application in the state of running in the background may be displayed on the desktop, so that a user can view the application notification message by using the desktop without the need of manually setting the application running in the background to a state of running in the foreground, which greatly reduces operations of the user, and therefore reduces power consumption of the terminal device.
  • the user can view the application notification message extremely conveniently, which is convenient for the user to process the application notification message.
  • FIG. 1 is a flowchart of a method for processing an application notification message according to an embodiment of the present invention
  • FIG. 2 is another flowchart of a method for processing an application notification message according to an embodiment of the present invention
  • FIG. 3 is still another flowchart of a method for processing an application notification message according to an embodiment of the present invention
  • FIG. 4 is a flowchart of a method for performing inter-process communication according to an embodiment of the present invention.
  • FIG. 5 is yet another flowchart of a method for processing an application notification message according to an embodiment of the present invention.
  • FIG. 6 is a schematic diagram of an example of an application according to an embodiment of the present invention.
  • FIG. 7 is still yet another flowchart of a method for processing an application notification message according to an embodiment of the present invention.
  • FIG. 8 is a structural block diagram of an apparatus for processing an application notification message according to an embodiment of the present invention.
  • FIG. 9 is another structural block diagram of an apparatus for processing an application notification message according to an embodiment of the present invention.
  • FIG. 10 is a structural block diagram of an encapsulation module according to an embodiment of the present invention.
  • FIG. 11 is still another structural block diagram of an apparatus for processing an application notification message according to an embodiment of the present invention.
  • FIG. 12 is a structural block diagram of a first transmission module according to an embodiment of the present invention.
  • FIG. 14 is a structural block diagram of a first format conversion unit according to an embodiment of the present invention.
  • FIG. 15 is yet another structural block diagram of an apparatus for processing an application notification message according to an embodiment of the present invention.
  • FIG. 16 is still yet another structural block diagram of an apparatus for processing an application notification message according to an embodiment of the present invention.
  • FIG. 17 is a structural block diagram of a second transmission module according to an embodiment of the present invention.
  • FIG. 18 is a block diagram of a structure of hardware of a terminal device according to an embodiment of the present invention.
  • FIG. 1 is a flowchart of a method for processing an application notification message according to an embodiment of the present invention.
  • the method is applied to a terminal device, and the terminal device may be a device such as a smartphone, a tablet computer, and a notebook computer.
  • the method may include:
  • Step S100 When an application running in the background acquires an application notification message, encapsulate the application notification message into a notification bar object, where the application is registered to a desktop starter in advance.
  • the application is registered to the desktop starter, that is, the application is registered to a desktop, so that information originally loaded in a notification bar by the application registered to the desktop can be processed on the desktop, that is, application information previously thrown to the notification bar at the top of a system for displaying may be displayed on the desktop now (for example, in the existing technology, one short message service message application acquires one short message service message, a prompt is popped up at the top of the notification bar of the system, and if the short message service message application is registered to the desktop, the short message service message prompt may be directly displayed on the desktop) .
  • the application notification message may be encapsulated into a NotificationItem object (a form of expression of the notification bar object) in a method for invoking a showNotification.
  • a NotificationItem object a form of expression of the notification bar object
  • Step S110 Perform inter-process communication on the notification bar object by using a content provider corresponding to an operating system, so as to transmit, to a desktop application that is currently in a running state, the application notification message carried in the notification bar object.
  • Step S120 Display an area on a desktop corresponding to the desktop application, so as to display the application notification message.
  • the area for displaying the application notification message may be displayed by superposing on a current interface of the desktop, and obviously, may also be displayed on the desktop in another manner.
  • an application may be registered to a desktop starter in advance, when the application is in a state of running in the background and acquires an application notification message, the application notification message may be encapsulated into a notification bar object, so as to support communication transmission on the application notification message in a bottom layer of a terminal device, and inter-process communication is performed on the notification bar object by using a content provider corresponding to an operating system, so that a desktop application that is currently in a running state can acquire the application notification message, thereby displaying, on a corresponding desktop, an area for displaying the application notification message.
  • the application notification message acquired by the application in the state of running in the background may be displayed on the desktop, so that a user can view the application notification message by using the desktop without the need of manually setting the application running in the background to a state of running in the foreground, which greatly reduces operations of the user, and therefore reduces power consumption of the terminal device.
  • the user can view the application notification message extremely conveniently, which is convenient for the user to process the application notification message.
  • the desktop for displaying the application notification message may be a corresponding desktop interface when a home key of the terminal device is triggered.
  • first identification information of the desktop application that is currently in a running state may be compared with predetermined first identification information by invoking an isLauncherValid () method, to perform validity verification on the desktop application that is currently in a running state, where the first identification information indicates identification information of the desktop application, such as a packet name of the desktop application, and a signature; and the predetermined first identification information may be identification information corresponding to a valid desktop application preset in the terminal device.
  • the application running in the background acquires the application notification message
  • verification may be performed on the desktop application that is currently in a running state.
  • the application running in the background acquires the application notification message
  • the first identification information of the desktop application that is currently in a running state may be acquired. If the first identification information corresponds to the predetermined first identification information, the operation of encapsulating the application notification message into the notification bar object is performed, and a process of the method for processing an application notification message provided in this embodiment of the present invention is performed. If the first identification information does not correspond to the predetermined first identification information, the operation of encapsulating the application notification message into the notification bar object is canceled, so as to prevent the application notification message from being transmitted to an invalid desktop application.
  • FIG. 2 shows another flowchart of a method for processing an application notification message according to an embodiment of the present invention.
  • the method may include:
  • the application running in the background may be an application registered to a desktop starter in advance.
  • Step S210 If the first identification information of the desktop application that is currently in a running state does not correspond to predetermined first identification information, cancel encapsulating the application notification message into a notification bar object.
  • Step S220 If the first identification information of the desktop application that is currently in a running state corresponds to the predetermined first identification information, encapsulate the application notification message into the notification bar object.
  • Step S230 Perform inter-process communication on the notification bar object by using a content provider corresponding to an operating system, so as to transmit, to the desktop application that is currently in a running state, the application notification message carried in the notification bar object.
  • Step S240 Display an area on a desktop corresponding to the desktop application, so as to display the application notification message.
  • FIG. 3 shows still another flowchart of a method for processing an application notification message according to an embodiment of the present invention.
  • the method may include:
  • Step S300 When an application running in the background acquires an application notification message, encapsulate the application notification message into a notification bar object, where the application is registered to a desktop starter in advance.
  • Step S310 Acquire first identification information of a desktop application that is currently in a running state.
  • Step S320 If the first identification information of the desktop application that is currently in a running state does not correspond to predetermined first identification information, cancel performing inter-process communication on the notification bar object by using a content provider corresponding to an operating system.
  • the operation of performing inter-process communication on the notification bar object by using the content provider corresponding to the operating system may be canceled, the process is ended, and the method for processing an application notification message provided in this embodiment of the present invention is not performed.
  • Step S330 If the first identification information of the desktop application that is currently in a running state corresponds to the predetermined first identification information, perform inter-process communication on the notification bar object by using the content provider corresponding to the operating system, so as to transmit, to the desktop application that is currently in a running state, the application notification message carried in the notification bar object.
  • data format of the notification bar object is converted into a predetermined data format, and after the desktop application receives data in the predetermined data format, the data in the predetermined data format may be converted into the notification bar object through reflection.
  • FIG. 4 shows a flowchart of a method for performing inter-process communication according to an embodiment of the present invention.
  • the method may include:
  • Step S400 Convert a notification bar object into data in a predetermined data format, perform inter-process communication by using a content provider corresponding to an operating system, and transmit the data in the predetermined data format to a desktop application that is currently in a running state.
  • the predetermined data format may be a json data format
  • a structure of the notification bar object (such as a structure of a notificationItem) includes information of a field, which needs to be displayed, of the application notification message (such as a new short message service message or email content) .
  • the structure of the notification bar object may be converted into a data structure of json.
  • an attribute name in the structure of the notification bar object may be used as a key of json
  • attribute content of the structure of the notification bar object is used as a value of json
  • the data in json may be converted into the structure of the notification bar object through reflection.
  • Data transmission in the bottom layer is performed in the json data format, and desirable scalability may be presented when a protocol of data transmission in the bottom layer is improved.
  • a key indicates an identifier of data to be requested, for example, when content of a short message service message is requested, one key in a program represents the content of the short message service message, and we may use an sms_body as a key of the content of the short message service message.
  • the key an English identifier in a piece of code, and identifies one attribute (such as content of a short message service message) , and each key corresponds to one attribute;
  • a value indicates specific content in the attribute identified by the key, for example, a value that we obtain by using the key of the content of the short message service message which is the sms_body is real content of the short message service message;
  • value get (key) is indicated by using program code; a value corresponding to a same key may be removed.
  • this embodiment of the present invention may be implemented by using a software development kit (sdk) provided by the desktop application, data transmitted by the sdk may be a structure of a user-defined notificationItem, and the sdk includes a registerApp interface method, an isLauncherValid () method, a showNotification method, and the like.
  • the method for processing an application notification message provided in this embodiment of the present invention is introduced below by using an sdk method. It should be noted that an implementation manner introduced below may merely be an optional implementation manner.
  • FIG. 5 shows yet another flowchart of a method for processing an application notification message according to an embodiment of the present invention. Referring to FIG. 5, the method may include:
  • Step S500 Invoke a registerApp interface, and register an application to a desktop starter.
  • Step S510 When the application is in a state of running in the background, and acquires an application notification message, invoke an isLauncherValid () method to verify first identification information of a desktop application that is currently in a running state.
  • Step S530 If the first identification information corresponds to the predetermined first identification information, invoke a showNotification method, and encapsulate the application notification message into a NotificationItem object.
  • Step S540 Convert the NotificationItem object into data in a json format, perform inter-process communication by using a ContentProvider component corresponding to an operating system, and transmit the data in the json format to the desktop application.
  • Step S550 Control the desktop application to convert the data in the json format into the NotificationItem object, and acquire the application notification message carried in the NotificationItem object.
  • Step S560 Display an area on a desktop corresponding to the desktop application, so as to display the application notification message.
  • FIG. 6 is a schematic diagram of an example of an application according to an embodiment of the present invention.
  • an interface currently displayed by a terminal device 10 is a desktop
  • an application 11 registered to a desktop starter is in a state of running in the background
  • the state of running in the background of the application 11 may be learned by using a notification bar 12 of the desktop.
  • description of content displayed by the terminal device 10 may be content displayed after a home key provided by the terminal device 10 is clicked.
  • an application notification message of the application 11 is acquired, according to the method for processing an application notification message provided in this embodiment of the present invention, content displayed by the desktop of the terminal device 10 changes, and the desktop of the terminal device 10 displays an area 13 that is displayed in a superposing manner, to display the application notification message.
  • a result of processing the application notification message by a user may further be fed back to the application.
  • the chat message may be displayed on the desktop by using the method for processing an application notification message provided in this embodiment of the present invention, and after viewing the displayed application notification message, the user may edit the message by using the area for displaying the application notification message, so as to feed an edited message to the application, implementing sending of the edited message to the friend.
  • FIG. 7 shows still yet another flowchart of a method for processing an application notification message according to an embodiment of the present invention.
  • the method may include:
  • Step S600 Control an application to inherit a notification event processing method.
  • NotificationEventHandle the notification event processing method
  • an int callback (int actionId, NotificationItem notificationItem) method is called back, where NotificationItem is specific data content, and actionid indicates operations performed by the desktop.
  • one short message service message application acquires a new short message service message and displays the short message service message on the desktop, when the desktop deletes the short message service message, the short message service message application is notified in the callBack method.
  • a value in the actionId represents a deleting operation
  • content in the notificationItem is specific content of the deleted short message service message.
  • NotificationEventHandler is a class that is in the sdk, related to the ContentProvider, and is used for processing a notification event.
  • Step S610 Acquire information about processing on an application notification message.
  • the processing information may be obtained after a user performs editing by using the area for displaying the application notification message, and the area for displaying the application notification message may be an interface provided for performing editing by the user.
  • Step S620 Invoke a callback method, perform inter-process communication by using a content provider corresponding to the application, and transmit the processing information to the application.
  • second identification information (the second identification information indicates identification information of the application) of the application is acquired, where the second identification information may be information of a signature of the application, and the like. If the second identification information corresponds to predetermined second identification information (the predetermined second identification information may be identification information corresponding to a valid application) , it indicates that the application is a valid application, the callback method may be invoked, inter-process communication is performed by using a content provider corresponding to the application, and the processing information is transmitted to the application. If the second identification information does not correspond to the predetermined second identification information, it indicates that the application is an invalid application, invoking the callback method may be canceled, inter-process communication is not performed by using the content provider corresponding to the application, and the process is ended.
  • the predetermined second identification information may be carried to the desktop application when the application is registered to the desktop starter.
  • the second identification information of the application may be carried in registration information, and the second identification information is used as the predetermined second identification information.
  • the processing information may be smoothly transmitted only when the second identification information of the application corresponds to the predetermined second identification information, which prevents the processing information from being transmitted to an invalid application.
  • an application notification message acquired by an application in a state of running in the background may be displayed on a desktop, so that a user can view the application notification message by using the desktop without the need of setting the application running in the background to a state of running in the foreground. Therefore, a manner for displaying the application notification message acquired by the application in the state of running in the background is extremely convenient.
  • the user may process the application notification message by using an area, which is displayed on the desktop, for displaying the application notification message, and obtained processing information may also be transmitted by a desktop application to the application in the state of running in the background, so as to accurately process the processing information. Therefore, a manner for processing the application notification message by the user is extremely convenient.
  • FIG. 8 is a structural block diagram of an apparatus for processing an application notification message according to an embodiment of the present invention.
  • the apparatus may be applied to a terminal device, and the terminal device may be a device such as a smartphone, a tablet computer, and a notebook computer.
  • the apparatus for processing an application notification message may include:
  • an encapsulation module 100 configured to: when an application running in the background acquires an application notification message, encapsulate the application notification message into a notification bar object, where the application is registered to a desktop starter in advance;
  • a first transmission module 200 configured to perform inter-process communication on the notification bar object by using a content provider corresponding to an operating system, so as to transmit, to a desktop application that is currently in a running state, the application notification message carried in the notification bar object;
  • a display module 300 configured to display an area on a desktop corresponding to the desktop application, so as to display the application notification message.
  • FIG. 9 shows another structure of an apparatus for processing an application notification message according to an embodiment of the present invention.
  • the apparatus for processing an application notification message may further include:
  • a first verification module 400 configured to: after the application running in the background acquires the application notification message, acquire first identification information of the desktop application that is currently in a running state, and compare the first identification information with predetermined first identification information.
  • a first encapsulation unit 110 configured to: when the first identification information corresponds to the predetermined first identification information, encapsulate the application notification message into the notification bar object.
  • FIG. 11 shows still another structure of an apparatus for processing an application notification message according to an embodiment of the present invention.
  • the apparatus for processing an application notification message may further include:
  • a second verification module 500 configured to: after the application notification message is encapsulated into the notification bar object, acquire the first identification information of the desktop application that is currently in a running state, and compare the first identification information with the predetermined first identification information.
  • FIG. 12 shows an optional structure of the first transmission module 200 according to an embodiment of the present invention.
  • the first transmission module 200 may include:
  • a first transmission unit 210 configured to: when the first identification information corresponds to the predetermined first identification information, perform inter-process communication on the notification bar object by using the content provider corresponding to the operating system.
  • FIG. 13 shows another optional structure of the first transmission module 200 according to an embodiment of the present invention.
  • the first transmission module 200 may include:
  • a first inter-process communication unit 221, configured to perform inter-process communication by using the content provider corresponding to the operating system, and transmit the data in the predetermined data format to the desktop application that is currently in a running state;
  • a second format conversion unit 222 configured to control the desktop application to convert the data in the predetermined data format into the notification bar object, so as to transmit, to the desktop application, the application notification message carried in the notification bar object.
  • the predetermined data format may be a json format.
  • FIG. 14 shows an optional structure of the first format conversion unit 220.
  • the first format conversion unit 220 may include:
  • an attribute determining subunit 2201 configured to use an attribute name in a structure of the notification bar object as a key of json, and use attribute content in the structure of the notification bar object as a value of json.
  • FIG. 15 shows yet another structural block diagram of an apparatus for processing an application notification message according to an embodiment of the present invention.
  • the apparatus for processing an application notification message may further include:
  • a processing information acquiring module 600 configured to acquire information about processing on the application notification message
  • a second transmission module 700 configured to invoke a callback method, perform inter-process communication by using a content provider corresponding to the application, and transmit the processing information to the application;
  • a processing module 800 configured to control the application to process the processing information.
  • FIG. 16 shows still yet another structure of an apparatus for processing an application notification message according to an embodiment of the present invention.
  • the apparatus for processing an application notification message may further include:
  • a third verification module 900 configured to: after the information about processing on the application notification message is acquired, acquire second identification information of the application, and compare the second identification information with predetermined second identification information.
  • FIG. 17 shows an optional structure of the second transmission module 700 according to an embodiment of the present invention.
  • the second transmission module 700 may include:
  • the user may process the application notification message by using an area, which is displayed on the desktop, for displaying the application notification message, and obtained processing information may also be transmitted by a desktop application to the application in the state of running in the background, so as to accurately process the processing information. Therefore, a manner for processing the application notification message by the user is extremely convenient.
  • An embodiment of the present invention further provides a terminal device, and the terminal device may include the foregoing apparatus for processing an application notification message.
  • the terminal device may include the foregoing apparatus for processing an application notification message.
  • the communications interface 2 may be an interface of a communications module, such as an interface of a GSM module;
  • the program may include a program code, and the program code include a computer operation instruction.
  • the memory 3 may include a high-speed RAM memory, and may further include a non-volatile memory, such as at least one magnetic disk memory.
  • the steps of the method or algorithm according to the embodiments disclosed in this specification can be implemented by hardware or a software module executed by a processor, or implemented by a combination thereof.
  • the software module may be stored in a random access memory (RAM) , a memory, a read-only memory (ROM) , an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable magnetic disk, a CD-ROM, or any other type of storage medium commonly known in the art.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Telephone Function (AREA)
  • Information Transfer Between Computers (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

A method and an apparatus for processing an application notification message, and a terminal device are provided. The method includes: encapsulating an application notification message into a notification bar object when an application running in the background acquires the application notification message, where the application is registered to a desktop starter in advance (S100); performing inter-process communication on the notification bar object by using a content provider corresponding to an operating system, so as to transmit, to a desktop application that is currently in a running state, the application notification message carried in the notification bar object (S110); displaying an area on a desktop corresponding to the desktop application, so as to display the application notification message (S120). The application notification message acquired by the application in a state of running in the background may be displayed on the desktop, which greatly reduces operations of a user in a process of displaying the application notification message, and therefore reduces power consumption of the terminal device.

Description

METHOD AND APPARATUS FOR PROCESSING APPLICATION NOTIFICATION MESSAGE, AND TERMINAL DEVICE
FIELD OF THE TECHNOLOGY
The present disclosure relates to the field of data processing technologies, and in particular, to a method and an apparatus for processing an application notification message, and a terminal device.
BACKGROUND OF THE DISCLOSURE
An application notification message refers to an application message that is acquired by using an application installed in a terminal device and needs to be notified to a user. For example, for an instant messaging application, the application notification message may be an instant messaging message; for an email application, the application notification message may be content of an email.
Currently, after an application in a terminal device acquires an application notification message, there are mainly two manners for displaying the application notification message:
if a currently running interface of the terminal device is an application interface of an application acquiring the application notification message, the application notification message may be directly displayed on the application interface, so that a user may intuitively learn the application notification message; and
if the currently running interface of the terminal device is not the application interface of the application acquiring the application notification message, that is, the application acquiring the application notification message is in a state of running in the background, the terminal device displays a prompt message in a notification bar of the current interface, so as to prompt the user that an application in the terminal device acquires an application notification message; however, the prompt message only can be used for prompting acquisition of the application notification message, and cannot display specific content of the application notification message; if the specific content of the application notification message needs to be acquired, the user needs to manually set the application running in the background to a state of running in the foreground, and the application notification message can be displayed only after the application interface is entered.
It may be seen that, when the application acquiring the application notification message is in the state of running in the background, the user needs to manually set the application running in the background to the state of running in the foreground, the application notification message can be displayed only after the application interface is entered, and operations of the user are complicated in a process of displaying the application notification message, which therefore causes large power consumption of the terminal device.
SUMMARY
In view of this, embodiments of the present invention provide a method and an apparatus for processing an application notification message, and a terminal device, so as to solve a problem, which is brought by a manner that in an existing situation that an application acquiring an application notification message is in a state of running in the background, a user needs to set the application running in the background to a state of running in the foreground, and the application notification message can be displayed only after an application interface is entered, that operations of a user are complicated in a process of displaying the application notification message..
In order to achieve the foregoing objective, the embodiments of the present invention provide the following technical solutions:
A method for processing an application notification message includes:
encapsulating an application notification message into a notification bar object when an application running in the background acquires the application notification message, the application being registered to a desktop starter in advance;
performing inter-process communication on the notification bar object by using a content provider corresponding to an operating system, so as to transmit, to a desktop application that is currently in a running state, the application notification message carried in the notification bar object; and
displaying an area on a desktop corresponding to the desktop application, so as to display the application notification message.
An embodiment of the present invention further provides an apparatus for processing an application notification message, including:
an encapsulation module, configured to: when an application running in the background acquires an application notification message, encapsulate the application notification message into a notification bar object, the application being registered to a desktop starter in advance;
a first transmission module, configured to perform inter-process communication on the notification bar object by using a content provider corresponding to an operating system, so as to transmit, to a desktop application that is currently in a running state, the application notification message carried in the notification bar object; and
a display module, configured to display an area on a desktop corresponding to the desktop application, so as to display the application notification message.
An embodiment of the present invention further provides a terminal device, including the foregoing apparatus for processing an application notification message.
Based on the foregoing technical solutions, according to the method for processing an application notification message provided in the embodiments of the present invention, an application may be registered to a desktop starter in advance, when the application is in a state of running in the background and acquires an application notification message, the application notification message may be encapsulated into a notification bar object, so as to support communication transmission on the application notification message in a bottom layer of a terminal device, and inter-process communication is performed on the notification bar object by using a content provider corresponding to an operating system, so that a desktop application that is currently in a running state can acquire the application notification message, thereby displaying, on a corresponding desktop, an area for displaying the application notification message. According to the embodiments of the present invention, the application notification message acquired by the application in the state of running in the background may be displayed on the desktop, so that a user can view the application notification message by using the desktop without the need of manually setting the application running in the background to a state of running in the foreground, which greatly reduces operations of the user, and therefore reduces power consumption of the terminal device. According to the embodiments of the present invention, the user can view the application notification message extremely conveniently, which is convenient for the user to process the application notification message.
BRIEF DESCRIPTION OF THE DRAWINGS
To describe the technical solutions according to the embodiments of the present invention or in the existing technology more clearly, the accompanying drawings required for describing the embodiments or the existing technology are introduced briefly in the following. Apparently, the accompanying drawings in the following description are only some embodiments of the present invention, and a person of ordinary skill in the art can derive other drawings from the accompanying drawings without creative efforts.
FIG. 1 is a flowchart of a method for processing an application notification message according to an embodiment of the present invention;
FIG. 2 is another flowchart of a method for processing an application notification message according to an embodiment of the present invention;
FIG. 3 is still another flowchart of a method for processing an application notification message according to an embodiment of the present invention;
FIG. 4 is a flowchart of a method for performing inter-process communication according to an embodiment of the present invention;
FIG. 5 is yet another flowchart of a method for processing an application notification message according to an embodiment of the present invention;
FIG. 6 is a schematic diagram of an example of an application according to an embodiment of the present invention;
FIG. 7 is still yet another flowchart of a method for processing an application notification message according to an embodiment of the present invention;
FIG. 8 is a structural block diagram of an apparatus for processing an application notification message according to an embodiment of the present invention;
FIG. 9 is another structural block diagram of an apparatus for processing an application notification message according to an embodiment of the present invention;
FIG. 10 is a structural block diagram of an encapsulation module according to an embodiment of the present invention;
FIG. 11 is still another structural block diagram of an apparatus for processing an application notification message according to an embodiment of the present invention;
FIG. 12 is a structural block diagram of a first transmission module according to an embodiment of the present invention;
FIG. 13 is another structural block diagram of a first transmission module according to an embodiment of the present invention;
FIG. 14 is a structural block diagram of a first format conversion unit according to an embodiment of the present invention;
FIG. 15 is yet another structural block diagram of an apparatus for processing an application notification message according to an embodiment of the present invention;
FIG. 16 is still yet another structural block diagram of an apparatus for processing an application notification message according to an embodiment of the present invention;
FIG. 17 is a structural block diagram of a second transmission module according to an embodiment of the present invention; and
FIG. 18 is a block diagram of a structure of hardware of a terminal device according to an embodiment of the present invention.
DESCRIPTION OF EMBODIMENTS
The technical solutions of the present disclosure will be clearly and completely described in the following with reference to the accompanying drawings in the embodiments of the present invention. It is obvious that the embodiments to be described are only a part rather than all of the embodiments of the present invention. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present disclosure.
FIG. 1 is a flowchart of a method for processing an application notification message according to an embodiment of the present invention. The method is applied to a terminal device, and the terminal device may be a device such as a smartphone, a tablet computer, and a notebook computer. Referring to FIG. 1, the method may include:
Step S100: When an application running in the background acquires an application notification message, encapsulate the application notification message into a notification bar object, where the application is registered to a desktop starter in advance.
Optionally, a manner for acquiring the application notification message by the application running in the background may be: when the application is in a state of running in the background, monitoring a network port of the terminal device, and when an updated application notification message exists in the network port, determining that the application acquires the application notification message. It is obvious that the application notification message may also be locally generated by the terminal device. For example, for an application having an event prompt function, after specific content of an event is set, the application is set to the state of running in the background, and when a current time is a prompt time, the application needs to prompt the specific content of the event. In this case, it may also be considered that the specific content, which is acquired by the application, of the event is the application notification message.
The application running in the background referred to as in this embodiment of the present invention is the application registered to the desktop starter in advance. Optionally, in this  embodiment of the present invention, registration of the application to the desktop starter may be performed by using a registerApp interface. One application is registered to the desktop starter, and registered information of the application includes: a packet name of the application (a packet name is a unique identifier of one application in a mobile phone) , and a callback address of the application (an action of a callback address is that if a desktop needs to backhaul data to an application, the callback address is needed) .
In this embodiment of the present invention, the application is registered to the desktop starter, that is, the application is registered to a desktop, so that information originally loaded in a notification bar by the application registered to the desktop can be processed on the desktop, that is, application information previously thrown to the notification bar at the top of a system for displaying may be displayed on the desktop now (for example, in the existing technology, one short message service message application acquires one short message service message, a prompt is popped up at the top of the notification bar of the system, and if the short message service message application is registered to the desktop, the short message service message prompt may be directly displayed on the desktop) .
Optionally, in this embodiment of the present invention, the application notification message may be encapsulated into a NotificationItem object (a form of expression of the notification bar object) in a method for invoking a showNotification.
Step S110: Perform inter-process communication on the notification bar object by using a content provider corresponding to an operating system, so as to transmit, to a desktop application that is currently in a running state, the application notification message carried in the notification bar object.
Optionally, the content provider may be one ContentProvider component. For example, for an android (android) system, a ContentProvider provided by the android system may be found in an android. provider packet.
Step S120: Display an area on a desktop corresponding to the desktop application, so as to display the application notification message.
Optionally, the area for displaying the application notification message may be displayed by superposing on a current interface of the desktop, and obviously, may also be displayed on the desktop in another manner.
According to the method for processing an application notification message provided in this embodiment of the present invention, an application may be registered to a desktop starter in advance, when the application is in a state of running in the background and acquires an application  notification message, the application notification message may be encapsulated into a notification bar object, so as to support communication transmission on the application notification message in a bottom layer of a terminal device, and inter-process communication is performed on the notification bar object by using a content provider corresponding to an operating system, so that a desktop application that is currently in a running state can acquire the application notification message, thereby displaying, on a corresponding desktop, an area for displaying the application notification message. According to this embodiment of the present invention, the application notification message acquired by the application in the state of running in the background may be displayed on the desktop, so that a user can view the application notification message by using the desktop without the need of manually setting the application running in the background to a state of running in the foreground, which greatly reduces operations of the user, and therefore reduces power consumption of the terminal device. According to this embodiment of the present invention, the user can view the application notification message extremely conveniently, which is convenient for the user to process the application notification message.
Optionally, the desktop for displaying the application notification message may be a corresponding desktop interface when a home key of the terminal device is triggered.
Optionally, in order to ensure that the desktop application that is currently in a running state is a desktop application that is authorized and may be used for displaying the application notification message, in this embodiment of the present invention, validity verification may be performed on the desktop application that is currently in a running state. Optionally, in this embodiment of the present invention, first identification information of the desktop application that is currently in a running state may be compared with predetermined first identification information by invoking an isLauncherValid () method, to perform validity verification on the desktop application that is currently in a running state, where the first identification information indicates identification information of the desktop application, such as a packet name of the desktop application, and a signature; and the predetermined first identification information may be identification information corresponding to a valid desktop application preset in the terminal device.
Optionally, in this embodiment of the present invention, when the application running in the background acquires the application notification message, verification may be performed on the desktop application that is currently in a running state. Specifically, when the application running in the background acquires the application notification message, the first identification information of the desktop application that is currently in a running state may be acquired. If the first identification information corresponds to the predetermined first identification information, the operation of encapsulating the application notification message into the notification bar object is  performed, and a process of the method for processing an application notification message provided in this embodiment of the present invention is performed. If the first identification information does not correspond to the predetermined first identification information, the operation of encapsulating the application notification message into the notification bar object is canceled, so as to prevent the application notification message from being transmitted to an invalid desktop application.
Correspondingly, FIG. 2 shows another flowchart of a method for processing an application notification message according to an embodiment of the present invention. Referring to FIG. 2, the method may include:
Step S200: When an application running in the background acquires an application notification message, acquire first identification information of a desktop application that is currently in a running state.
The application running in the background may be an application registered to a desktop starter in advance.
Step S210: If the first identification information of the desktop application that is currently in a running state does not correspond to predetermined first identification information, cancel encapsulating the application notification message into a notification bar object.
When the first identification information of the desktop application that is currently in a running state does not correspond to the predetermined first identification information, in this embodiment of the present invention, an operation of encapsulating the application notification message into the notification bar object may be canceled, the process is ended, and the method for processing an application notification message provided in this embodiment of the present invention is not performed.
Step S220: If the first identification information of the desktop application that is currently in a running state corresponds to the predetermined first identification information, encapsulate the application notification message into the notification bar object.
Step S230: Perform inter-process communication on the notification bar object by using a content provider corresponding to an operating system, so as to transmit, to the desktop application that is currently in a running state, the application notification message carried in the notification bar object.
Step S240: Display an area on a desktop corresponding to the desktop application, so as to display the application notification message.
On the other hand, in this embodiment of the present invention, before inter-process communication is performed on the notification bar object by using the content provider corresponding to the operating system, validity of the desktop application that is currently in a running state is verified first: acquiring the first identification information of the desktop application that is currently in a running state, if the first identification information corresponds to the predetermined first identification information, accessing the content provider corresponding to the operating system is authorized, so as to perform inter-process communication on the notification bar object by using the content provider corresponding to the operating system, and if the first identification information does not correspond to the predetermined first identification information, accessing the content provider corresponding to the operating system is forbidden, and performing inter-process communication on the notification bar object by using the content provider corresponding to the operating system is canceled.
Correspondingly, FIG. 3 shows still another flowchart of a method for processing an application notification message according to an embodiment of the present invention. Referring to FIG. 3, the method may include:
Step S300: When an application running in the background acquires an application notification message, encapsulate the application notification message into a notification bar object, where the application is registered to a desktop starter in advance.
Step S310: Acquire first identification information of a desktop application that is currently in a running state.
Step S320: If the first identification information of the desktop application that is currently in a running state does not correspond to predetermined first identification information, cancel performing inter-process communication on the notification bar object by using a content provider corresponding to an operating system.
When the first identification information of the desktop application that is currently in a running state does not correspond to the predetermined first identification information, in this embodiment of the present invention, the operation of performing inter-process communication on the notification bar object by using the content provider corresponding to the operating system may be canceled, the process is ended, and the method for processing an application notification message provided in this embodiment of the present invention is not performed.
Step S330: If the first identification information of the desktop application that is currently in a running state corresponds to the predetermined first identification information, perform inter-process communication on the notification bar object by using the content provider  corresponding to the operating system, so as to transmit, to the desktop application that is currently in a running state, the application notification message carried in the notification bar object.
Step S340: Display an area on a desktop corresponding to the desktop application, so as to display the application notification message.
Optionally, in order to support transmission on the notification bar object in a bottom layer of a terminal device, and enhance data scalability when the terminal device performs data transmission in the bottom layer, in this embodiment of the present invention, when inter-process communication transmission is performed, data format of the notification bar object is converted into a predetermined data format, and after the desktop application receives data in the predetermined data format, the data in the predetermined data format may be converted into the notification bar object through reflection.
Correspondingly, FIG. 4 shows a flowchart of a method for performing inter-process communication according to an embodiment of the present invention. Referring to FIG. 4, the method may include:
Step S400: Convert a notification bar object into data in a predetermined data format, perform inter-process communication by using a content provider corresponding to an operating system, and transmit the data in the predetermined data format to a desktop application that is currently in a running state.
Step S410: Control the desktop application to convert the data in the predetermined data format into the notification bar object, so as to transmit, to the desktop application, the application notification message carried in the notification bar object.
Optionally, the predetermined data format may be a json data format, and a structure of the notification bar object (such as a structure of a notificationItem) includes information of a field, which needs to be displayed, of the application notification message (such as a new short message service message or email content) . Because the structure of the notification bar object includes character strings that are in the majority, in a transmission process in the bottom layer of the terminal, in this embodiment of the present invention, the structure of the notification bar object may be converted into a data structure of json. Specifically, an attribute name in the structure of the notification bar object may be used as a key of json, attribute content of the structure of the notification bar object is used as a value of json, and after the desktop application receives the data in the json format, the data in json may be converted into the structure of the notification bar object through reflection. Data transmission in the bottom layer is performed in the json data format, and  desirable scalability may be presented when a protocol of data transmission in the bottom layer is improved.
Optionally, a key indicates an identifier of data to be requested, for example, when content of a short message service message is requested, one key in a program represents the content of the short message service message, and we may use an sms_body as a key of the content of the short message service message. Generally, the key an English identifier in a piece of code, and identifies one attribute (such as content of a short message service message) , and each key corresponds to one attribute;
a value indicates specific content in the attribute identified by the key, for example, a value that we obtain by using the key of the content of the short message service message which is the sms_body is real content of the short message service message; and
value = get (key) is indicated by using program code; a value corresponding to  a same key may be removed.
Optionally, this embodiment of the present invention may be implemented by using a software development kit (sdk) provided by the desktop application, data transmitted by the sdk may be a structure of a user-defined notificationItem, and the sdk includes a registerApp interface method, an isLauncherValid () method, a showNotification method, and the like. The method for processing an application notification message provided in this embodiment of the present invention is introduced below by using an sdk method. It should be noted that an implementation manner introduced below may merely be an optional implementation manner. FIG. 5 shows yet another flowchart of a method for processing an application notification message according to an embodiment of the present invention. Referring to FIG. 5, the method may include:
Step S500: Invoke a registerApp interface, and register an application to a desktop starter.
Step S510: When the application is in a state of running in the background, and acquires an application notification message, invoke an isLauncherValid () method to verify first identification information of a desktop application that is currently in a running state.
Step S520: If the first identification information does not correspond to predetermined first identification information, end the process.
Step S530: If the first identification information corresponds to the predetermined first identification information, invoke a showNotification method, and encapsulate the application notification message into a NotificationItem object.
Step S540: Convert the NotificationItem object into data in a json format, perform inter-process communication by using a ContentProvider component corresponding to an operating system, and transmit the data in the json format to the desktop application.
Step S550: Control the desktop application to convert the data in the json format into the NotificationItem object, and acquire the application notification message carried in the NotificationItem object.
Step S560: Display an area on a desktop corresponding to the desktop application, so as to display the application notification message.
FIG. 6 is a schematic diagram of an example of an application according to an embodiment of the present invention. Referring to FIG. 6, an interface currently displayed by a terminal device 10 is a desktop, multiple application icons exist on the desktop, an application 11 registered to a desktop starter is in a state of running in the background, and the state of running in the background of the application 11 may be learned by using a notification bar 12 of the desktop. It should be noted that description of content displayed by the terminal device 10 may be content displayed after a home key provided by the terminal device 10 is clicked. After an application notification message of the application 11 is acquired, according to the method for processing an application notification message provided in this embodiment of the present invention, content displayed by the desktop of the terminal device 10 changes, and the desktop of the terminal device 10 displays an area 13 that is displayed in a superposing manner, to display the application notification message.
Optionally, in this embodiment of the present invention, after the application notification message is displayed on the desktop, a result of processing the application notification message by a user may further be fed back to the application. For example, after a chat message of a friend is acquired by using an instant messaging application, the chat message may be displayed on the desktop by using the method for processing an application notification message provided in this embodiment of the present invention, and after viewing the displayed application notification message, the user may edit the message by using the area for displaying the application notification message, so as to feed an edited message to the application, implementing sending of the edited message to the friend.
Optionally, FIG. 7 shows still yet another flowchart of a method for processing an application notification message according to an embodiment of the present invention. Referring to FIG. 7, the method may include:
Step S600: Control an application to inherit a notification event processing method.
Optionally, after NotificationEventHandle (the notification event processing method) is inherited, when a desktop backhauls data to a specific app application, an int callback (int actionId, NotificationItem notificationItem) method is called back, where NotificationItem is specific data content, and actionid indicates operations performed by the desktop. For example, one short message service message application acquires a new short message service message and displays the short message service message on the desktop, when the desktop deletes the short message service message, the short message service message application is notified in the callBack method. In this case, a value in the actionId represents a deleting operation, and content in the notificationItem is specific content of the deleted short message service message.
NotificationEventHandler is a class that is in the sdk, related to the ContentProvider, and is used for processing a notification event.
Step S610: Acquire information about processing on an application notification message.
Optionally, the processing information may be obtained after a user performs editing by using the area for displaying the application notification message, and the area for displaying the application notification message may be an interface provided for performing editing by the user.
Step S620: Invoke a callback method, perform inter-process communication by using a content provider corresponding to the application, and transmit the processing information to the application.
In this embodiment of the present invention, in addition to that the operating system corresponds to the ContentProvider, the application may also be installed with a corresponding ContentProvider, the ContentProvider corresponding to the operating system is configured to perform inter-process data transmission from the application to the desktop, and the ContentProvider corresponding to the application is configured to perform inter-process data transmission from the desktop to the application.
Step S630: Control the application to process the processing information.
Optionally, in order to ensure that the application receiving the processing information is a valid application, in this embodiment of the present invention, validity verification may be performed on the application. Optionally, in this embodiment of the present invention, after the information about processing on the application notification message is acquired, second identification information (the second identification information indicates identification information of the application) of the application is acquired, where the second identification information may be information of a signature of the application, and the like. If the second identification information  corresponds to predetermined second identification information (the predetermined second identification information may be identification information corresponding to a valid application) , it indicates that the application is a valid application, the callback method may be invoked, inter-process communication is performed by using a content provider corresponding to the application, and the processing information is transmitted to the application. If the second identification information does not correspond to the predetermined second identification information, it indicates that the application is an invalid application, invoking the callback method may be canceled, inter-process communication is not performed by using the content provider corresponding to the application, and the process is ended.
Optionally, the predetermined second identification information may be carried to the desktop application when the application is registered to the desktop starter. For example, when the registerApp interface is invoked to perform registration of the application to the desktop starter, the second identification information of the application may be carried in registration information, and the second identification information is used as the predetermined second identification information. When the processing information is transmitted, the processing information may be smoothly transmitted only when the second identification information of the application corresponds to the predetermined second identification information, which prevents the processing information from being transmitted to an invalid application.
In this embodiment of the present invention, an application notification message acquired by an application in a state of running in the background may be displayed on a desktop, so that a user can view the application notification message by using the desktop without the need of setting the application running in the background to a state of running in the foreground. Therefore, a manner for displaying the application notification message acquired by the application in the state of running in the background is extremely convenient. The user may process the application notification message by using an area, which is displayed on the desktop, for displaying the application notification message, and obtained processing information may also be transmitted by a desktop application to the application in the state of running in the background, so as to accurately process the processing information. Therefore, a manner for processing the application notification message by the user is extremely convenient.
The apparatus for processing an application notification message provided in an embodiment of the present invention is introduced below. The apparatus for processing an application notification message described below and the method for processing an application notification message described above may be corresponding to each other and referenced to each other. FIG. 8 is a structural block diagram of an apparatus for processing an application notification  message according to an embodiment of the present invention. The apparatus may be applied to a terminal device, and the terminal device may be a device such as a smartphone, a tablet computer, and a notebook computer. Referring to FIG. 8, the apparatus for processing an application notification message may include:
an encapsulation module 100, configured to: when an application running in the background acquires an application notification message, encapsulate the application notification message into a notification bar object, where the application is registered to a desktop starter in advance;
first transmission module 200, configured to perform inter-process communication on the notification bar object by using a content provider corresponding to an operating system, so as to transmit, to a desktop application that is currently in a running state, the application notification message carried in the notification bar object; and
display module 300, configured to display an area on a desktop corresponding to the desktop application, so as to display the application notification message.
Optionally, in this embodiment of the present invention, when the application running in the background acquires the application notification message, the desktop application that is currently in a running state is verified. Correspondingly, FIG. 9 shows another structure of an apparatus for processing an application notification message according to an embodiment of the present invention. In combination with FIG. 8 and FIG. 9, the apparatus for processing an application notification message may further include:
first verification module 400, configured to: after the application running in the background acquires the application notification message, acquire first identification information of the desktop application that is currently in a running state, and compare the first identification information with predetermined first identification information.
Correspondingly, based on the apparatus for processing an application notification message shown in FIG. 9, FIG. 10 shows an optional structure of the encapsulation module 100. Referring to FIG. 10, the encapsulation module 100 may include:
first encapsulation unit 110, configured to: when the first identification information corresponds to the predetermined first identification information, encapsulate the application notification message into the notification bar object.
Optionally, in this embodiment of the present invention, before inter-process communication is performed on the notification bar object by using the content provider corresponding to the operating system, validity of the desktop application that is currently in a  running state is verified first. Correspondingly, FIG. 11 shows still another structure of an apparatus for processing an application notification message according to an embodiment of the present invention. In combination with FIG. 8 and FIG. 11, the apparatus for processing an application notification message may further include:
second verification module 500, configured to: after the application notification message is encapsulated into the notification bar object, acquire the first identification information of the desktop application that is currently in a running state, and compare the first identification information with the predetermined first identification information.
Correspondingly, based on the apparatus for processing an application notification message shown in FIG. 11, FIG. 12 shows an optional structure of the first transmission module 200 according to an embodiment of the present invention. Referring to FIG. 12, the first transmission module 200 may include:
first transmission unit 210, configured to: when the first identification information corresponds to the predetermined first identification information, perform inter-process communication on the notification bar object by using the content provider corresponding to the operating system.
Optionally, in order to support transmission on the notification bar object in a bottom layer of a terminal device, and enhance data scalability when the terminal device performs data transmission in the bottom layer, in this embodiment of the present invention, when inter-process communication transmission is performed, data format of the notification bar object is converted into a predetermined data format, and after the desktop application receives data in the predetermined data format, the data in the predetermined data format may be converted into the notification bar object through reflection. Correspondingly, FIG. 13 shows another optional structure of the first transmission module 200 according to an embodiment of the present invention. Referring FIG. 13, the first transmission module 200 may include:
a first format conversion unit 220, configured to convert the notification bar object into data in the predetermined data format;
a first inter-process communication unit 221, configured to perform inter-process communication by using the content provider corresponding to the operating system, and transmit the data in the predetermined data format to the desktop application that is currently in a running state; and
a second format conversion unit 222, configured to control the desktop application to convert the data in the predetermined data format into the notification bar object, so as to transmit, to the desktop application, the application notification message carried in the notification bar object.
Optionally, the predetermined data format may be a json format. Correspondingly, FIG. 14 shows an optional structure of the first format conversion unit 220. Referring to FIG. 14, the first format conversion unit 220 may include:
an attribute determining subunit 2201, configured to use an attribute name in a structure of the notification bar object as a key of json, and use attribute content in the structure of the notification bar object as a value of json.
Optionally, in this embodiment of the present invention, after the application notification message is displayed on the desktop, a result of processing the application notification message by the user may further be fed back to the application. Correspondingly, FIG. 15 shows yet another structural block diagram of an apparatus for processing an application notification message according to an embodiment of the present invention. In combination with FIG. 8 and FIG. 15, the apparatus for processing an application notification message may further include:
a processing information acquiring module 600, configured to acquire information about processing on the application notification message;
second transmission module 700, configured to invoke a callback method, perform inter-process communication by using a content provider corresponding to the application, and transmit the processing information to the application; and
processing module 800, configured to control the application to process the processing information.
Optionally, in order to ensure that the application receiving the processing information is a valid application, in this embodiment of the present invention, validity verification may be performed on the application. Correspondingly, based on the apparatus for processing an application notification message shown in FIG. 15, FIG. 16 shows still yet another structure of an apparatus for processing an application notification message according to an embodiment of the present invention. In combination with FIG. 15 and FIG. 16, the apparatus for processing an application notification message may further include:
third verification module 900, configured to: after the information about processing on the application notification message is acquired, acquire second identification information of the application, and compare the second identification information with predetermined second identification information.
Correspondingly, based on the apparatus for processing an application notification message shown in FIG. 16, FIG. 17 shows an optional structure of the second transmission module 700 according to an embodiment of the present invention. Referring to FIG. 17, the second transmission module 700 may include:
second transmission unit 710, configured to: when the second identification information corresponds to the predetermined second identification information, invoke the callback method, perform inter-process communication by using the content provider corresponding to the application, and transmit the processing information to the application.
According to the apparatus for processing an application notification message provided in this embodiment of the present invention, an application notification message acquired by an application in a state of running in the background may be displayed on the desktop, so that a user can view the application notification message without the need of setting the application running in the background to a state of running in the foreground, which greatly reduces operations of the user, and therefore reduces power consumption of a terminal device. According to this embodiment of the present invention, the user can view the application notification message extremely conveniently, which is convenient for the user to process the application notification message. The user may process the application notification message by using an area, which is displayed on the desktop, for displaying the application notification message, and obtained processing information may also be transmitted by a desktop application to the application in the state of running in the background, so as to accurately process the processing information. Therefore, a manner for processing the application notification message by the user is extremely convenient.
An embodiment of the present invention further provides a terminal device, and the terminal device may include the foregoing apparatus for processing an application notification message. For introduction of the apparatus for processing an application notification message, reference may be made to description of the foregoing corresponding part, which is not described herein again.
A structure of hardware of the terminal device provided in an embodiment of the present invention is introduced below. For the method for processing an application notification message involved in the foregoing description, reference may be made to the description of the foregoing corresponding part. FIG. 18 is a block diagram of a structure of hardware of a terminal device according to an embodiment of the present invention. The terminal device may be an intelligent mobile terminal, such as a mobile phone having computing power and a PAD. Specific implementation of the terminal device is not limited in specific embodiments of the present invention.  Referring to FIG. 18, the terminal device may include: a processor 1, a communications interface 2, a memory 3, and a communications bus 4, where
the processor 1, the communications interface 2, and the memory 3 performs mutual communication by using the communications bus 4;
optionally, the communications interface 2 may be an interface of a communications module, such as an interface of a GSM module;
the processor 1 is configured to perform a program;
the memory 3 is configured to store the program; and
the program may include a program code, and the program code include a computer operation instruction.
The processor 1 may be a central processing unit (CPU) , or an application specific integrated circuit (ASIC) , or is configured as one or more integrated circuits for implementing the embodiments of the present invention.
The memory 3 may include a high-speed RAM memory, and may further include a non-volatile memory, such as at least one magnetic disk memory.
The program may be specifically configured to:
when an application running in the background acquires an application notification message, encapsulate the application notification message into a notification bar object, where the application is registered to a desktop starter in advance;
perform inter-process communication on the notification bar object by using a content provider corresponding to an operating system, so as to transmit, to a desktop application that is currently in a running state, the application notification message carried in the notification bar object; and
display an area on a desktop corresponding to the desktop application, so as to display the application notification message.
The embodiments in this specification are all described in a progressive manner, each embodiment focuses on a difference from other embodiments, and for same or similar parts in the embodiments, reference may be made to these embodiments. The apparatus disclosed by the embodiments are corresponding to the method disclosed by the embodiments and therefore is only briefly described, and reference may be made to the descriptions of the method for the associated part.
A person skilled in the art may further realize that the steps of the units and algorithms of the examples according to the embodiments disclosed in this specification may be implemented by electronic hardware, computer software, or a combination thereof. In order to specify clearly the interchangeability of the hardware and software, the parts and steps of each embodiment are described generally according to the functions in the above description. Whether these functions are executed in the manner of hardware or software depends on specific applications and design constraints of the technical solutions. A person skilled in the art may use different methods to implement the described functions for each specific application, but this implementation should not be considered as going beyond the scope of the present disclosure.
The steps of the method or algorithm according to the embodiments disclosed in this specification can be implemented by hardware or a software module executed by a processor, or implemented by a combination thereof. The software module may be stored in a random access memory (RAM) , a memory, a read-only memory (ROM) , an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable magnetic disk, a CD-ROM, or any other type of storage medium commonly known in the art.
A person skilled in the art can implement or use the present disclosure according to the foregoing descriptions of the disclosed embodiments. Modifications made to the embodiments are obvious to the person skilled in the art, and a general principle defined in the specification may be implemented in other embodiments without departing from the spirits or scope of the present disclosure. Therefore, the present disclosure is not limited to the embodiments shown in the specification, but conforms to the widest scope consistent with the principle and novel features that are disclosed in the specification.

Claims (15)

  1. A method for processing an application notification message, comprising:
    encapsulating an application notification message into a notification bar object when an application running in the background acquires the application notification message, the application being registered to a desktop starter in advance;
    performing inter-process communication on the notification bar object by using a content provider corresponding to an operating system, so as to transmit, to a desktop application that is currently in a running state, the application notification message carried in the notification bar object; and
    displaying an area on a desktop corresponding to the desktop application, so as to display the application notification message.
  2. The method for processing an application notification message according to claim 1, wherein after the application running in the background acquires the application notification message, the method further comprises:
    acquiring first identification information of the desktop application that is currently in a running state; and
    comparing the first identification information with predetermined first identification information; and
    the encapsulating an application notification message into a notification bar object comprises:
    encapsulating the application notification message into the notification bar object when the first identification information corresponds to the predetermined first identification information.
  3. The method for processing an application notification message according to claim 1, wherein after the encapsulating an application notification message into a notification bar object, the method further comprises:
    acquiring first identification information of the desktop application that is currently in a running state; and
    comparing the first identification information with predetermined first identification information; and
    the performing inter-process communication on the notification bar object by using a content provider corresponding to an operating system comprises:
    performing, when the first identification information corresponds to the predetermined first identification information, inter-process communication on the notification bar object by using the content provider corresponding to the operating system.
  4. The method for processing an application notification message according to any one of claims 1 to 3, wherein the performing inter-process communication on the notification bar object by using a content provider corresponding to an operating system comprises:
    converting the notification bar object into data in a predetermined data format;
    performing inter-process communication by using the content provider corresponding to the operating system, and transmitting the data in the predetermined data format to the desktop application that is currently in a running state; and
    controlling the desktop application to convert the data in the predetermined data format into the notification bar object, so as to transmit, to the desktop application, the application notification message carried in the notification bar object.
  5. The method for processing an application notification message according to claim 4, wherein the predetermined data format is a json format, and the converting the notification bar object into data in a predetermined data format comprises:
    using an attribute name in a structure of the notification bar object as a key of json, and using attribute content in the structure of the notification bar object as a value of json.
  6. The method for processing an application notification message according to claim 1, wherein the application inherits a notification event processing method, and the method further comprises:
    acquiring information about processing on the application notification message;
    invoking a callback method, performing inter-process communication by using a content provider corresponding to the application, and transmitting the processing information to the application; and
    controlling the application to process the processing information.
  7. The method for processing an application notification message according to claim 6, wherein after the acquiring information about processing on the application notification message, the method further comprises:
    acquiring second identification information of the application;
    comparing the second identification information with predetermined second identification information; and
    the invoking a callback method, performing inter-process communication by using a content provider corresponding to the application, and transmitting the processing information to the application comprises:
    invoking the callback method when the second identification information corresponds to the predetermined second identification information, performing inter-process communication by using the content provider corresponding to the application, and transmitting the processing information to the application.
  8. An apparatus for processing an application notification message, comprising:
    an encapsulation module, configured to: when an application running in the background acquires an application notification message, encapsulate the application notification message into a notification bar object, the application being registered to a desktop starter in advance;
    a first transmission module, configured to perform inter-process communication on the notification bar object by using a content provider corresponding to an operating system, so as to transmit, to a desktop application that is currently in a running state, the application notification message carried in the notification bar object; and
    a display module, configured to display an area on a desktop corresponding to the desktop application, so as to display the application notification message.
  9. The apparatus for processing an application notification message according to claim 8, further comprising:
    a first verification module, configured to: after the application running in the background acquires the application notification message, acquire first identification information of the desktop application that is currently in a running state, and compare the first identification information with predetermined first identification information, wherein
    the encapsulation module comprises:
    a first encapsulation unit, configured to: when the first identification information corresponds to the predetermined first identification information, encapsulate the application notification message into the notification bar object.
  10. The apparatus for processing an application notification message according to claim 8, further comprising:
    a second verification module, configured to: after the application notification message is encapsulated into the notification bar object, acquire first identification information of the desktop  application that is currently in a running state, and compare the first identification information with predetermined first identification information, wherein
    the first transmission module comprises:
    a first transmission unit, configured to: when the first identification information corresponds to the predetermined first identification information, perform inter-process communication on the notification bar object by using the content provider corresponding to the operating system.
  11. The apparatus for processing an application notification message according to any one of claims 8 to 10, wherein the first transmission module comprises:
    a first format conversion unit, configured to convert the notification bar object into data in a predetermined data format;
    a first inter-process communication unit, configured to perform inter-process communication by using the content provider corresponding to the operating system, and transmit the data in the predetermined data format to the desktop application that is currently in a running state; and
    a second format conversion unit, configured to control the desktop application to convert the data in the predetermined data format into the notification bar object, so as to transmit, to the desktop application, the application notification message carried in the notification bar object.
  12. The apparatus for processing an application notification message according to claim 11, wherein the predetermined data format is a json format, and the first format conversion unit comprises:
    an attribute determining subunit, configured to use an attribute name in a structure of the notification bar object as a key of json, and use attribute content in the structure of the notification bar object as a value of json.
  13. The apparatus for processing an application notification message according to claim 8, wherein the apparatus further comprises:
    a processing information acquiring module, configured to acquire information about processing on the application notification message;
    a second transmission module, configured to invoke a callback method, perform inter-process communication by using a content provider corresponding to the application, and transmit the processing information to the application; and
    a processing module, configured to control the application to process the processing information.
  14. The apparatus for processing an application notification message according to claim 13, wherein the apparatus further comprises:
    a third verification module, configured to: after the information about processing on the application notification message is acquired, acquire second identification information of the application, and compare the second identification information with predetermined second identification information, wherein
    the second transmission module comprises:
    a second transmission unit, configured to: when the second identification information corresponds to the predetermined second identification information, invoke the callback method, perform inter-process communication by using the content provider corresponding to the application, and transmit the processing information to the application.
  15. A terminal device, comprising the apparatus for processing an application notification message according to any one of claims 8 to 14.
PCT/CN2015/081285 2014-06-11 2015-06-11 Method and apparatus for processing application notification message, and terminal device WO2015188771A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201410258325.XA CN103995707B (en) 2014-06-11 2014-06-11 Method, device and terminal device for processing application notification message
CN201410258325.X 2014-06-11

Publications (1)

Publication Number Publication Date
WO2015188771A1 true WO2015188771A1 (en) 2015-12-17

Family

ID=51309885

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/081285 WO2015188771A1 (en) 2014-06-11 2015-06-11 Method and apparatus for processing application notification message, and terminal device

Country Status (2)

Country Link
CN (1) CN103995707B (en)
WO (1) WO2015188771A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112817684A (en) * 2018-06-08 2021-05-18 Oppo广东移动通信有限公司 User interface display method, device, terminal and storage medium

Families Citing this family (21)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103995707B (en) * 2014-06-11 2017-05-24 腾讯科技(深圳)有限公司 Method, device and terminal device for processing application notification message
CN104392186A (en) * 2014-10-24 2015-03-04 东莞宇龙通信科技有限公司 Notification prompt method, notification prompt device and terminal
CN104461555A (en) * 2014-12-22 2015-03-25 浪潮软件集团有限公司 Method for directly controlling each playing application in Home application
CN105871684A (en) * 2015-12-30 2016-08-17 乐视致新电子科技(天津)有限公司 Method and device for displaying notice messages
CN105677167A (en) * 2016-01-05 2016-06-15 青岛海信移动通信技术股份有限公司 Notification message display method and device used for intelligent terminal
CN105912450B (en) * 2016-04-13 2019-12-13 北京小米移动软件有限公司 Application state information display method and device
CN106210853B (en) * 2016-07-08 2019-04-09 上海幻电信息科技有限公司 Barrage display system and its CPU consumption controlling method
CN106201223A (en) * 2016-08-15 2016-12-07 宇龙计算机通信科技(深圳)有限公司 A kind of notification message display packing and device
CN106487657A (en) * 2016-10-18 2017-03-08 江西博瑞彤芸科技有限公司 Applicative notifications and the method for the unified display of short message
US20180139506A1 (en) * 2016-11-11 2018-05-17 Jamdeo Canada Ltd. System and method for digital television notification service
CN106648861B (en) * 2016-12-05 2020-07-14 阿里巴巴(中国)有限公司 Keep-alive method and device for background service process
CN107102800A (en) * 2017-03-28 2017-08-29 联想(北京)有限公司 The display methods of message and the electronic equipment for showing message
CN108664491A (en) * 2017-03-29 2018-10-16 北京京东尚科信息技术有限公司 Data transmission method, device and terminal device
CN109460304B (en) * 2017-09-06 2022-06-03 阿里巴巴集团控股有限公司 Cross-application notification display and notification content packaging method and device
CN107544854B (en) * 2017-09-21 2020-08-28 广州市千钧网络科技有限公司 Method and system for synchronously accessing cross-process data
CN109814954B (en) * 2017-11-21 2021-08-24 腾讯科技(深圳)有限公司 Push message receiving method and device, storage medium and computer equipment
CN108650290A (en) * 2018-03-26 2018-10-12 安徽笛申科技有限公司 A kind of message informing and send service implementing method
US10802894B2 (en) * 2018-03-30 2020-10-13 Inflight VR Software GmbH Method, apparatus, and computer-readable medium for managing notifications delivered to a virtual reality device
CN108491283A (en) * 2018-03-30 2018-09-04 武汉斗鱼网络科技有限公司 A kind of data transmission method, device, computer and storage medium
CN114915607B (en) * 2022-07-18 2022-10-11 荣耀终端有限公司 Notification message processing method, electronic equipment and system
CN115421841A (en) * 2022-09-23 2022-12-02 阿里巴巴(中国)有限公司 Notification processing method, terminal device, server and computer storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101651750A (en) * 2009-08-31 2010-02-17 宇龙计算机通信科技(深圳)有限公司 Method and system for displaying prompt information and mobile terminal
US20120304118A1 (en) * 2011-05-27 2012-11-29 Donahue Tyler J Application Notification Display
CN103853433A (en) * 2014-04-01 2014-06-11 联想(北京)有限公司 Notification message promoting method and device
CN103995707A (en) * 2014-06-11 2014-08-20 腾讯科技(深圳)有限公司 Method, device and terminal device for processing application notification message

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101923401A (en) * 2010-09-21 2010-12-22 广东欧珀移动通信有限公司 Electronic equipment input method
CN101950245A (en) * 2010-09-29 2011-01-19 宇龙计算机通信科技(深圳)有限公司 Information display method and system for mobile terminal and mobile terminal
CN103067577B (en) * 2012-12-21 2014-11-19 东莞宇龙通信科技有限公司 Terminal and information display method
CN103248757B (en) * 2013-03-28 2016-04-06 小米科技有限责任公司 A kind of message informing method and device
CN103297327B (en) * 2013-05-29 2016-09-28 深圳数字电视国家工程实验室股份有限公司 Information push method, device and display terminal
CN103279303A (en) * 2013-05-31 2013-09-04 东莞宇龙通信科技有限公司 Method and device for processing event message
CN103634199B (en) * 2013-08-26 2017-11-21 华为技术有限公司 The display methods and device of notification message

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101651750A (en) * 2009-08-31 2010-02-17 宇龙计算机通信科技(深圳)有限公司 Method and system for displaying prompt information and mobile terminal
US20120304118A1 (en) * 2011-05-27 2012-11-29 Donahue Tyler J Application Notification Display
CN103853433A (en) * 2014-04-01 2014-06-11 联想(北京)有限公司 Notification message promoting method and device
CN103995707A (en) * 2014-06-11 2014-08-20 腾讯科技(深圳)有限公司 Method, device and terminal device for processing application notification message

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112817684A (en) * 2018-06-08 2021-05-18 Oppo广东移动通信有限公司 User interface display method, device, terminal and storage medium
CN112817684B (en) * 2018-06-08 2023-05-02 Oppo广东移动通信有限公司 User interface display method, device, terminal and storage medium

Also Published As

Publication number Publication date
CN103995707A (en) 2014-08-20
CN103995707B (en) 2017-05-24

Similar Documents

Publication Publication Date Title
WO2015188771A1 (en) Method and apparatus for processing application notification message, and terminal device
US10320769B2 (en) Method and apparatus of providing messaging service and callback feature to mobile stations
CN105991354B (en) Method and apparatus for transmitting integrated message
US9288608B2 (en) Providing web service for new user account after installation of application on mobile device
US9558476B2 (en) Method and device for editing workspace data objects
US20150127755A1 (en) Method and apparatus for checking status of messages in electronic device
US9118736B2 (en) Communication control system, server device, and communication control method
US9118642B2 (en) Asset streaming
WO2015143934A1 (en) Information sending method and information sending apparatus
WO2017193926A1 (en) Data transmission method and device
JP2020509622A (en) Wireless network type detection method and apparatus and electronic device
CN106603815B (en) Message processing method and device
CN110351225B (en) Hardware device networking method and system, computing device and readable storage medium
WO2015143933A1 (en) Information sending method and information sending apparatus
US20180255173A1 (en) Information pushing method and apparatus, and terminal and server
CN116962114A (en) Equipment interconnection method, device, equipment and medium based on distributed soft bus
WO2017020551A1 (en) Method and device for managing wireless access point
CN115550498B (en) Screen projection method, device, equipment and storage medium
US20210006965A1 (en) Electronic device in which profile is installed and operating method for electronic device
CN113329100B (en) Message pushing method, device and system
CN112272135B (en) Mail sending method, device, equipment and storage medium for storage software
CN106648598B (en) Method and apparatus for displaying display information of application
US20210389846A1 (en) Systems and methods for viewing incompatible web pages via remote browser instances
WO2017166605A1 (en) Method and apparatus for selecting operating mode of earphones, electronic device, and non-volatile computer storage medium
US20190370154A1 (en) Messaging systems with improved reliability

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: 15806184

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 16.05.2017)

122 Ep: pct application non-entry in european phase

Ref document number: 15806184

Country of ref document: EP

Kind code of ref document: A1