Nearby

public final classNearbyextendsObject

API for communication with nearby devices.

Field Summary

public static finalApi<ConnectionsOptions> CONNECTIONS_API This field is deprecated. Use getConnectionsClient(Context)instead.
public static finalConnections Connections This field is deprecated. Use getConnectionsClient(Context)instead.
public static finalApi<MessagesOptions> MESSAGES_API This field is deprecated. Use getMessagesClient(Context)instead.
public static finalMessages Messages This field is deprecated. Use getMessagesClient(Context)instead.

Public Method Summary

static ConnectionsClient
getConnectionsClient(Context context)
Creates a new instance of ConnectionsClient.
static ConnectionsClient
getConnectionsClient(Activity activity)
Creates a new instance of ConnectionsClient.
staticFastPairClient
getFastPairClient(Context context)
Creates a new instance of FastPairClient.
staticMessagesClient
getMessagesClient(Activity activity,MessagesOptions options)
This method is deprecated. Nearby Messages will be removed by the end of 2023. Use ConnectionsClientinstead.
staticMessagesClient
getMessagesClient(Activity activity)
This method is deprecated. Nearby Messages will be removed by the end of 2023. Use ConnectionsClientinstead.
staticMessagesClient
getMessagesClient(Context context,MessagesOptions options)
This method is deprecated. Nearby Messages will be removed by the end of 2023. Use ConnectionsClientinstead.
staticMessagesClient
getMessagesClient(Context context)
This method is deprecated. Nearby Messages will be removed by the end of 2023. Use ConnectionsClientinstead.
staticUwbClient
getUwbControleeClient(Context context)
Creates a new instance of controlee-typeUwbClient.
staticUwbClient
getUwbControllerClient(Context context)
Creates a new instance of controller-typeUwbClient.

Inherited Method Summary

Fields

public static finalApi<ConnectionsOptions> CONNECTIONS_API

This field is deprecated.
Use getConnectionsClient(Context)instead.

public static finalConnections Connections

This field is deprecated.
Use getConnectionsClient(Context)instead.

public static finalApi<MessagesOptions> MESSAGES_API

This field is deprecated.
Use getMessagesClient(Context)instead.

public static finalMessages Messages

This field is deprecated.
Use getMessagesClient(Context)instead.

Public Methods

public staticConnectionsClient getConnectionsClient(Context context)

Creates a new instance ofConnectionsClient. Resolvable connections errors will create a system notification that the user can tap in order to resolve the error.

public staticConnectionsClient getConnectionsClient(Activity activity)

Creates a new instance ofConnectionsClient. The givenActivitywill be used to automatically prompt for resolution of resolvable connection errors.

public staticFastPairClient getFastPairClient(Context context)

Creates a new instance ofFastPairClient. Resolvable connections errors will create a system notification that the user can tap in order to resolve the error.

public staticMessagesClient getMessagesClient(Activityactivity, MessagesOptions options)

This method is deprecated.
Nearby Messages will be removed by the end of 2023. UseConnectionsClient instead.

Creates a new instance ofMessagesClient. The given Activity will be used to automatically prompt for resolution of resolvable connection errors.

public staticMessagesClient getMessagesClient(Activity activity)

This method is deprecated.
Nearby Messages will be removed by the end of 2023. UseConnectionsClient instead.

Creates a new instance ofMessagesClient. The given Activity will be used to automatically prompt for resolution of resolvable connection errors.

public staticMessagesClient getMessagesClient(Contextcontext, MessagesOptions options)

This method is deprecated.
Nearby Messages will be removed by the end of 2023. UseConnectionsClient instead.

Creates a new instance ofMessagesClient. Resolvable connections errors will create a system notification that the user can tap in order to resolve the error.

public staticMessagesClient getMessagesClient(Context context)

This method is deprecated.
Nearby Messages will be removed by the end of 2023. UseConnectionsClient instead.

Creates a new instance ofMessagesClient. Resolvable connections errors will create a system notification that the user can tap in order to resolve the error.

public staticUwbClient getUwbControleeClient(Context context)

Creates a new instance of controlee-typeUwbClient.

public staticUwbClient getUwbControllerClient(Context context)

Creates a new instance of controller-typeUwbClient.