java.lang.Object | |
↳ | com.google.android.gms.nearby.messages.audio.AudioBytes |
A message that will be sent directly over near-ultrasound audio. The payload can be an arbitrary
byte[] array limited in size as given by MAX_SIZE
.
Use this in combination with the Messages
API
to send or receive data over audio. For instance, the toMessage()
method can be used to
fetch a Nearby Message
object for a publish(GoogleApiClient, Message)
call.
Similarly, the from(Message)
method can be used to convert a Message obtained from a
subscribe call to an AudioBytes object.
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
int | MAX_SIZE | The maximum size of the audio message payload. |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Creates an AudioBytes object from a byte[] payload for use with the Nearby Messages API.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Converts a Message of type
MESSAGE_TYPE_AUDIO_BYTES to an AudioBytes object. | |||||||||||
Returns the byte array payload.
| |||||||||||
Obtain a
Message object for use with the publish(GoogleApiClient, Message) call. | |||||||||||
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
The maximum size of the audio message payload. Only MAX_SIZE
bytes will be sent over
the audio medium.
Creates an AudioBytes object from a byte[] payload for use with the Nearby Messages API.
Parameters | |
---|---|
audioData |
byte
|
Converts a Message of type MESSAGE_TYPE_AUDIO_BYTES
to an AudioBytes object.
Parameters | |
---|---|
message |
Message :
Input Message object. |
Returns | |
---|---|
AudioBytes |
Instance of a corresponding AudioBytes object.
|
See also:
Returns the byte array payload.
Returns | |
---|---|
byte[] |
Obtain a Message
object for use with the publish(GoogleApiClient, Message)
call.
Returns | |
---|---|
Message |
Message object.
|
Returns | |
---|---|
String |