Summary: Ctors | Methods | Inherited Methods | [Expand All]
public static final class

# MessageFilter.Builder

extends Object

java.lang.Object
↳ | com.google.android.gms.nearby.messages.MessageFilter.Builder

## Class Overview

Builder for `MessageFilter`.

## Summary

Public Constructors
| MessageFilter.Builder()

Public Methods
MessageFilter | build() Builds an instance of `MessageFilter`.
MessageFilter.Builder | includeAllMyTypes() Filters for all messages published by this application (and any other applications in the same Google Developers Console project), regardless of type.
MessageFilter.Builder | includeEddystoneUids(String hexNamespace, String hexInstance) Includes Eddystone UIDs.
MessageFilter.Builder | includeFilter(MessageFilter filter) Includes the previously constructed filter.
MessageFilter.Builder | includeIBeaconIds(UUID proximityUuid, Short major, Short minor) Includes iBeacon IDs.
MessageFilter.Builder | includeNamespacedType(String namespace, String type) Filters for all messages in the given `namespace` with the given `type`.

[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()

## Public Constructors

#### public MessageFilter.Builder ()

## Public Methods

#### public MessageFilter build ()

Builds an instance of `MessageFilter`.

#### public MessageFilter.Builder includeAllMyTypes ()

Filters for all messages published by this application (and any other applications in the same Google Developers Console project), regardless of type.

#### public MessageFilter.Builder includeEddystoneUids (String hexNamespace, String hexInstance)

Includes Eddystone UIDs.

Eddystone UID messages will have namespace=`MESSAGE_NAMESPACE_RESERVED`, and type=`MESSAGE_TYPE_EDDYSTONE_UID`. Use `from(Message)` to parse the message content.

##### Parameters

hexNamespace | The 10-byte Eddystone UID namespace in hex format. For example, "a032ffed0532bca3846d".
hexInstance | An optional 6-byte Eddystone UID instance in hex format. For example, "00aabbcc2233".

#### public MessageFilter.Builder includeFilter (MessageFilter filter)

Includes the previously constructed filter.

#### public MessageFilter.Builder includeIBeaconIds (UUID proximityUuid, Short major, Short minor)

Includes iBeacon IDs.

iBeacon ID messages will have namespace=`MESSAGE_NAMESPACE_RESERVED`, and type=`MESSAGE_TYPE_I_BEACON_ID`. Use `from(Message)` to parse the message content.

##### Parameters

proximityUuid | The proximity UUID.
major | An optional major value.
minor | An optional minor value.

#### public MessageFilter.Builder includeNamespacedType (String namespace, String type)

Filters for all messages in the given `namespace` with the given `type`.

Namespaces are currently only settable for messages published via beacons.

##### Parameters

namespace | The namespace that the message belongs to. It must be non-empty and cannot contain the following invalid character: star(*).
type | The type of the message to include. It must non-null and cannot contain the following invalid character: star(*).

##### Throws

IllegalArgumentException | if namespace or type is not valid.