| java.lang.Object | |
| ↳ | com.usebutton.sdk.PlacementContext |
Convenience class on top of JSONObject. Mutable key-value pairs with promotion relevant information.
See ButtonDropin for a full example of a location aware context.
Context parameters provided to promotions.
|
[Expand]
Inherited Constants | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From interface
android.os.Parcelable
| |||||||||||
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Creates a new PlacementContext object with a location, this can be used for transportation
promotions to indicate the drop off location.
| |||||||||||
Creates a new PlacementContext object with a location, this can be used for transportation
promotions to indicate the pick up location.
| |||||||||||
Reserved for future proofing the SDK so new top level keys can be used by partners without
SDK changes.
| |||||||||||
Add a String
value to the context for key name, This will be added under
the vendor top-level key. | |||||||||||
Add an arbitrary org.json.JSONObject
value to the context for key name. | |||||||||||
Adds a named end location to this promotion context.
| |||||||||||
Adds a start location to context.
| |||||||||||
Adds a start location to context.
| |||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
From interface
android.os.Parcelable
| |||||||||||
Creates a new PlacementContext object with a location, this can be used for transportation
promotions to indicate the drop off location.
Equivalent to new PlacementContext().withEndLocation(...);.
| locationName | for example "Pizza Restaurant" |
|---|
Creates a new PlacementContext object with a location, this can be used for transportation
promotions to indicate the pick up location.
Equivalent to new PlacementContext().withStartLocation(...);.
| locationName | for example "Work" |
|---|
Reserved for future proofing the SDK so new top level keys can be used by partners without SDK changes. You are probably looking for #putVendorValue(String, Object).
Add a String value to the context for key name, This will be added under
the vendor top-level key. {"vendor": {:name: :value}
Add an arbitrary org.json.JSONObject value to the context for key name. This will be added under
the vendor top-level key. {"vendor": {:name: :value}
Adds a named end location to this promotion context.
Adds a start location to context.
| name | of start location, for example "Office" |
|---|
Adds a start location to context.