0.2.6 • Published 8 months ago

@capacitor-trancee/nearby-connections v0.2.6

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

@capacitor-trancee/nearby-connections

Uses Nearby Connections peer-to-peer networking API that allows apps to easily discover, connect to, and exchange data with nearby devices in real-time, regardless of network connectivity

Install

npm install @capacitor-trancee/nearby-connections
npx cap sync

iOS

Nearby Connections needs access to both Bluetooth and the local network to advertise, discover, make connections, and transfer data. Provide a usage description for each resource needed, in your app’s Info.plist. If you don’t, attempts to access the resource will fail, and might even cause your app to crash.

Required usage description keys:

  • NSBluetoothAlwaysUsageDescription

    <key>NSBluetoothAlwaysUsageDescription</key>
    <string>${PRODUCT_NAME} uses Bluetooth to discover nearby devices.</string>
  • NSLocalNetworkUsageDescription

    <key>NSLocalNetworkUsageDescription</key>
    <string>${PRODUCT_NAME} uses the local network to discover nearby devices on your WiFi network.</string>

In addition to usage description keys, an NSBonjourServices key with a list of the service types that will be browsed by the app, will also need to be added. The only service type that must be added can be generated by taking the first 12 bytes of the SHA-256 hash of your app's service ID.

Read about Configuring Info.plist in the iOS Guide for more information on setting iOS permissions in Xcode

Android

Before using Nearby Connections, your app must request the appropriate permissions. Add the following permissions to your AndroidManifest.xml:

    <!-- https://developers.google.com/nearby/connections/android/get-started#request_permissions -->

    <!-- Required for Nearby Connections -->
    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
    <uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />

    <uses-permission
        android:name="android.permission.BLUETOOTH"
        android:maxSdkVersion="30" />
    <uses-permission
        android:name="android.permission.BLUETOOTH_ADMIN"
        android:maxSdkVersion="30" />

    <uses-permission
        android:name="android.permission.ACCESS_COARSE_LOCATION"
        android:maxSdkVersion="32" />
    <uses-permission
        android:name="android.permission.ACCESS_FINE_LOCATION"
        android:maxSdkVersion="32" />

    <uses-permission
        android:name="android.permission.BLUETOOTH_ADVERTISE" />
    <uses-permission
        android:name="android.permission.BLUETOOTH_CONNECT" />
    <uses-permission
        android:name="android.permission.BLUETOOTH_SCAN"
        android:usesPermissionFlags="neverForLocation"
        tools:targetApi="s" />

    <uses-permission
        android:name="android.permission.NEARBY_WIFI_DEVICES"
        android:usesPermissionFlags="neverForLocation"
        tools:targetApi="s" />

    <!-- Optional: only required for FILE payloads -->
    <uses-permission
        android:name="android.permission.READ_EXTERNAL_STORAGE"
        tools:ignore="ScopedStorage" />

    <uses-feature
        android:name="android.hardware.bluetooth_le"
        android:required="false" />

If the user does not grant all required permissions, the Nearby Connections API will refuse to allow your app to start advertising or discovering.

Read about Setting Permissions in the Android Guide for more information on setting Android permissions.

Variables

