Server-driven notifications to mobile applications
An example method of implementing server-driven notifications to mobile applications may include: receiving, by a mobile computing device, a message from a notification server, wherein the message comprises a payload identifying a mobile application running on the mobile computing device; translating the payload into a local notification including an identifier of the mobile application; causing the local notification to be displayed on the mobile computing device; and responsive to receiving a user interface event associated with the local notification, processing the user interface event by a handler of the mobile application.
1. A method comprising:
transmitting, by a mobile computing device, a first message to a notification server to register the mobile computing device with the notification server, the first message comprising an identifier of the mobile computing device;
receiving, by the mobile computing device, a second message from the notification server, wherein the second message comprises a payload identifying a mobile application running on the mobile computing device and an application-specific event associated with the mobile application;
translating the payload into a local notification including an identifier of the mobile application, an identifier of the application-specific event, and one or more handlers to be utilized by the mobile application for processing the application-specific event;
displaying the local notification on the mobile computing device;
detecting the application-specific event in view of a user interface event associated with the local notification;
processing the user interface event by a handler of the mobile application; and
transmitting, to a workflow server associated with the mobile application, a notification indicating that the user interface event corresponding to the application-specific event was completed.
2. The method of claim 1 , wherein the mobile application comprises a first mobile application and wherein the payload further identifies a second mobile application running on the mobile computing device.
3. The method of claim 2 , further comprising:
translating the payload into a second notification including a second identifier of the second mobile application;
causing the second notification to be displayed on the mobile computing device; and
responsive to receiving a second user interface event associated with the second notification, launching the second mobile application.
4. The method of claim 2 , further comprising:
responsive to detecting the application-specific event, translating the payload into a second notification including a second identifier of the second mobile application; and
causing the second notification to be displayed on the mobile computing device.
5. The method of claim 1 , wherein translating the payload further comprises:
parsing the payload; and
invoking one or more local application programming interface (API) calls for each object extracted from the payload.
6. A mobile computing device comprising:
a memory; and
a processor operatively coupled to the memory, the processor to:
transmit a first message to a notification server to register the mobile computing device with the notification server, the first message comprising an identifier of the mobile computing device;
receive a second message from a notification server, wherein the second message comprises a payload identifying a mobile application running on the mobile computing device and an application-specific event associated with the mobile application;
translate the payload into a local notification including an identifier of the mobile application, an identifier of the application-specific event, and one or more handlers to be utilized by the mobile application for processing the application-specific event;
display the local notification on the mobile computing device;
detecting the application-specific event in view of a user interface event associated with the local notification;
process the user interface event by a handler of the mobile application; and
transmit, to a workflow server associated with the mobile application, a notification indicating that the user interface event corresponding to the application-specific event was completed.
7. The mobile computing device of claim 6 , wherein the mobile application comprises a first mobile application and wherein the payload further identifies a second mobile application running on the mobile computing device.
8. The mobile computing device of claim 7 , wherein the processor is further to:
translate the payload into a second notification including a second identifier of the second mobile application;
cause the second notification to be displayed on the mobile computing device; and
responsive to receiving a second user interface event associated with the second notification, launch the second mobile application.
9. The mobile computing device of claim 7 , wherein the processor is further to:
responsive to detecting the application-specific event, translate the payload into a second notification including a second identifier of the second mobile application; and
cause the second notification to be displayed on the mobile computing device.
10. The mobile computing device of claim 6 , wherein translating the payload further comprises:
parse the payload; and
invoke one or more local application programming interface (API) calls for each object extracted from the payload.
11. A non-transitory computer-readable medium having executable instructions encoded thereon which, when executed by a processor, cause the processor to:
transmit a first message to a notification server to register a mobile computing device with the notification server, the first message comprising an identifier of the mobile computing device;
receive a second message from the notification server, wherein the second message comprises a payload identifying a mobile application running on the mobile computing device and an application-specific event associated with the mobile application;
translate the payload into a local notification including an identifier of the mobile application, an identifier of the application-specific event, and one or more handlers to be utilized by the mobile application for processing the application-specific event;
display the local notification on the mobile computing device;
detecting the application-specific event in view of a user interface event associated with the local notification;
process the user interface event by a handler of the mobile application; and
transmit, to a workflow server associated with a mobile application, a notification indicating that the user interface event corresponding to the application-specific event was completed.
12. The non-transitory computer-readable medium of claim 11 , wherein the mobile application comprises a first mobile application and wherein the payload further identifies a second mobile application running on the mobile computing device.
13. The non-transitory computer-readable medium of claim 12 , further comprising executable instructions causing the processor to:
translate the payload into a second notification including a second identifier of the second mobile application;
cause the second notification to be displayed on the mobile computing device; and
responsive to receiving a second user interface event associated with the second notification, launch the second mobile application.
14. The non-transitory computer-readable medium of claim 12 , further comprising executable instructions causing the processor to:
responsive to detecting the application-specific event, translate the payload into a second notification including a second identifier of the second mobile application; and
cause the second notification to be displayed on the mobile computing device.
15. The non-transitory computer-readable medium of claim 11 , wherein translating the payload further comprises:
parsing the payload; and
invoking one or more local application programming interface (API) calls for each object extracted from the payload.
16. The method of claim 1 , wherein the application-specific event corresponds to a termination of the mobile application.
17. The mobile computing device of claim 6 , wherein the application-specific event corresponds to a termination of the mobile application.
18. The non-transitory computer-readable medium of claim 12 , wherein the application-specific event corresponds to a termination of the mobile application.