java.lang.Object |
↳ |
com.google.android.gms.nearby.connection.Strategy |
Class Overview
The Strategy to be used when discovering or advertising to Nearby devices. The Strategy defines
- the connectivity requirements for the device, and
- the topology constraints of the connection.
Summary
[Expand]
Inherited Constants |
From interface
android.os.Parcelable
int |
CONTENTS_FILE_DESCRIPTOR |
|
int |
PARCELABLE_WRITE_RETURN_VALUE |
|
|
Fields |
public
static
final
Strategy |
P2P_CLUSTER |
Peer-to-peer strategy that supports an M-to-N, or cluster-shaped, connection topology. |
public
static
final
Strategy |
P2P_STAR |
Peer-to-peer strategy that supports a 1-to-N, or star-shaped, connection topology. |
[Expand]
Inherited Methods |
From class
java.lang.Object
Object
|
clone()
|
boolean
|
equals(Object arg0)
|
void
|
finalize()
|
final
Class<?>
|
getClass()
|
int
|
hashCode()
|
final
void
|
notify()
|
final
void
|
notifyAll()
|
String
|
toString()
|
final
void
|
wait(long arg0, int arg1)
|
final
void
|
wait(long arg0)
|
final
void
|
wait()
|
|
From interface
android.os.Parcelable
abstract
int
|
describeContents()
|
abstract
void
|
writeToParcel(Parcel arg0, int arg1)
|
|
Fields
public
static
final
Strategy
P2P_CLUSTER
Peer-to-peer strategy that supports an M-to-N, or cluster-shaped, connection topology. In other
words, this enables connecting amorphous clusters of devices within radio range (~100m), where
each device can both initiate outgoing connections to M other devices and accept incoming
connections from N other devices.
This is the default strategy, equivalent to calling the deprecated Connections
API
methods with no Strategy parameter.
public
static
final
Strategy
P2P_STAR
Peer-to-peer strategy that supports a 1-to-N, or star-shaped, connection topology. In other
words, this enables connecting devices within radio range (~100m) in a star shape, where each
device can, at any given time, play the role of either a hub (where it can accept incoming
connections from N other devices), or a spoke (where it can initiate an outgoing connection to
a single hub), but not both.
This strategy lends itself best to one device who advertises itself, and N devices who
discover that advertisement, though you may still advertise and discover simultaneously if
required.
Public Methods
public
boolean
equals
(Object object)
public
String
toString
()