subscribe Service Notification
Registers a callback to receive service notifications from Steam's unified messaging system.
This method creates a service subscription that listens for specific notifications from a Steam service. When a notification arrives, it validates the notification type and forwards it to the provided callback function if the types match.
Return
A Closeable subscription. Call Closeable.close to unsubscribe and clean up resources
Example usage in Kotlin: val subscription = manager.subscribeServiceNotification( GameNotificationsClient::class.java, CGameNotifications_OnNotificationsRequested_Notification.Builder::class.java, this::onGameStartedNotification )
Example usage in Java: manager.subscribeServiceNotification( GameNotificationsClient.class, CGameNotifications_OnNotificationsRequested_Notification.Builder.class, notification -> onGameStartedNotification(notification) );
Parameters
The type of Steam service to subscribe to (e.g., GameNotificationsClient)
The type of notification message to receive (e.g., CGameNotifications_OnNotificationsRequested_Notification.Builder)
The class object representing the Steam service
The class object representing the notification type
The callback function to be invoked when matching notifications are received