This plugin will use the following project variables (defined in your app's variables.gradle file):

  • playServicesNearbyVersion version of com.google.android.gms:play-services-nearby (default: 19.3.0)

  • playServicesLocationVersion version of com.google.android.gms:play-services-location (default: 21.3.0)

  • protoliteWellKnownTypesVersion version of com.google.firebase:protolite-well-known-types (default: 18.0.0)

Example

Configuration

These configuration values are available:

PropTypeDescriptionSince
endpointNamestringA human readable name for this endpoint, to appear on the remote device.1.0.0
serviceIDServiceIDAn identifier to advertise your app to other endpoints. The serviceID value must uniquely identify your app. As a best practice, use the package name of your app (for example, com.example.myapp).1.0.0
strategyStrategySets the Strategy to be used when discovering or advertising to Nearby devices.1.0.0
connectionTypeConnectionTypeSets whether the client should disrupt the current connection to optimize the transfer or not. Only available on Android.1.0.0
lowPowerbooleanSets whether low power should be used. Only available on Android.1.0.0
autoConnectbooleanAutomatically accept the connection on both sides.1.0.0
payloadstringWhat payload to send when automatically connecting to each other.1.0.0

Examples

In capacitor.config.json:

{
  "plugins": {
    "NearbyConnections": {
      "endpointName": "My App",
      "serviceID": "com.example.myapp",
      "strategy": Strategy.STAR,
      "connectionType": ConnectionType.BALANCED,
      "lowPower": true,
      "autoConnect": true,
      "payload": "Hello, World!"
    }
  }
}

In capacitor.config.ts:

/// <reference types="@capacitor-trancee/nearby-connections" />

import { CapacitorConfig } from '@capacitor/cli';

const config: CapacitorConfig = {
  plugins: {
    NearbyConnections: {
      endpointName: "My App",
      serviceID: "com.example.myapp",
      strategy: Strategy.STAR,
      connectionType: ConnectionType.BALANCED,
      lowPower: true,
      autoConnect: true,
      payload: "Hello, World!",
    },
  },
};

export default config;

API

initialize(...)

initialize(options?: InitializeOptions | undefined) => Promise<void>

Initializes Nearby Connections for advertising and discovering of endpoints.

ParamType
optionsInitializeOptions

Since: 1.0.0


reset()

reset() => Promise<void>

Stops and resets advertising and discovering of endpoints.

Since: 1.0.0


startAdvertising(...)

startAdvertising(options?: StartAdvertisingOptions | undefined) => Promise<void>

Starts advertising the local endpoint.

ParamType
optionsStartAdvertisingOptions

Since: 1.0.0


stopAdvertising()

stopAdvertising() => Promise<void>

Stops advertising the local endpoint.

Since: 1.0.0


startDiscovery(...)

startDiscovery(options?: StartDiscoveryOptions | undefined) => Promise<void>

Starts discovery for remote endpoints.

ParamType
optionsStartDiscoveryOptions

Since: 1.0.0


stopDiscovery()

stopDiscovery() => Promise<void>

Stops discovery for remote endpoints.

Since: 1.0.0


requestConnection(...)

requestConnection(options: RequestConnectionOptions) => Promise<void>

Sends a request to connect to a remote endpoint.

ParamType
optionsRequestConnectionOptions

Since: 1.0.0


acceptConnection(...)

acceptConnection(options: AcceptConnectionOptions) => Promise<void>

Accepts a connection to a remote endpoint.

ParamType
optionsAcceptConnectionOptions

Since: 1.0.0


rejectConnection(...)

rejectConnection(options: RejectConnectionOptions) => Promise<void>

Rejects a connection to a remote endpoint.

ParamType
optionsRejectConnectionOptions

Since: 1.0.0


disconnect(...)

disconnect(options: DisconnectOptions) => Promise<void>

Disconnects from a remote endpoint. Payloads can no longer be sent to or received from the endpoint after this method is called.

ParamType
optionsDisconnectOptions

sendPayload(...)

sendPayload(options: SendPayloadOptions) => Promise<SendPayloadResult>

Sends a Payload to a remote endpoint.

ParamType
optionsSendPayloadOptions

Returns: Promise<SendPayloadResult>

Since: 1.0.0


cancelPayload(...)

cancelPayload(options: CancelPayloadOptions) => Promise<void>

Cancels a Payload currently in-flight to or from remote endpoint(s).

ParamType
optionsCancelPayloadOptions

Since: 1.0.0


status()

status() => Promise<StatusResult>

Returns advertising and discovering status, and discovered endpoints.

Returns: Promise<StatusResult>

Since: 1.0.0


checkPermissions()

checkPermissions() => Promise<PermissionStatus>

Check for the appropriate permissions to use Nearby.

Returns: Promise<PermissionStatus>

Since: 1.0.0


requestPermissions(...)

requestPermissions(permissions?: NearbyConnectionsPermissions | undefined) => Promise<PermissionStatus>

Request the appropriate permissions to use Nearby.

ParamType
permissionsNearbyConnectionsPermissions

Returns: Promise<PermissionStatus>

Since: 1.0.0


addListener('onPermissionChanged', ...)

addListener(eventName: 'onPermissionChanged', listenerFunc: (granted: boolean) => void) => Promise<PluginListenerHandle>

Called when permission is granted or revoked for this app to use Nearby.

ParamType
eventName'onPermissionChanged'
listenerFunc(granted: boolean) => void

Returns: Promise<PluginListenerHandle>

Since: 1.0.0


addListener('onBluetoothStateChanged', ...)

addListener(eventName: 'onBluetoothStateChanged', listenerFunc: (state: BluetoothState) => void) => Promise<PluginListenerHandle>

Called when state of Bluetooth has changed.

ParamType
eventName'onBluetoothStateChanged'
listenerFunc(state: BluetoothState) => void

Returns: Promise<PluginListenerHandle>

Since: 1.0.0


addListener('onEndpointFound', ...)

addListener(eventName: 'onEndpointFound', listenerFunc: EndpointFoundCallback) => Promise<PluginListenerHandle>

Called when a remote endpoint is discovered.

ParamType
eventName'onEndpointFound'
listenerFuncEndpointFoundCallback

Returns: Promise<PluginListenerHandle>

Since: 1.0.0


addListener('onEndpointLost', ...)

addListener(eventName: 'onEndpointLost', listenerFunc: EndpointLostCallback) => Promise<PluginListenerHandle>

Called when a remote endpoint is no longer discoverable.

ParamType
eventName'onEndpointLost'
listenerFuncEndpointLostCallback

Returns: Promise<PluginListenerHandle>

Since: 1.0.0


addListener('onEndpointInitiated', ...)

addListener(eventName: 'onEndpointInitiated', listenerFunc: EndpointInitiatedCallback) => Promise<PluginListenerHandle>

A basic encrypted channel has been created between you and the endpoint. Both sides are now asked if they wish to accept or reject the connection before any data can be sent over this channel.

ParamType
eventName'onEndpointInitiated'
listenerFuncEndpointInitiatedCallback

Returns: Promise<PluginListenerHandle>

Since: 1.0.0


addListener('onEndpointConnected', ...)

addListener(eventName: 'onEndpointConnected', listenerFunc: EndpointConnectedCallback) => Promise<PluginListenerHandle>

Called after both sides have accepted the connection. Both sides may now send Payloads to each other.

ParamType
eventName'onEndpointConnected'
listenerFuncEndpointConnectedCallback

Returns: Promise<PluginListenerHandle>

Since: 1.0.0


addListener('onEndpointRejected', ...)

addListener(eventName: 'onEndpointRejected', listenerFunc: EndpointRejectedCallback) => Promise<PluginListenerHandle>

Called when either side rejected the connection. Payloads can not be exchaged.

ParamType
eventName'onEndpointRejected'
listenerFuncEndpointRejectedCallback

Returns: Promise<PluginListenerHandle>


addListener('onEndpointFailed', ...)

addListener(eventName: 'onEndpointFailed', listenerFunc: EndpointFailedCallback) => Promise<PluginListenerHandle>
ParamType
eventName'onEndpointFailed'
listenerFuncEndpointFailedCallback

Returns: Promise<PluginListenerHandle>


addListener('onEndpointDisconnected', ...)

addListener(eventName: 'onEndpointDisconnected', listenerFunc: EndpointDisconnectedCallback) => Promise<PluginListenerHandle>

Called when a remote endpoint is disconnected or has become unreachable.

ParamType
eventName'onEndpointDisconnected'
listenerFuncEndpointDisconnectedCallback

Returns: Promise<PluginListenerHandle>

Since: 1.0.0


addListener('onEndpointBandwidthChanged', ...)

addListener(eventName: 'onEndpointBandwidthChanged', listenerFunc: EndpointBandwidthChangedCallback) => Promise<PluginListenerHandle>

Called when a connection is established or if the connection quality improves to a higher connection bandwidth.

ParamType
eventName'onEndpointBandwidthChanged'
listenerFuncEndpointBandwidthChangedCallback

Returns: Promise<PluginListenerHandle>

Since: 1.0.0


addListener('onPayloadReceived', ...)

addListener(eventName: 'onPayloadReceived', listenerFunc: PayloadReceivedCallback) => Promise<PluginListenerHandle>

Called when a Payload is received from a remote endpoint.

ParamType
eventName'onPayloadReceived'
listenerFuncPayloadReceivedCallback

Returns: Promise<PluginListenerHandle>

Since: 1.0.0


addListener('onPayloadTransferUpdate', ...)

addListener(eventName: 'onPayloadTransferUpdate', listenerFunc: PayloadTransferUpdateCallback) => Promise<PluginListenerHandle>

Called with progress information about an active Payload transfer, either incoming or outgoing.

ParamType
eventName'onPayloadTransferUpdate'
listenerFuncPayloadTransferUpdateCallback

Returns: Promise<PluginListenerHandle>

Since: 1.0.0


Interfaces

InitializeOptions

PropTypeDescriptionDefaultSince
endpointNamestringA human readable name for this endpoint, to appear on the remote device.1.0.0
serviceIDServiceIDAn identifier to advertise your app to other endpoints. The serviceID value must uniquely identify your app. As a best practice, use the package name of your app (for example, com.example.myapp).1.0.0
strategyStrategySets the Strategy to be used when discovering or advertising to Nearby devices.1.0.0
lowPowerbooleanSets whether low power should be used. Only available on Android.false1.0.0
autoConnectbooleanAutomatically accept the connection on both sides.1.0.0
payloadstringWhat payload to send when automatically connecting to each other.1.0.0

StartAdvertisingOptions

PropTypeDescriptionDefaultSince
endpointNamestringA human readable name for this endpoint, to appear on the remote device.1.0.0
connectionTypeConnectionTypeSets whether the client should disrupt the current connection to optimize the transfer or not. Only available on Android.ConnectionType.BALANCED1.0.0
lowPowerbooleanSets whether low power should be used. Only available on Android.false1.0.0

StartDiscoveryOptions

PropTypeDescriptionDefaultSince
lowPowerbooleanSets whether low power should be used. Only available on Android.false1.0.0

RequestConnectionOptions

PropTypeDescriptionSince
endpointIDEndpointIDThe identifier for the remote endpoint to which a connection request will be sent.1.0.0
endpointNamestringA human readable name for this endpoint, to appear on the remote device.1.0.0

AcceptConnectionOptions

PropTypeDescriptionSince
endpointIDEndpointIDThe identifier for the remote endpoint.1.0.0

RejectConnectionOptions

PropTypeDescriptionSince
endpointIDEndpointIDThe identifier for the remote endpoint.1.0.0

DisconnectOptions

PropTypeDescriptionSince
endpointIDEndpointIDThe identifier for the remote endpoint to disconnect from.1.0.0

SendPayloadResult

PropTypeDescriptionSince
payloadIDPayloadIDA unique identifier for this payload.1.0.0
payloadTypePayloadTypeThe type of this payload.1.0.0
statusPayloadTransferUpdateStatusThe status of the payload.1.0.0

SendPayloadOptions

PropTypeDescriptionSince
endpointIDEndpointIDThe identifier for the remote endpoint to which the payload should be sent.1.0.0
endpointIDsstring[]The identifiers for the remote endpoints to which the payload should be sent.1.0.0
payloadstringThe Payload to be sent.1.0.0

CancelPayloadOptions

PropTypeDescriptionSince
payloadIDPayloadIDThe identifier for the Payload to be canceled.1.0.0

StatusResult

PropType
isAdvertisingboolean
isDiscoveringboolean

PermissionStatus

PropTypeDescriptionSince
wifiNearbyPermissionStateNEARBY_WIFI_DEVICES Required to be able to advertise and connect to nearby devices via Wi-Fi.1.0.0
wifiStatePermissionStateACCESS_WIFI_STATE Allows applications to access information about Wi-Fi networks. CHANGE_WIFI_STATE Allows applications to change Wi-Fi connectivity state.1.0.0
bluetoothNearbyPermissionStateBLUETOOTH_ADVERTISE Required to be able to advertise to nearby Bluetooth devices. BLUETOOTH_CONNECT Required to be able to connect to paired Bluetooth devices. BLUETOOTH_SCAN Required to be able to discover and pair nearby Bluetooth devices.1.0.0
bluetoothLegacyPermissionStateBLUETOOTH Allows applications to connect to paired bluetooth devices. BLUETOOTH_ADMIN Allows applications to discover and pair bluetooth devices.1.0.0
locationPermissionStateACCESS_FINE_LOCATION Allows an app to access precise location.1.0.0
locationCoarsePermissionStateACCESS_COARSE_LOCATION Allows an app to access approximate location.1.0.0

NearbyConnectionsPermissions

PropType
permissionsNearbyConnectionPermissionType[]

PluginListenerHandle

PropType
remove() => Promise<void>

Endpoint

PropTypeDescriptionSince
endpointIDEndpointIDThe ID of the remote endpoint that was discovered.1.0.0
endpointNamestringA human readable name for this endpoint, to appear on the remote device.1.0.0

ConnectionInfo

Information about a connection that is being initiated.

PropTypeDescriptionSince
authenticationTokenstringA 4 digit authentication token that has been given to both devices.1.0.0
authenticationStatusnumberAn authentication status for Authentication handshaking result after uKey2 verification.1.0.0
isIncomingConnectionbooleanTrue if the connection request was initiated from a remote device. False if this device was the one to try and initiate the connection.1.0.0

BandwidthInfo

Information about a connection's bandwidth.

PropTypeDescriptionSince
qualityQualityThe connection's current quality.1.0.0

Payload

A Payload sent between devices.

PropTypeDescriptionSince
payloadIDPayloadIDA unique identifier for this payload.1.0.0
payloadTypePayloadTypeThe type of this payload.1.0.0
payloadstringPayload data.1.0.0

PayloadTransferUpdate

Describes the status for an active Payload transfer, either incoming or outgoing.

PropTypeDescriptionSince
payloadIDPayloadIDThe payload identifier.1.0.0
statusPayloadTransferUpdateStatusThe status of the payload.1.0.0
bytesTransferrednumberThe number of bytes transferred so far.1.0.0
totalBytesnumberThe total number of bytes in the payload.1.0.0

Type Aliases

ServiceID

Used to represent a service identifier.

string

EndpointID

Used to represent an endpoint.

string

PayloadID

Used to represent a payload.

number

PermissionState

'prompt' | 'prompt-with-rationale' | 'granted' | 'denied'

NearbyConnectionPermissionType

'wifiNearby' | 'wifiState' | 'bluetoothNearby' | 'bluetoothLegacy' | 'location' | 'locationCoarse'

EndpointFoundCallback

Called when a remote endpoint is discovered.

(_: Endpoint): void

EndpointLostCallback

Called when a remote endpoint is no longer discoverable.

(_: Endpoint): void

EndpointInitiatedCallback

A basic encrypted channel has been created between you and the endpoint. Both sides are now asked if they wish to accept or reject the connection before any data can be sent over this channel.

(_: Endpoint & ConnectionInfo): void

EndpointConnectedCallback

Called after both sides have accepted the connection. Both sides may now send Payloads to each other.

(_: Endpoint): void

EndpointRejectedCallback

Called when either side rejected the connection. Payloads can not be exchaged.

(_: Endpoint): void

EndpointFailedCallback

(_: Endpoint & Status): void

EndpointDisconnectedCallback

Called when a remote endpoint is disconnected or has become unreachable. At this point service (re-)discovery may start again.

(_: Endpoint): void

EndpointBandwidthChangedCallback

Called when a connection is established or if the connection quality improves to a higher connection bandwidth.

(_: Endpoint & BandwidthInfo): void

PayloadReceivedCallback

Called when a payload is received from a remote endpoint. Depending on the type of the payload, all of the data may or may not have been received at the time of this call.

(_: Endpoint & Payload): void

PayloadTransferUpdateCallback

Called with progress information about an active payload transfer, either incoming or outgoing.

(_: Endpoint & PayloadTransferUpdate): void

Enums

Strategy

MembersValueDescriptionSince
CLUSTER'cluster'Peer-to-peer strategy that supports an M-to-N, or cluster-shaped, connection topology. No restrictions on the amount of incoming and outgoing connections.1.0.0
STAR'star'Peer-to-peer strategy that supports a 1-to-N, or star-shaped, connection topology. Restricts the discoverer to a single connection, while advertisers have no restrictions on amount of connections.1.0.0
POINT_TO_POINT'pointToPoint'Peer-to-peer strategy that supports a 1-to-1 connection topology. Restricts both adverisers and discoverers to a single connection.1.0.0

ConnectionType

MembersValueDescriptionSince
BALANCED'balanced'Nearby Connections will change the device's Wi-Fi or Bluetooth status only if necessary.1.0.0
DISRUPTIVE'disruptive'Nearby Connections will change the device's Wi-Fi or Bluetooth status to enhance throughput.1.0.0
NON_DISRUPTIVE'nonDisruptive'Nearby Connections should not change the device's Wi-Fi or Bluetooth status.1.0.0

PayloadType

MembersValueDescriptionSince
BYTES'bytes'A Payload consisting of a single byte array.1.0.0
FILE'file'A Payload representing a file on the device.1.0.0
STREAM'stream'A Payload representing a real-time stream of data; e.g. generated data for which the total size is not known ahead of time.1.0.0

PayloadTransferUpdateStatus

MembersValueDescriptionSince
SUCCESS'success'The remote endpoint has successfully received the full transfer.1.0.0
CANCELED'canceled'Either the local or remote endpoint has canceled the transfer.1.0.0
FAILURE'failure'The remote endpoint failed to receive the transfer.1.0.0
IN_PROGRESS'inProgress'The the transfer is currently in progress with an associated progress value.1.0.0

BluetoothState

MembersValueDescriptionSince
UNKNOWN'unknown'The manager’s state is unknown.1.0.0
RESETTING'resetting'A state that indicates the connection with the system service was momentarily lost.1.0.0
UNSUPPORTED'unsupported'A state that indicates this device doesn’t support the Bluetooth low energy central or client role.1.0.0
UNAUTHORIZED'unauthorized'A state that indicates the application isn’t authorized to use the Bluetooth low energy role.1.0.0
POWERED_OFF'poweredOff'A state that indicates Bluetooth is currently powered off.1.0.0
POWERED_ON'poweredOn'A state that indicates Bluetooth is currently powered on and available to use.1.0.0

Status

MembersValueDescription
OK'OK'The operation was successful.
ERROR'ERROR'The operation failed, without any more information.
NETWORK_NOT_CONNECTED'NETWORK_NOT_CONNECTED'
ALREADY_ADVERTISING'ALREADY_ADVERTISING'The app is already advertising; call stopAdvertising() before trying to advertise again.
ALREADY_DISCOVERING'ALREADY_DISCOVERING'The app is already discovering the specified application ID; call stopDiscovery() before trying to advertise again.
ALREADY_CONNECTED_TO_ENDPOINT'ALREADY_CONNECTED_TO_ENDPOINT'The app is already connected to the specified endpoint. Multiple connections to a remote endpoint cannot be maintained simultaneously.
CONNECTION_REJECTED'CONNECTION_REJECTED'The remote endpoint rejected the connection request.
NOT_CONNECTED_TO_ENDPOINT'NOT_CONNECTED_TO_ENDPOINT'The remote endpoint is not connected; messages cannot be sent to it.
RADIO_ERROR'RADIO_ERROR'There was an error trying to use the phone's Bluetooth/WiFi/NFC capabilities.
ALREADY_HAVE_ACTIVE_STRATEGY'ALREADY_HAVE_ACTIVE_STRATEGY'The app already has active operations (advertising, discovering, or connected to other devices) with another Strategy. Stop these operations on the current Strategy before trying to advertise or discover with a new Strategy.
OUT_OF_ORDER_API_CALL'OUT_OF_ORDER_API_CALL'The app called an API method out of order (i.e. another method is expected to be called first).
UNSUPPORTED_PAYLOAD_TYPE_FOR_STRATEGY'UNSUPPORTED_PAYLOAD_TYPE_FOR_STRATEGY'
ENDPOINT_UNKNOWN'ENDPOINT_UNKNOWN'An attempt to interact with a remote endpoint failed because it's unknown to us -- it's either an endpoint that was never discovered, or an endpoint that never connected to us (both of which are indicative of bad input from the client app).
ENDPOINT_IO_ERROR'ENDPOINT_IO_ERROR'An attempt to read from/write to a connected remote endpoint failed.
PAYLOAD_IO_ERROR'PAYLOAD_IO_ERROR'An attempt to read/write data for a Payload of type FILE or STREAM failed.
PAYLOAD_UNKNOWN'PAYLOAD_UNKNOWN'
ALREADY_LISTENING'ALREADY_LISTENING'
AUTH_ERROR'AUTH_ERROR'
ALREADY_IN_USE'ALREADY_IN_USE'This error indicates that Nearby Connections is already in use by some app, and thus is currently unavailable to the caller.

Quality

MembersValueDescriptionSince
UNKNOWN'unknown'
LOW'low'The connection quality is poor (5KBps) and is not suitable for sending files. It's recommended you wait until the connection quality improves.1.0.0
MEDIUM'medium'The connection quality is ok (60~200KBps) and is suitable for sending small files. For large files, it's recommended you wait until the connection quality improves.1.0.0
HIGH'high'The connection quality is good or great (6MBps~60MBps) and files can readily be sent. The connection quality cannot improve further but may still be impacted by environment or hardware limitations.1.0.0
0.2.6

8 months ago

0.2.5

8 months ago

0.2.4

8 months ago

0.2.3

8 months ago

0.2.2

8 months ago

0.2.1

8 months ago

0.2.0

8 months ago

0.1.0

9 months ago

0.0.1

9 months ago