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 | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Add an end location to this context, this is useful for e.g.
| |||||||||||
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 . | |||||||||||
Add an end location to this context, this is useful for e.g.
| |||||||||||
Adds an end location to this promotion context.
| |||||||||||
Add an end location to this context, this is useful for e.g.
| |||||||||||
Creates a context with a freeform combination of location name and latitude/longitude pair as start location for a transportation pickup.
| |||||||||||
Adds a start location to context.
| |||||||||||
Creates a context with a freeform combination of location name and latitude/longitude pair as start location for a transportation pickup.
| |||||||||||
Creates a context with
coordinate as start location for a transportation pickup. | |||||||||||
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() |
Add an end location to this context, this is useful for e.g. getting transportation to location
,
same as new PlacementContext().withEndLocation(...);
.
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
}
Add an end location to this context, this is useful for e.g. getting transportation to location
,
same as new PlacementContext().withEndLocation(...);
.
coordinate | LatLngPair object holding the latitude/longitude information. |
---|
Adds an end location to this promotion context.
Add an end location to this context, this is useful for e.g. getting transportation to location
,
same as new PlacementContext().withEndLocation(...);
.
coordinate | LatLngPair object holding the latitude/longitude information. |
---|
Creates a context with a freeform combination of location name and latitude/longitude pair as start location for a transportation pickup.
Adds a start location to context.
Creates a context with a freeform combination of location name and latitude/longitude pair as start location for a transportation pickup.
Creates a context with coordinate
as start location for a transportation pickup.