added in API level 26


public class SubscribeDiscoverySession
extends DiscoverySession


A class representing a Aware subscribe session. Created when subscribe(SubscribeConfig, DiscoverySessionCallback, android.os.Handler) is called and a discovery session is created and returned in onSubscribeStarted(SubscribeDiscoverySession). See baseline functionality of all discovery sessions in DiscoverySession. This object allows updating an existing/running subscribe discovery session using updateSubscribe(SubscribeConfig).


Public methods

void updateSubscribe(SubscribeConfig subscribeConfig)

Re-configure the currently active subscribe session.

Inherited methods

Public methods


added in API level 26
void updateSubscribe (SubscribeConfig subscribeConfig)

Re-configure the currently active subscribe session. The DiscoverySessionCallback is not replaced - the same listener used at creation is still used. The results of the configuration are returned using DiscoverySessionCallback:

  • onSessionConfigUpdated(): configuration update succeeded.
  • onSessionConfigFailed(): configuration update failed. The subscribe discovery session is still running using its previous configuration (i.e. update failure does not terminate the session).

subscribeConfig SubscribeConfig: The new discovery subscribe session configuration (SubscribeConfig).

This value must never be null.