public class NearbyManager extends Manager
| Modifier and Type | Class and Description |
|---|---|
class |
NearbyManager.NearbyMessage |
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
MESSAGE_TYPE_SWIRL
The type string assigned to default 'swirl' attachements.
|
| Constructor and Description |
|---|
NearbyManager(android.app.Activity activity) |
| Modifier and Type | Method and Description |
|---|---|
NearbyManager |
addEddystoneNamespace(java.lang.String namespace)
Add a given Eddystone 10-digit UID to the list of monitored namespaces
|
NearbyManager |
addNamespaceType(java.lang.String namespace,
java.lang.String type)
Add a given message namespace and type to the list of monitored messages
|
static NearbyManager |
getInstance()
Returns the last NearbyManager created.
|
void |
init(android.content.Context context,
EventBus events,
java.util.concurrent.ScheduledExecutorService executor)
Called when the manager is created to provide its execution environment.
|
void |
onConnected(android.os.Bundle opts) |
void |
onConnectionFailed(ConnectionResult result) |
void |
onConnectionSuspended(int code) |
void |
onIntent(android.content.Intent intent) |
void |
setActivity(android.app.Activity activity)
Nearby API's need to have an activity context in order to function, this can be called
to provide a valid context whenever it is available or changes
|
NearbyManager |
setFilter(MessageFilter.Builder messageFilterBuilder)
Override the internal default message filters and supply your own.
|
void |
start()
This is called by the system when started or when a manager is added to a
started system.
|
void |
stop()
This is called by the system when stopped.
|
public static final java.lang.String MESSAGE_TYPE_SWIRL
public static NearbyManager getInstance()
public void init(android.content.Context context,
EventBus events,
java.util.concurrent.ScheduledExecutorService executor)
Managercontext - The application context to useevents - The EventBus that the manager is a member ofexecutor - The Executor to use and on which events are dispatchedpublic NearbyManager addEddystoneNamespace(java.lang.String namespace)
namespace - 10-digit Eddystone namespacepublic NearbyManager addNamespaceType(java.lang.String namespace, java.lang.String type)
namespace - project or public attachment namespacetype - attachement typepublic NearbyManager setFilter(MessageFilter.Builder messageFilterBuilder)
messageFilterBuilder - The filter to supplypublic void setActivity(android.app.Activity activity)
activity - an android Context which is an Activitypublic void onIntent(android.content.Intent intent)
public void onConnected(android.os.Bundle opts)
public void onConnectionSuspended(int code)
public void onConnectionFailed(ConnectionResult result)
public void start()
public void stop()