Nearby

public final class Nearby extends Object

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
getConnectionsClient(Context context)
Creates a new instance of ConnectionsClient.
static ConnectionsClient
getConnectionsClient(Activity activity)
Creates a new instance of ConnectionsClient.
static ExposureNotificationClient
static MessagesClient
getMessagesClient(Activity activity, MessagesOptions options)
Creates a new instance of MessagesClient.
static MessagesClient
getMessagesClient(Activity activity)
Creates a new instance of MessagesClient.
static MessagesClient
getMessagesClient(Context context, MessagesOptions options)
Creates a new instance of MessagesClient.
static MessagesClient
getMessagesClient(Context context)
Creates a new instance of MessagesClient.

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 ExposureNotificationClient getExposureNotificationClient (Context context)

Creates a new instance of ExposureNotificationClient. 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)

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)

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)

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)

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.