added in API level 26

PublishDiscoverySession

public class PublishDiscoverySession
extends DiscoverySession

java.lang.Object
   ↳ android.net.wifi.aware.DiscoverySession
     ↳ android.net.wifi.aware.PublishDiscoverySession


A class representing a Aware publish session. Created when publish(PublishConfig, DiscoverySessionCallback, android.os.Handler) is called and a discovery session is created and returned in onPublishStarted(PublishDiscoverySession). See baseline functionality of all discovery sessions in DiscoverySession. This object allows updating an existing/running publish discovery session using updatePublish(PublishConfig).

Summary

Public methods

void updatePublish(PublishConfig publishConfig)

Re-configure the currently active publish session.

Inherited methods

Public methods

updatePublish

added in API level 26
void updatePublish (PublishConfig publishConfig)

Re-configure the currently active publish 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 publish discovery session is still running using its previous configuration (i.e. update failure does not terminate the session).

Parameters
publishConfig PublishConfig: The new discovery publish session configuration (PublishConfig).

This value must never be null.