Ellen Spertus
10/24/2019, 12:37 AMKamil Doległo
10/24/2019, 4:04 PMEllen Spertus
10/24/2019, 5:59 PM/**
* A class that can be run on two devices to allow them to connect. This supports sending a single
* message at a time in each direction. It contains internal synchronization and may be accessed
* from any thread.
*
* @constructor Constructs a new connection, which will call [NearbyConnectionObserver.onStateUpdated]
* with an argument of type [ConnectionState.Isolated]. No further action will be taken unless
* other methods are called by the client.
* @property context context needed to initiate connection, used only at start
* @property name name shown by this device to other devices
*/
class NearbyConnection(
private val context: Context,
private val name: String = Build.MODEL
) : Observable<NearbyConnectionObserver> by ObserverRegistry() {
My guess is the problem is that the properties are marked private, but the caller should still need to know what they’re supposed to be.Ellen Spertus
10/24/2019, 5:59 PMKamil Doległo
10/24/2019, 9:11 PMincludeNonPublic
to have it documentedKamil Doległo
10/24/2019, 9:12 PMEllen Spertus
10/24/2019, 9:12 PMKamil Doległo
10/24/2019, 9:20 PM@property
to @param
Ellen Spertus
10/24/2019, 9:20 PMKamil Doległo
10/24/2019, 9:21 PMKamil Doległo
10/24/2019, 9:21 PMEllen Spertus
10/24/2019, 9:26 PMEllen Spertus
10/24/2019, 9:26 PMKamil Doległo
10/24/2019, 9:36 PMEllen Spertus
10/24/2019, 9:38 PMKamil Doległo
10/24/2019, 9:41 PM