Added in API level 26

PublishDiscoverySession


open class PublishDiscoverySession : DiscoverySession
kotlin.Any
   ↳ android.net.wifi.aware.DiscoverySession
   ↳ android.net.wifi.aware.PublishDiscoverySession

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

Summary

Public methods
open Unit
updatePublish(publishConfig: PublishConfig)

Re-configure the currently active publish session.

Inherited functions

Public methods

updatePublish

Added in API level 26
open fun updatePublish(publishConfig: PublishConfig): Unit

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:

Parameters
publishConfig PublishConfig: The new discovery publish session configuration (PublishConfig). This value cannot be null.