NearbyPermissions
Stay organized with collections
Save and categorize content based on your preferences.
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.
Inherited Method Summary
From interface java.lang.annotation.Annotation
abstract Class<? extends Annotation>
|
annotationType()
|
abstract boolean |
|
abstract int |
hashCode()
|
abstract String
|
toString()
|
Constants
public static final int
BLE
public static final int
BLUETOOTH
public static final int
DEFAULT
public static final int
MICROPHONE
public static final int
NONE
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-10-31 UTC.
[[["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 scope of permissions Nearby will request when establishing a connection."],["`Messages#Publish()` and `Messages#Subscribe()` require a Strategy that aligns with the requested permissions, or they will fail."],["There are five permission constants: `BLE`, `BLUETOOTH`, `DEFAULT`, `MICROPHONE`, and `NONE`, each with a corresponding integer value."],["This annotation inherits methods from `java.lang.annotation.Annotation`, including `annotationType()`, `equals()`, `hashCode()`, and `toString()`."]]],["`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"]]