NearbyPermissions
Stay organized with collections
Save and categorize content based on your preferences.
Page Summary
NearbyPermissions is an annotation that determines the scope of permissions Nearby will ask for at connection time.
Calls to Messages#Publish() and Messages#Subscribe() require a Strategy that matches the requested permissions.
Failing to match the Strategy with the requested permissions will result in a failure.
The available permission constants include BLE, BLUETOOTH, DEFAULT, MICROPHONE, and NONE.
public abstract @interface NearbyPermissions implements Annotation
Determines the scope of permissions Nearby will ask for at connection time.
Calls to Messages#Publish() and Messages#Subscribe() require a
Strategy
that matches the permissions you've requested. For example, attempting to subscribe using
BLE, but only requesting the
MICROPHONE permission will result in a failure.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-10-31 UTC."],[],["`NearbyPermissions` defines the permissions scope for Nearby connections. `Messages#Publish()` and `Messages#Subscribe()` must use a matching `Strategy`. Requesting `MICROPHONE` while using BLE for subscription will fail. Available constants include `BLE` (2), `BLUETOOTH` (6), `DEFAULT` (-1), `MICROPHONE` (1), and `NONE` (0). The interface also inherits methods like `annotationType()`, `equals()`, `hashCode()`, and `toString()` from `java.lang.annotation.Annotation`.\n"]]