目录

MessagePicker

Class Info

public class MessagePicker implements Parcelable

定义消息过滤条件,在获取消息get过程中,只有符合此条件定义的目标消息会触发MessageHandler中的函数回调。

如果有多个过滤条件,不同条件间为逻辑或关系,符合任意一条条件的消息即会触发回调。

Nested Class Summary

Qualifier and Type

Class Name and Description

static final class

MessagePicker.Builder

MessagePicker的构造类。

Public Field Summary

Qualifier and Type

Field and Description

static final Parcelable.Creator<MessagePicker>

CREATOR

实现Parcelable接口必须提供的实例。

static final MessagePicker

INCLUDE_ALL_TYPES

此过滤条件为获取当前App所属开发者联盟项目下所有已发布的消息(包括App发布的消息和Beacon消息)。

Public Method Summary

Qualifier and Type

Method Name and Description

int

describeContents()

返回当前Parcelable对象描述。

boolean

equals(Object object)

判断其他对象是否与本实例相同。

List<IBeaconInfo>

getBeaconInfo()

获取过滤条件内的iBeacon列表。

List<UidInstance>

getEddystoneUid()

获取过滤条件内的EddyStone UID列表。

boolean

getIncludeAll()

是否获取所有类型的消息。

List<NamespaceType>

getMsgType()

获取过滤条件内的域名及类型列表。

int

hashCode()

获取哈希值。

String

toString()

把对象转化成可读的字符串。

void

writeToParcel(Parcel dest, int flags)

序列化打包。

Public Fields

[h2]CREATOR

Fields

public static final Parcelable.Creator<MessagePicker> CREATOR

实现Parcelable接口必须提供的实例。

[h2]INCLUDE_ALL_TYPES

Fields

public static final MessagePicker INCLUDE_ALL_TYPES

此过滤条件为获取当前App所属开发者联盟项目下所有已发布的消息(包括App发布的消息和Beacon消息)。

Constant Value:"INCLUDE_ALL_TYPES"

Public Methods

[h2]describeContents

Method

public int describeContents()

返回当前Parcelable对象描述。

Returns

Type

Description

int

当前Parcelable对象描述。返回值如下:

  • 0:普通Parcelable对象。
  • 1:包含文件描述符的Parcelable对象。

[h2]equals

Method

public boolean equals(Object object)

判断其他对象是否与本实例相同。

Parameters

Name

Description

object

其他对象。

Returns

Type

Description

boolean

  • true:相同。
  • false:不相同。

[h2]getBeaconInfo

Method

public List<IBeaconInfo> getBeaconInfo()

获取过滤条件内的iBeacon列表。

Returns

Type

Description

List<IBeaconInfo>

返回需过滤的IBeacon信标信息列表。

[h2]getEddystoneUid

Method

public List<UidInstance> getEddystoneUid()

获取过滤条件内的EddyStone UID列表。

Returns

Type

Description

List<UidInstance>

返回需过滤的EddyStone UID信标信息列表。

[h2]getIncludeAll

Method

public boolean getIncludeAll()

是否获取所有类型的消息。

Returns

Type

Description

boolean

  • true:是。
  • false:不是。

[h2]getMsgType

Method

public List<NamespaceType> getMsgType()

获取过滤条件内的域名及类型列表。

Returns

Type

Description

List<NamespaceType>

返回需过滤的域名及类型列表。

[h2]hashCode

Method

public int hashCode()

获取哈希值。

Returns

Type

Description

int

当前对象的哈希值。

[h2]toString

Method

public String toString()

把对象转化成可读的字符串。

Returns

Type

Description

String

MessagePicker对象的可读字符串。

[h2]writeToParcel

Method

public void writeToParcel(Parcel dest, int flags)

序列化打包,把值写入dest容器。

Parameters

Name

Description

dest

对象被写入的Parcel。

flags

写入方式,取值如下:

  • 0。
  • PARCELABLE_WRITE_RETURN_VALUE(详情查看Parcelable接口类)。