Thanks Phil.
Some notes for my future self and others:
- To push to a designer/client from the gateway, add a notification to the session received from the RPC call using:
session.addNotification(...)
- To listen for this notification in the designer/client, you first need a GatewayConnection object. Don't make a new connection, get one from the GatewayConnectionManager.
new DesignerGatewayConnection(context.getLaunchContext()) # incorrect
GatewayConnectionManager.getInstance() # correct
- In the designer/client, add a push notification listener to the GatewayConnection to handle the notification:
GatewayConnection connection = GatewayConnectionManager.getInstance();
connection.addPushNotificationListener(...);
connection.removePushNotificationListener(...);