Connections.StartAdvertisingResult | Android Developers

Quicknav Quicknav
Links

- Google Play Developer Console
- Android Developers Blog
- About Android

Android Sites

- Android.com
- Android Developers
- Android Open Source Project

Language
close

- - About
  - Wear
  - TV
  - Auto
- - Get Started
  - Devices
  - Style
  - Patterns
  - Building Blocks
  - Downloads
  - Videos
- - Training
  - API Guides
  - Reference
  - Tools
  - Google Services
  - Samples
- - Google Play
  - Essentials
  - Get Users
  - Engage & Retain
  - Monetize
  - Analyze
  - Tools & Reference
  - Developer Stories

## Results

Loading...
Summary: Methods | Inherited Methods | [Expand All]
public static interface

# Connections.StartAdvertisingResult

implements Result

com.google.android.gms.nearby.connection.Connections.StartAdvertisingResult

## Class Overview

Result delivered when a local endpoint starts being advertised.

Possible status codes include:

- `STATUS_OK` if advertising started successfully.
- `STATUS_NETWORK_NOT_CONNECTED` if the device is not connected to a network.
- `STATUS_ALREADY_ADVERTISING` if the app is already advertising itself.
- `STATUS_ERROR` if an unknown error occurred while advertising the app.

## Summary

Public Methods
abstract String | getLocalEndpointName() Retrieves the human readable name for the local endpoint being advertised (possibly after resolving name collisions.)

[Expand] Inherited Methods
From interface com.google.android.gms.common.api.Result
abstract Status | getStatus()

## Public Methods

#### public abstract String getLocalEndpointName ()

Retrieves the human readable name for the local endpoint being advertised (possibly after resolving name collisions.)

##### Returns

- The name of the local endpoint.