Page Summary
-
Nearby is an API for communication with nearby devices.
-
Several fields related to Connections and Messages are deprecated and suggest using
getConnectionsClientorgetMessagesClientmethods instead. -
The
getConnectionsClientmethod creates a new instance ofConnectionsClient. -
The
getFastPairClientmethod creates a new instance ofFastPairClient. -
MessagesClientmethods are deprecated and recommend usingConnectionsClientinstead, as Nearby Messages will be removed by the end of 2023. -
UwbClientmethods are available but direct use of the Nearby UWB SDK is not supported, recommending the Jetpack UWB SDK instead.
API for communication with nearby devices.
Field Summary
| public static final Api < ConnectionsOptions > | CONNECTIONS_API | This field is deprecated. Use getConnectionsClient(Context)
instead.
|
| public static final Connections | Connections | This field is deprecated. Use getConnectionsClient(Context)
instead.
|
| public static final Api < MessagesOptions > | MESSAGES_API | This field is deprecated. Use getMessagesClient(Context)
instead.
|
| public static final Messages | Messages | This field is deprecated. Use getMessagesClient(Context)
instead.
|
Public Method Summary
| static ConnectionsClient | |
| static ConnectionsClient | |
| static FastPairClient | |
| static MessagesClient | getMessagesClient
( Activity
activity, MessagesOptions
options)
This method is deprecated. Nearby Messages will be removed by the end of
2023. Use
ConnectionsClient
instead.
|
| static MessagesClient | getMessagesClient
( Activity
activity)
This method is deprecated. Nearby Messages will be removed by the end of
2023. Use
ConnectionsClient
instead.
|
| static MessagesClient | getMessagesClient
( Context
context, MessagesOptions
options)
This method is deprecated. Nearby Messages will be removed by the end of
2023. Use
ConnectionsClient
instead.
|
| static MessagesClient | getMessagesClient
( Context
context)
This method is deprecated. Nearby Messages will be removed by the end of
2023. Use
ConnectionsClient
instead.
|
| static UwbClient | |
| static UwbClient |
Inherited Method Summary
Fields
public static final Api < ConnectionsOptions > CONNECTIONS_API
This field is deprecated.
Use getConnectionsClient(Context)
instead.
public static final Connections Connections
This field is deprecated.
Use getConnectionsClient(Context)
instead.
public static final Api < MessagesOptions > MESSAGES_API
This field is deprecated.
Use getMessagesClient(Context)
instead.
public static final Messages Messages
This field is deprecated.
Use getMessagesClient(Context)
instead.
Public Methods
public static ConnectionsClient getConnectionsClient ( Context context)
Creates a new instance of ConnectionsClient
.
Resolvable connections errors will create a system notification that the user can tap
in order to resolve the error.
public static ConnectionsClient getConnectionsClient ( Activity activity)
Creates a new instance of ConnectionsClient
.
The given Activity
will
be used to automatically prompt for resolution of resolvable connection errors.
public static FastPairClient getFastPairClient ( Context context)
Creates a new instance of FastPairClient
.
Resolvable connections errors will create a system notification that the user can tap
in order to resolve the error.
public static MessagesClient getMessagesClient ( Activity activity, MessagesOptions options)
This method is deprecated.
Nearby Messages will be removed by the end of 2023. Use ConnectionsClient
instead.
Creates a new instance of MessagesClient
.
The given Activity will be used to automatically prompt for resolution of resolvable
connection errors.
public static MessagesClient getMessagesClient ( Activity activity)
This method is deprecated.
Nearby Messages will be removed by the end of 2023. Use ConnectionsClient
instead.
Creates a new instance of MessagesClient
.
The given Activity will be used to automatically prompt for resolution of resolvable
connection errors.
public static MessagesClient getMessagesClient ( Context context, MessagesOptions options)
This method is deprecated.
Nearby Messages will be removed by the end of 2023. Use ConnectionsClient
instead.
Creates a new instance of MessagesClient
.
Resolvable connections errors will create a system notification that the user can tap
in order to resolve the error.
public static MessagesClient getMessagesClient ( Context context)
This method is deprecated.
Nearby Messages will be removed by the end of 2023. Use ConnectionsClient
instead.
Creates a new instance of MessagesClient
.
Resolvable connections errors will create a system notification that the user can tap
in order to resolve the error.
public static UwbClient getUwbControleeClient ( Context context)
Creates a new instance of controlee-type UwbClient
.

