Region

Overview 

Region is a data class in the Salesforce Marketing Cloud Unified SDK that represents a geographic or proximity-based region for location-based messaging. It implements Parcelable for Android serialization and Comparable<Region> for sorting capabilities.

Package: com.salesforce.marketingcloud.messages

Inheritance:

  • Implements: Parcelable, Comparable<Region>

Properties 

center 

1@JvmField
2val center: LatLon

The geographic center point of the region.

description 

1@JvmField
2val description: String?

Optional description text for the region.

id 

1@JvmField
2val id: String

Unique identifier for the region.

major 

1@JvmField
2val major: Int

Major value for beacon-based regions.

messages 

1@JvmField
2val messages: List<Message>

Collection of messages associated with this region.

minor 

1@JvmField
2val minor: Int

Minor value for beacon-based regions.

name 

1@JvmField
2val name: String?

Optional display name for the region.

proximityUuid 

1@JvmField
2val proximityUuid: String?

UUID for proximity beacon identification.

radius 

1@JvmField
2val radius: Int

The radius distance (in meters) for geofence regions.

regionType 

1@JvmField
2val regionType: Int

Integer value indicating the type of region (geofence, beacon, etc.).

Methods 

toJson 

1fun toJson(): JSONObject

Serializes the Region object to a JSON representation.

Returns: JSONObject containing the region data.

Nested Types 

Companion 

1object Companion

Companion object for the Region class.