Method and apparatus for displaying message box, terminal device and non-transitory computer-readable storage medium
Abstract
A method and an apparatus for displaying a message box, a terminal device and a non-transitory computer-readable storage medium are disclosed. The method may include: acquiring a context object corresponding to an application in response to a start of the application, and creating a message box object, where the context object carries a screen identity of a screen object; transmitting the context object into the message box object; adding the message box object to an NMS through a preset enqueue interface, and reading the screen identity in the message box object by the NMS through a set screen interface, and the screen interface is configured to be called by the NMS to acquire the screen identity from the message box object; and displaying the message box object on a screen corresponding to the screen identity through the NMS.
Claims
exact text as granted — not AI-modified1 . A method for displaying a message box, comprising:
acquiring a context object corresponding to an application in response to a start of the application, and creating a message box object, wherein the context object carries a screen identity of a screen object; transmitting the context object into the message box object; adding the message box object to a notification management service (NMS) through a preset enqueue interface, and reading the screen identity in the message box object by the NMS through a set screen interface, wherein the screen interface and the preset enqueue interface are interfaces allowing the NMS to communicate with the message box object, and the screen interface is configured to be called by the NMS to acquire the screen identity from the message box object; and displaying the message box object on a screen corresponding to the screen identity through the NMS.
2 . The method of claim 1 , wherein transmitting the context object into the message box object comprises:
acquiring the screen object in the context object; acquiring the screen identity corresponding to the screen object through the screen object; and saving the screen identity to a variable name of the message box object, wherein the variable name is arranged to represent the screen identity.
3 . The method of claim 2 , wherein acquiring the screen identity corresponding to the screen object through the screen object comprises:
acquiring a screen identity interface through the screen object; and acquiring the screen identity based on the screen identity interface.
4 . The method of claim 1 , wherein adding the message box object to the NMS through the preset enqueue interface comprises:
adding the message box object to a sequence to be displayed of the NMS through the preset enqueue interface of the NMS.
5 . The method of claim 1 , wherein reading the screen identity in the message box object by the NMS through the set screen interface comprises:
acquiring the screen identity from a variable name of the message box object by the NMS through the set screen interface.
6 . The method of claim 1 , wherein displaying the message box object on the screen corresponding to the screen identity through the NMS comprises:
registering an association relationship between the message box object and the screen identity in a display system by the NMS; and displaying the message box object on the screen corresponding to the screen identity based on the association relationship.
7 . The method of claim 6 , wherein before registering the association relationship between the message box object and the screen identity in the display system by the NMS, the method further comprises:
binding the message box object with the screen identity by the NMS, to form the association relationship.
8 . An apparatus for displaying a message box, comprising:
a creation unit, configured to acquire a context object corresponding to an application in response to a start of the application, and create a message box object, wherein the context object carries a screen identity of a screen object; a transmission unit, configured to transmit the context object into the message box object; a reading unit, configured to add the message box object to a notification management service (NMS) through a preset enqueue interface, and read the screen identity in the message box object by the NMS through a set screen interface, wherein the screen interface and the preset enqueue interface are interfaces allowing the NMS to communicate with the message box object, and the screen interface is configured to be called by the NMS to acquire the screen identity from the message box object; and a display unit, configured to display the message box object on a screen corresponding to the screen identity through the NMS.
9 . A terminal device, comprising: a processor, a memory, a communication interface, and a bus for connecting the processor, the memory and the communication interface; wherein the processor is configured to execute a display program of a message box stored in the memory to perform a method for displaying a message box comprising:
acquiring a context object corresponding to an application in response to a start of the application, and creating a message box object, wherein the context object carries a screen identity of a screen object; transmitting the context object into the message box object; adding the message box object to a notification management service (NMS) through a preset enqueue interface, and reading the screen identity in the message box object by the NMS through a set screen interface, wherein the screen interface and the preset enqueue interface are interfaces allowing the NMS to communicate with the message box object, and the screen interface is configured to be called by the NMS to acquire the screen identity from the message box object; and displaying the message box object on a screen corresponding to the screen identity through the NMS.
10 . A non-transitory computer-readable storage medium storing a display program of a message box applied to a terminal device, wherein the display program of a message box, when executed by a first processor, causes the first processor to perform a method for displaying a message box comprising:
acquiring a context object corresponding to an application in response to a start of the application, and creating a message box object, wherein the context object carries a screen identity of a screen object; transmitting the context object into the message box object; adding the message box object to a notification management service (NMS) through a preset enqueue interface, and reading the screen identity in the message box object by the NMS through a set screen interface, wherein the screen interface and the preset enqueue interface are interfaces allowing the NMS to communicate with the message box object, and the screen interface is configured to be called by the NMS to acquire the screen identity from the message box object; and displaying the message box object on a screen corresponding to the screen identity through the NMS.Join the waitlist — get patent alerts
Track US2022035591A1 — get alerts on status changes and closely related new filings.
We store only your email — no account needed. See our privacy policy.