Working with push agents

The first time any user obtains a push-subscription for an application, UA server automatically creates a local agent to monitor the application for changes.The nature of the agent depends on application settings:

The local agent looks the same as any agent created in Mobile Web Studio. You can edit them, start and stop them, and view their logs. Agents are described in the Unwired Accelerator Development Guide, but this section provides information that pertains to push agents.

StepsViewing push agents

  1. From Mobile Web Studio, select Automate | Agents from the left pane.

  2. Select Ready (or Stopped) from Agent Manager | Status in the middle the middle pane. The agents are listed in the right pane. Agent details include:

  3. Right-click an agent in the right pane, such as poll-employeeSales, and select Edit. The Agent Builder window displays.

  4. The Agent Builder works just as described in Unwired Accelerator Development Manager. Of special interest for push agents:

    Schedule tab If the “Recurrence” setting should match the “Content Cache Interval” if it was set for the mobile application.

    Action tab For the “Deliver” action, select the action and click Edit. The Action Details window displays. You can see details about how the agent runs:

    Make modifications and click OK to save and exit, or click cancel to exit.

  5. From Agent Builder, click Close to save the changes.

    Each time the agent executes, the agent retrieves a list of all the users who are subscribed for push notifications on the application, and will execute the application as each of the users in turn, at each point checking to see if the data has changed since the last time. Whenever the data has changed, UA sends a notification only to those users who are monitoring for changes.