java.lang.Object | |
↳ | com.google.android.gms.nearby.messages.MessageFilter.Builder |
Builder for MessageFilter
.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Builds an instance of
MessageFilter . | |||||||||||
Filters for all messages published by this application (and any other applications in the
same Google Developers Console project), regardless of type.
| |||||||||||
Includes raw audio byte messages.
| |||||||||||
Includes Eddystone
UIDs.
| |||||||||||
Includes the previously constructed filter.
| |||||||||||
Includes iBeacon IDs.
| |||||||||||
Filters for all messages in the given
namespace with the given type . |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Filters for all messages published by this application (and any other applications in the same Google Developers Console project), regardless of type.
Returns | |
---|---|
MessageFilter.Builder |
Includes raw audio byte messages. This can only be called once to set the number of audio bytes to be received.
Audio byte messages will have namespace=MESSAGE_NAMESPACE_RESERVED
, and
type=MESSAGE_TYPE_AUDIO_BYTES
. Use from(Message)
to parse
the message content.
Parameters | |
---|---|
numAudioBytes |
int :
Number of bytes for the audio bytes message (capped by MAX_SIZE ). |
Returns | |
---|---|
MessageFilter.Builder |
Throws | |
---|---|
IllegalArgumentException |
if numAudioBytes is less than zero or greater than MAX_SIZE .
|
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 |
String :
The 10-byte Eddystone UID namespace in hex format. For example,
"a032ffed0532bca3846d". |
hexInstance |
String :
An optional 6-byte Eddystone UID instance in hex format. For example,
"00aabbcc2233".
|
Returns | |
---|---|
MessageFilter.Builder |
Includes the previously constructed filter.
Parameters | |
---|---|
filter |
MessageFilter
|
Returns | |
---|---|
MessageFilter.Builder |
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 |
UUID :
The proximity UUID. |
major |
Short :
An optional major value. |
minor |
Short :
An optional minor value.
|
Returns | |
---|---|
MessageFilter.Builder |
Filters for all messages in the given namespace
with the given type
.
Namespaces are currently only settable for messages published via beacons.
Parameters | |
---|---|
namespace |
String :
The namespace that the message belongs to. It must be non-empty and cannot
contain the following invalid character: star(*). |
type |
String :
The type of the message to include. It must non-null and cannot contain the
following invalid character: star(*). |
Returns | |
---|---|
MessageFilter.Builder |
Throws | |
---|---|
IllegalArgumentException |
if namespace or type is not valid. |