-
public class RadarThe main class used to interact with the Radar SDK.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interfaceRadar.RadarLocationCallbackCalled when a location request succeeds, fails, or times out.
public interfaceRadar.RadarBeaconCallbackCalled when a beacon ranging request succeeds, fails, or times out.
public interfaceRadar.RadarTrackCallbackCalled when a track request succeeds, fails, or times out.
public interfaceRadar.RadarTrackVerifiedCallbackCalled when a track verified request succeeds, fails, or times out.
public interfaceRadar.RadarTripCallbackCalled when a trip update succeeds, fails, or times out.
public interfaceRadar.RadarContextCallbackCalled when a context request succeeds, fails, or times out.
public interfaceRadar.RadarSearchPlacesCallbackCalled when a place search request succeeds, fails, or times out.
public interfaceRadar.RadarSearchGeofencesCallbackCalled when a geofence search request succeeds, fails, or times out.
public interfaceRadar.RadarGeocodeCallbackCalled when a geocoding request succeeds, fails, or times out.
public interfaceRadar.RadarValidateAddressCallbackCalled when a validateAddress request succeeds, fails, or times out. Receives the request status and, if successful, the address populated with a verification status.
public interfaceRadar.RadarIpGeocodeCallbackCalled when an IP geocoding request succeeds, fails, or times out.
public interfaceRadar.RadarRouteCallbackCalled when a distance request succeeds, fails, or times out.
public interfaceRadar.RadarMatrixCallbackCalled when a matrix request succeeds, fails, or times out.
public interfaceRadar.RadarLogConversionCallbackCalled when a request to log a conversion succeeds, fails, or times out.
public enumRadar.RadarStatuspublic enumRadar.RadarLocationSourceThe sources for location updates.
public enumRadar.RadarLogLevelThe levels for debug logs.
public enumRadar.RadarLogTypeThe classification type for debug logs.
public enumRadar.RadarRouteModepublic enumRadar.RadarRouteUnitspublic enumRadar.RadarAddressVerificationStatusThe verification status of an address.
public enumRadar.RadarActivityTypepublic enumRadar.RadarLocationServicesProviderThe location services providers.
-
Method Summary
Modifier and Type Method Description final static Unitinitialize(Context context, String publishableKey)Initializes the Radar SDK. final static Unitinitialize(Context context, String publishableKey, RadarReceiver receiver, Radar.RadarLocationServicesProvider provider, Boolean fraud, Notification customForegroundNotification, RadarInAppMessageReceiver inAppMessageReceiver, Activity currentActivity)Initializes the Radar SDK. final static UnitsetUserId(String userId)Identifies the user. final static StringgetUserId()Returns the current userId.final static UnitsetDescription(String description)Sets an optional description for the user, displayed in the dashboard. final static StringgetDescription()Returns the current description.final static UnitsetMetadata(JSONObject metadata)Sets an optional set of custom key-value pairs for the user. final static JSONObjectgetMetadata()Returns the current metadata.final static UnitsetProduct(String product)Sets an optional product name, displayed in the dashboard and reports. final static StringgetProduct()Returns the current product.final static Array<String>getTags()Returns the current tags.final static UnitaddTags(Array<String> tags)Adds tags to the existing set. final static UnitsetTags(Array<String> tags)Sets tags, replacing all existing tags. final static UnitremoveTags(Array<String> tags)Removes tags from the existing set. final static UnitsetAnonymousTrackingEnabled(Boolean enabled)Enables anonymous tracking for privacy reasons. final static UnitgetLocation(Radar.RadarLocationCallback callback)Gets the device's current location. final UnitgetLocation(Function3<Radar.RadarStatus, Location, Boolean, Unit> block)Gets the device's current location. final static UnitgetLocation(RadarTrackingOptions.RadarTrackingOptionsDesiredAccuracy desiredAccuracy, Radar.RadarLocationCallback callback)Gets the device's current location with the desired accuracy. final UnitgetLocation(RadarTrackingOptions.RadarTrackingOptionsDesiredAccuracy desiredAccuracy, Function3<Radar.RadarStatus, Location, Boolean, Unit> block)Gets the device's current location with the desired accuracy. final static UnittrackOnce(Radar.RadarTrackCallback callback)Tracks the user's location once in the foreground. final UnittrackOnce(Function4<Radar.RadarStatus, Location, Array<RadarEvent>, RadarUser, Unit> block)Tracks the user's location once in the foreground. final static UnittrackOnce(RadarTrackingOptions.RadarTrackingOptionsDesiredAccuracy desiredAccuracy, Boolean beacons, Radar.RadarTrackCallback callback)Tracks the user's location once with the desired accuracy and optionally ranges beacons in the foreground. final static UnittrackOnce(RadarTrackingOptions.RadarTrackingOptionsDesiredAccuracy desiredAccuracy, Boolean beacons, Function4<Radar.RadarStatus, Location, Array<RadarEvent>, RadarUser, Unit> block)Tracks the user's location once with the desired accuracy and optionally ranges beacons in the foreground. final static UnittrackOnce(Location location, Radar.RadarTrackCallback callback)Manually updates the user's location. final static UnittrackOnce(Location location, Function4<Radar.RadarStatus, Location, Array<RadarEvent>, RadarUser, Unit> block)Manually updates the user's location. final static UnittrackVerified(Radar.RadarTrackVerifiedCallback callback)Tracks the user's location with device integrity information for location verification use cases. final static UnittrackVerified(Function2<Radar.RadarStatus, RadarVerifiedLocationToken, Unit> block)Tracks the user's location with device integrity information for location verification use cases. final static UnittrackVerified(Boolean beacons, RadarTrackingOptions.RadarTrackingOptionsDesiredAccuracy desiredAccuracy, Radar.RadarTrackVerifiedCallback callback)Tracks the user's location with device integrity information for location verification use cases. final static UnittrackVerified(Boolean beacons, RadarTrackingOptions.RadarTrackingOptionsDesiredAccuracy desiredAccuracy, Function2<Radar.RadarStatus, RadarVerifiedLocationToken, Unit> block)Tracks the user's location with device integrity information for location verification use cases. final static UnittrackVerified(Boolean beacons, RadarTrackingOptions.RadarTrackingOptionsDesiredAccuracy desiredAccuracy, String reason, String transactionId, Radar.RadarTrackVerifiedCallback callback)Tracks the user's location with device integrity information for location verification use cases. final static UnittrackVerified(Boolean beacons, RadarTrackingOptions.RadarTrackingOptionsDesiredAccuracy desiredAccuracy, String reason, String transactionId, Function2<Radar.RadarStatus, RadarVerifiedLocationToken, Unit> block)Tracks the user's location with device integrity information for location verification use cases. final static UnitstartTrackingVerified(Integer interval, Boolean beacons)Starts tracking the user's location with device integrity information for location verification use cases. final static UnitstopTrackingVerified()Stops tracking the user's location with device integrity information for location verification use cases. final static BooleanisTrackingVerified()Returns a boolean indicating whether verified tracking has been started. final static UnitgetVerifiedLocationToken(Radar.RadarTrackVerifiedCallback callback)Returns the user's last verified location token if still valid, or requests a fresh token if not. final static UnitgetVerifiedLocationToken(Function2<Radar.RadarStatus, RadarVerifiedLocationToken, Unit> block)Returns the user's last verified location token if still valid, or requests a fresh token if not. final static UnitgetVerifiedLocationToken(Boolean beacons, RadarTrackingOptions.RadarTrackingOptionsDesiredAccuracy desiredAccuracy, Radar.RadarTrackVerifiedCallback callback)Returns the user's last verified location token if still valid, or requests a fresh token if not. final static UnitgetVerifiedLocationToken(Boolean beacons, RadarTrackingOptions.RadarTrackingOptionsDesiredAccuracy desiredAccuracy, Function2<Radar.RadarStatus, RadarVerifiedLocationToken, Unit> block)Returns the user's last verified location token if still valid, or requests a fresh token if not. final static UnitclearVerifiedLocationToken()Clears the user's last verified location token. final static UnitsetExpectedJurisdiction(String countryCode, String stateCode)Optionally sets the user's expected country and state for jurisdiction checks. final static UnitstartTracking(RadarTrackingOptions options)Starts tracking the user's location in the background. final static UnitmockTracking(Location origin, Location destination, Radar.RadarRouteMode mode, Integer steps, Integer interval, Radar.RadarTrackCallback callback)Mocks tracking the user's location from an origin to a destination. final static UnitmockTracking(Location origin, Location destination, Radar.RadarRouteMode mode, Integer steps, Integer interval, Function4<Radar.RadarStatus, Location, Array<RadarEvent>, RadarUser, Unit> block)Mocks tracking the user's location from an origin to a destination. final static UnitstopTracking()Stops tracking the user's location in the background. final static BooleanisTracking()Returns a boolean indicating whether tracking has been started. final static BooleanisUsingRemoteTrackingOptions()Returns a boolean indicating whether the local tracking options are over-ridden by remote tracking options. final static StringgetHost()Returns a string of the radar host. final static StringgetPublishableKey()Returns a string of the publishable key. final static RadarTrackingOptionsgetTrackingOptions()Returns the current tracking options. final static UnitsetForegroundServiceOptions(RadarTrackingOptions.RadarTrackingOptionsForegroundService options)Settings for the foreground notification when the foregroundServiceEnabled parameter is true on Radar tracking options. final static UnitsetNotificationOptions(RadarNotificationOptions options)Settings for the all notifications. final static UnitsetCustomForegroundNotification(Notification notification)Sets a custom notification for the foreground service. final static UnitsetReceiver(RadarReceiver receiver)Sets a receiver for client-side delivery of events, location updates, and debug logs. final static UnitsetVerifiedReceiver(RadarVerifiedReceiver verifiedReceiver)Sets a receiver for client-side delivery of verified location tokens. final static UnitsetInAppMessageReceiver(RadarInAppMessageReceiver inAppMessageReceiver)Sets a delegate for handling in-app message lifecycle events. final static UnitacceptEvent(String eventId, String verifiedPlaceId)Accepts an event. final static UnitrejectEvent(String eventId)Rejects an event. final static RadarTripOptionsgetTripOptions()Returns the current trip options. final static UnitstartTrip(RadarTripOptions options, Radar.RadarTripCallback callback)Starts a trip. final static UnitstartTrip(RadarTripOptions options, RadarTrackingOptions trackingOptions, Radar.RadarTripCallback callback)Starts a trip. final static UnitstartTrip(RadarTripOptions options, Function3<Radar.RadarStatus, RadarTrip, Array<RadarEvent>, Unit> block)Starts a trip. final static UnitstartTrip(RadarTripOptions options, RadarTrackingOptions trackingOptions, Function3<Radar.RadarStatus, RadarTrip, Array<RadarEvent>, Unit> block)Starts a trip. final static UnitupdateTrip(RadarTripOptions options, RadarTrip.RadarTripStatus status, Radar.RadarTripCallback callback)Manually updates a trip. final static UnitupdateTrip(RadarTripOptions options, RadarTrip.RadarTripStatus status, Function3<Radar.RadarStatus, RadarTrip, Array<RadarEvent>, Unit> block)Manually updates a trip. final static UnitcompleteTrip(Radar.RadarTripCallback callback)Completes a trip. final static UnitcompleteTrip(Function3<Radar.RadarStatus, RadarTrip, Array<RadarEvent>, Unit> block)Completes a trip. final static UnitcancelTrip(Radar.RadarTripCallback callback)Cancels a trip. final static UnitcancelTrip(Function3<Radar.RadarStatus, RadarTrip, Array<RadarEvent>, Unit> block)Cancels a trip. final static UnitsearchPlaces(Integer radius, Array<String> chains, Array<String> categories, Array<String> groups, Array<String> countryCodes, Integer limit, Radar.RadarSearchPlacesCallback callback)Gets the device's current location, then searches for places near that location, sorted by distance. final static UnitsearchPlaces(Integer radius, Array<String> chains, Map<String, String> chainMetadata, Array<String> categories, Array<String> groups, Array<String> countryCodes, Integer limit, Radar.RadarSearchPlacesCallback callback)Gets the device's current location, then searches for places (with or without chain-specific metadata) near that location, sorted by distance. final UnitsearchPlaces(Integer radius, Array<String> chains, Array<String> categories, Array<String> groups, Array<String> countryCodes, Integer limit, Function3<Radar.RadarStatus, Location, Array<RadarPlace>, Unit> block)Gets the device's current location, then searches for places near that location, sorted by distance. final UnitsearchPlaces(Integer radius, Array<String> chains, Map<String, String> chainMetadata, Array<String> categories, Array<String> groups, Array<String> countryCodes, Integer limit, Function3<Radar.RadarStatus, Location, Array<RadarPlace>, Unit> block)Gets the device's current location, then searches for places (with or without chain-specific metadata) near that location, sorted by distance. final static UnitsearchPlaces(Location near, Integer radius, Array<String> chains, Array<String> categories, Array<String> groups, Array<String> countryCodes, Integer limit, Radar.RadarSearchPlacesCallback callback)Search for places near a location, sorted by distance. final static UnitsearchPlaces(Location near, Integer radius, Array<String> chains, Map<String, String> chainMetadata, Array<String> categories, Array<String> groups, Array<String> countryCodes, Integer limit, Radar.RadarSearchPlacesCallback callback)Search for places (with or without chain-specific metadata) near a location, sorted by distance. final UnitsearchPlaces(Location near, Integer radius, Array<String> chains, Array<String> categories, Array<String> groups, Array<String> countryCodes, Integer limit, Function3<Radar.RadarStatus, Location, Array<RadarPlace>, Unit> block)Search for places near a location, sorted by distance. final UnitsearchPlaces(Location near, Integer radius, Array<String> chains, Map<String, String> chainMetadata, Array<String> categories, Array<String> groups, Array<String> countryCodes, Integer limit, Function3<Radar.RadarStatus, Location, Array<RadarPlace>, Unit> block)Search for places (with or without chain-specific metadata) near a location, sorted by distance. final static UnitsearchGeofences(Integer radius, Array<String> tags, JSONObject metadata, Integer limit, Boolean includeGeometry, Radar.RadarSearchGeofencesCallback callback)Gets the device's current location, then searches for geofences near that location, sorted by distance. final UnitsearchGeofences(Integer radius, Array<String> tags, JSONObject metadata, Integer limit, Boolean includeGeometry, Function3<Radar.RadarStatus, Location, Array<RadarGeofence>, Unit> block)Gets the device's current location, then searches for geofences near that location, sorted by distance. final static UnitsearchGeofences(Location near, Integer radius, Array<String> tags, JSONObject metadata, Integer limit, Boolean includeGeometry, Radar.RadarSearchGeofencesCallback callback)Search for geofences near a location, sorted by distance. final UnitsearchGeofences(Location near, Integer radius, Array<String> tags, JSONObject metadata, Integer limit, Boolean includeGeometry, Function3<Radar.RadarStatus, Location, Array<RadarGeofence>, Unit> block)Search for geofences near a location, sorted by distance. final static Unitautocomplete(String query, Location near, Integer limit, Radar.RadarGeocodeCallback callback)Autocompletes partial addresses and place names, sorted by relevance. final Unitautocomplete(String query, Location near, Integer limit, Function2<Radar.RadarStatus, Array<RadarAddress>, Unit> block)Autocompletes partial addresses and place names, sorted by relevance. final static Unitautocomplete(String query, Location near, Array<String> layers, Integer limit, String country, Radar.RadarGeocodeCallback callback)Autocompletes partial addresses and place names, sorted by relevance. final Unitautocomplete(String query, Location near, Array<String> layers, Integer limit, String country, Function2<Radar.RadarStatus, Array<RadarAddress>, Unit> block)Autocompletes partial addresses and place names, sorted by relevance. final static Unitautocomplete(String query, Location near, Array<String> layers, Integer limit, String country, Boolean expandUnits, Boolean mailable, Radar.RadarGeocodeCallback callback)Autocompletes partial addresses and place names, sorted by relevance. final Unitautocomplete(String query, Location near, Array<String> layers, Integer limit, String country, Boolean expandUnits, Boolean mailable, Function2<Radar.RadarStatus, Array<RadarAddress>, Unit> block)Autocompletes partial addresses and place names, sorted by relevance. final static UnitvalidateAddress(RadarAddress address, Radar.RadarValidateAddressCallback callback)Validates an address, attaching to a verification status, property type, and plus4. final UnitvalidateAddress(RadarAddress address, Function3<Radar.RadarStatus, RadarAddress, Radar.RadarAddressVerificationStatus, Unit> block)Validates an address, attaching to a verification status, property type, and plus4. final static Unitgeocode(String query, Array<String> layers, Array<String> countries, Radar.RadarGeocodeCallback callback)Geocodes an address, converting address to coordinates. final Unitgeocode(String query, Array<String> layers, Array<String> countries, Function2<Radar.RadarStatus, Array<RadarAddress>, Unit> block)Geocodes an address, converting address to coordinates. final static UnitreverseGeocode(Array<String> layers, Radar.RadarGeocodeCallback callback)Gets the device's current location, then reverse geocodes that location, converting coordinates to address. final UnitreverseGeocode(Array<String> layers, Function2<Radar.RadarStatus, Array<RadarAddress>, Unit> block)Gets the device's current location, then reverse geocodes that location, converting coordinates to address. final static UnitreverseGeocode(Location location, Array<String> layers, Radar.RadarGeocodeCallback callback)Reverse geocodes a location, converting coordinates to address. final UnitreverseGeocode(Location location, Array<String> layers, Function2<Radar.RadarStatus, Array<RadarAddress>, Unit> block)Reverse geocodes a location, converting coordinates to address. final static UnitipGeocode(Radar.RadarIpGeocodeCallback callback)Geocodes the device's current IP address, converting IP address to partial address. final UnitipGeocode(Function3<Radar.RadarStatus, RadarAddress, Boolean, Unit> block)Geocodes the device's current IP address, converting IP address to partial address. final static UnitgetDistance(Location destination, EnumSet<Radar.RadarRouteMode> modes, Radar.RadarRouteUnits units, Radar.RadarRouteCallback callback)Gets the device's current location, then calculates the travel distance and duration to a destination. final UnitgetDistance(Location destination, EnumSet<Radar.RadarRouteMode> modes, Radar.RadarRouteUnits units, Function2<Radar.RadarStatus, RadarRoutes, Unit> block)Gets the device's current location, then calculates the travel distance and duration to a destination. final static UnitgetDistance(Location origin, Location destination, EnumSet<Radar.RadarRouteMode> modes, Radar.RadarRouteUnits units, Radar.RadarRouteCallback callback)Calculates the travel distance and duration from an origin to a destination. final UnitgetDistance(Location origin, Location destination, EnumSet<Radar.RadarRouteMode> modes, Radar.RadarRouteUnits units, Function2<Radar.RadarStatus, RadarRoutes, Unit> block)Calculates the travel distance and duration from an origin to a destination. final static UnitgetMatrix(Array<Location> origins, Array<Location> destinations, Radar.RadarRouteMode mode, Radar.RadarRouteUnits units, Radar.RadarMatrixCallback callback)Calculates the travel distances and durations between multiple origins and destinations for up to 25 routes. final UnitgetMatrix(Array<Location> origins, Array<Location> destinations, Radar.RadarRouteMode mode, Radar.RadarRouteUnits units, Function2<Radar.RadarStatus, RadarRouteMatrix, Unit> block)Calculates the travel distances and durations between multiple origins and destinations for up to 25 routes. final static UnitgetContext(Radar.RadarContextCallback callback)Gets the device's current location, then gets context for that location without sending device or user identifiers to the server. final UnitgetContext(Function3<Radar.RadarStatus, Location, RadarContext, Unit> block)Gets the device's current location, then gets context for that location without sending device or user identifiers to the server. final static UnitgetContext(Location location, Radar.RadarContextCallback callback)Gets context for a location without sending device or user identifiers to the server. final UnitgetContext(Location location, Function3<Radar.RadarStatus, Location, RadarContext, Unit> block)Gets context for a location without sending device or user identifiers to the server. final static UnitlogConversion(String name, JSONObject metadata, Radar.RadarLogConversionCallback callback)Logs a conversion. final static UnitlogConversion(String name, JSONObject metadata, Function2<Radar.RadarStatus, RadarEvent, Unit> block)Logs a conversion. final static UnitlogConversion(String name, Double revenue, JSONObject metadata, Radar.RadarLogConversionCallback callback)Logs a conversion with revenue. final static UnitlogConversion(String name, Double revenue, JSONObject metadata, Function2<Radar.RadarStatus, RadarEvent, Unit> block)Logs a conversion with revenue. final static UnitlogOpenedAppConversion(Intent intent)final static UnitsetLogLevel(Radar.RadarLogLevel level)Sets the log level for debug logs. final static UnitlogResigningActive()Log application resigning active. final static UnitlogBackgrounding()Log application entering background and flush logs in memory buffer into persistent buffer. final static StringstringForSource(Radar.RadarLocationSource source)Returns a display string for a location source value. final static StringstringForMode(Radar.RadarRouteMode mode)Returns a display string for a travel mode value. final static StringstringForVerificationStatus(Radar.RadarAddressVerificationStatus verificationStatus)Returns a display string for a verification status value. final static StringstringForTripStatus(RadarTrip.RadarTripStatus status)Returns a display string for a trip status value. final static JSONObjectjsonForLocation(Location location)Returns a JSON object for a location. final static StringsdkVersion()Gets the version number of the Radar SDK, such as "3.5.1" or "3.5.1-beta.2". final static UnitloadImage(String url, Function1<Bitmap, Unit> callback)Loads an image from a URL using the existing API pattern. final static UnitshowInAppMessage(RadarInAppMessage payload)-
-
Method Detail
-
initialize
final static Unit initialize(Context context, String publishableKey)
Initializes the Radar SDK. Call this method from the main thread in
Application.onCreate()before calling any other Radar methods.- Parameters:
context- The context.publishableKey- Your publishable API key.
-
initialize
final static Unit initialize(Context context, String publishableKey, RadarReceiver receiver, Radar.RadarLocationServicesProvider provider, Boolean fraud, Notification customForegroundNotification, RadarInAppMessageReceiver inAppMessageReceiver, Activity currentActivity)
Initializes the Radar SDK. Call this method from the main thread in
Application.onCreate()before calling any other Radar methods.- Parameters:
context- The context.publishableKey- Your publishable API key.receiver- An optional receiver for the client-side delivery of events.provider- The location services provider.fraud- A boolean indicating whether to enable additional fraud detection signals for location verification.
-
setUserId
final static Unit setUserId(String userId)
Identifies the user. Until you identify the user, Radar will automatically identify the user by
deviceId(Android ID).- Parameters:
userId- A stable unique ID for the user.
-
setDescription
final static Unit setDescription(String description)
Sets an optional description for the user, displayed in the dashboard.
- Parameters:
description- A description for the user.
-
getDescription
final static String getDescription()
Returns the current
description.
-
setMetadata
final static Unit setMetadata(JSONObject metadata)
Sets an optional set of custom key-value pairs for the user.
- Parameters:
metadata- A set of custom key-value pairs for the user.
-
getMetadata
final static JSONObject getMetadata()
Returns the current
metadata.
-
setProduct
final static Unit setProduct(String product)
Sets an optional product name, displayed in the dashboard and reports.
- Parameters:
product- A product name.
-
getProduct
final static String getProduct()
Returns the current
product.
-
addTags
final static Unit addTags(Array<String> tags)
Adds tags to the existing set.
- Parameters:
tags- An array of tags to add.
-
setTags
final static Unit setTags(Array<String> tags)
Sets tags, replacing all existing tags.
- Parameters:
tags- An array of tags to set.
-
removeTags
final static Unit removeTags(Array<String> tags)
Removes tags from the existing set.
- Parameters:
tags- An array of tags to remove.
-
setAnonymousTrackingEnabled
final static Unit setAnonymousTrackingEnabled(Boolean enabled)
Enables anonymous tracking for privacy reasons. Avoids creating user records on the server and avoids sending any stable device IDs, user IDs, and user metadata to the server when calling
trackOnce()orstartTracking(). Disabled by default.- Parameters:
enabled- A boolean indicating whether anonymous tracking should be enabled.
-
getLocation
final static Unit getLocation(Radar.RadarLocationCallback callback)
Gets the device's current location.
- Parameters:
callback- An optional callback.
-
getLocation
final Unit getLocation(Function3<Radar.RadarStatus, Location, Boolean, Unit> block)
Gets the device's current location.
- Parameters:
block- A block callback.
-
getLocation
final static Unit getLocation(RadarTrackingOptions.RadarTrackingOptionsDesiredAccuracy desiredAccuracy, Radar.RadarLocationCallback callback)
Gets the device's current location with the desired accuracy.
- Parameters:
desiredAccuracy- The desired accuracy.callback- An optional callback.
-
getLocation
final Unit getLocation(RadarTrackingOptions.RadarTrackingOptionsDesiredAccuracy desiredAccuracy, Function3<Radar.RadarStatus, Location, Boolean, Unit> block)
Gets the device's current location with the desired accuracy.
- Parameters:
desiredAccuracy- The desired accuracy.block- A block callback.
-
trackOnce
final static Unit trackOnce(Radar.RadarTrackCallback callback)
Tracks the user's location once in the foreground.
- Parameters:
callback- An optional callback.
-
trackOnce
final Unit trackOnce(Function4<Radar.RadarStatus, Location, Array<RadarEvent>, RadarUser, Unit> block)
Tracks the user's location once in the foreground.
- Parameters:
block- A block callback.
-
trackOnce
final static Unit trackOnce(RadarTrackingOptions.RadarTrackingOptionsDesiredAccuracy desiredAccuracy, Boolean beacons, Radar.RadarTrackCallback callback)
Tracks the user's location once with the desired accuracy and optionally ranges beacons in the foreground.
- Parameters:
desiredAccuracy- The desired accuracy.beacons- A boolean indicating whether to range beacons.callback- An optional callback.
-
trackOnce
final static Unit trackOnce(RadarTrackingOptions.RadarTrackingOptionsDesiredAccuracy desiredAccuracy, Boolean beacons, Function4<Radar.RadarStatus, Location, Array<RadarEvent>, RadarUser, Unit> block)
Tracks the user's location once with the desired accuracy and optionally ranges beacons in the foreground.
- Parameters:
desiredAccuracy- The desired accuracy.beacons- A boolean indicating whether to range beacons.block- A block callback.
-
trackOnce
final static Unit trackOnce(Location location, Radar.RadarTrackCallback callback)
Manually updates the user's location. Note that these calls are subject to rate limits.
- Parameters:
location- A location for the user.callback- An optional callback.
-
trackOnce
final static Unit trackOnce(Location location, Function4<Radar.RadarStatus, Location, Array<RadarEvent>, RadarUser, Unit> block)
Manually updates the user's location. Note that these calls are subject to rate limits.
- Parameters:
location- A location for the user.block- A block callback.
-
trackVerified
@RequiresApi(value = 21) final static Unit trackVerified(Radar.RadarTrackVerifiedCallback callback)
Tracks the user's location with device integrity information for location verification use cases.
Note that you must configure SSL pinning before calling this method.
- Parameters:
callback- An optional callback.
-
trackVerified
@RequiresApi(value = 21) final static Unit trackVerified(Function2<Radar.RadarStatus, RadarVerifiedLocationToken, Unit> block)
Tracks the user's location with device integrity information for location verification use cases.
Note that you must configure SSL pinning before calling this method.
- Parameters:
block- A block callback.
-
trackVerified
@RequiresApi(value = 21) final static Unit trackVerified(Boolean beacons, RadarTrackingOptions.RadarTrackingOptionsDesiredAccuracy desiredAccuracy, Radar.RadarTrackVerifiedCallback callback)
Tracks the user's location with device integrity information for location verification use cases.
Note that you must configure SSL pinning before calling this method.
- Parameters:
beacons- A boolean indicating whether to range beacons.desiredAccuracy- The desired accuracy.callback- An optional callback.
-
trackVerified
@RequiresApi(value = 21) final static Unit trackVerified(Boolean beacons, RadarTrackingOptions.RadarTrackingOptionsDesiredAccuracy desiredAccuracy, Function2<Radar.RadarStatus, RadarVerifiedLocationToken, Unit> block)
Tracks the user's location with device integrity information for location verification use cases.
Note that you must configure SSL pinning before calling this method.
- Parameters:
beacons- A boolean indicating whether to range beacons.desiredAccuracy- The desired accuracy.block- A block callback.
-
trackVerified
@RequiresApi(value = 21) final static Unit trackVerified(Boolean beacons, RadarTrackingOptions.RadarTrackingOptionsDesiredAccuracy desiredAccuracy, String reason, String transactionId, Radar.RadarTrackVerifiedCallback callback)
Tracks the user's location with device integrity information for location verification use cases.
Note that you must configure SSL pinning before calling this method.
- Parameters:
beacons- A boolean indicating whether to range beacons.desiredAccuracy- The desired accuracy.reason- An optional reason, displayed in the dashboard and reports.transactionId- An optional transaction ID, displayed in the dashboard and reports.callback- An optional callback.
-
trackVerified
@RequiresApi(value = 21) final static Unit trackVerified(Boolean beacons, RadarTrackingOptions.RadarTrackingOptionsDesiredAccuracy desiredAccuracy, String reason, String transactionId, Function2<Radar.RadarStatus, RadarVerifiedLocationToken, Unit> block)
Tracks the user's location with device integrity information for location verification use cases.
Note that you must configure SSL pinning before calling this method.
- Parameters:
beacons- A boolean indicating whether to range beacons.desiredAccuracy- The desired accuracy.reason- An optional reason, displayed in the dashboard and reports.transactionId- An optional transaction ID, displayed in the dashboard and reports.block- A block callback.
-
startTrackingVerified
@RequiresApi(value = 21) final static Unit startTrackingVerified(Integer interval, Boolean beacons)
Starts tracking the user's location with device integrity information for location verification use cases.
Note that you must configure SSL pinning before calling this method.
- Parameters:
interval- The interval in seconds between each location update.beacons- A boolean indicating whether to range beacons.
-
stopTrackingVerified
@RequiresApi(value = 21) final static Unit stopTrackingVerified()
Stops tracking the user's location with device integrity information for location verification use cases.
-
isTrackingVerified
@RequiresApi(value = 21) final static Boolean isTrackingVerified()
Returns a boolean indicating whether verified tracking has been started.
-
getVerifiedLocationToken
@RequiresApi(value = 21) final static Unit getVerifiedLocationToken(Radar.RadarTrackVerifiedCallback callback)
Returns the user's last verified location token if still valid, or requests a fresh token if not.
Note that you must configure SSL pinning before calling this method.
- Parameters:
callback- An optional callback.
-
getVerifiedLocationToken
@RequiresApi(value = 21) final static Unit getVerifiedLocationToken(Function2<Radar.RadarStatus, RadarVerifiedLocationToken, Unit> block)
Returns the user's last verified location token if still valid, or requests a fresh token if not.
Note that you must configure SSL pinning before calling this method.
- Parameters:
block- A block callback.
-
getVerifiedLocationToken
@RequiresApi(value = 21) final static Unit getVerifiedLocationToken(Boolean beacons, RadarTrackingOptions.RadarTrackingOptionsDesiredAccuracy desiredAccuracy, Radar.RadarTrackVerifiedCallback callback)
Returns the user's last verified location token if still valid, or requests a fresh token if not.
Note that you must configure SSL pinning before calling this method.
- Parameters:
beacons- A boolean indicating whether to range beacons.desiredAccuracy- The desired accuracy.callback- An optional callback.
-
getVerifiedLocationToken
@RequiresApi(value = 21) final static Unit getVerifiedLocationToken(Boolean beacons, RadarTrackingOptions.RadarTrackingOptionsDesiredAccuracy desiredAccuracy, Function2<Radar.RadarStatus, RadarVerifiedLocationToken, Unit> block)
Returns the user's last verified location token if still valid, or requests a fresh token if not.
Note that you must configure SSL pinning before calling this method.
- Parameters:
beacons- A boolean indicating whether to range beacons.desiredAccuracy- The desired accuracy.block- A block callback.
-
clearVerifiedLocationToken
@RequiresApi(value = 21) final static Unit clearVerifiedLocationToken()
Clears the user's last verified location token.
-
setExpectedJurisdiction
@RequiresApi(value = 21) final static Unit setExpectedJurisdiction(String countryCode, String stateCode)
Optionally sets the user's expected country and state for jurisdiction checks.
- Parameters:
countryCode- The user's expected country code.stateCode- The user's expected state code.
-
startTracking
final static Unit startTracking(RadarTrackingOptions options)
Starts tracking the user's location in the background.
- Parameters:
options- Configurable tracking options.
-
mockTracking
final static Unit mockTracking(Location origin, Location destination, Radar.RadarRouteMode mode, Integer steps, Integer interval, Radar.RadarTrackCallback callback)
Mocks tracking the user's location from an origin to a destination.
- Parameters:
origin- The origin.destination- The destination.mode- The travel mode.steps- The number of mock location updates.interval- The interval in seconds between each mock location update.callback- An optional callback.
-
mockTracking
final static Unit mockTracking(Location origin, Location destination, Radar.RadarRouteMode mode, Integer steps, Integer interval, Function4<Radar.RadarStatus, Location, Array<RadarEvent>, RadarUser, Unit> block)
Mocks tracking the user's location from an origin to a destination.
- Parameters:
origin- The origin.destination- The destination.mode- The travel mode.steps- The number of mock location updates.interval- The interval in seconds between each mock location update.block- A block callback.
-
stopTracking
final static Unit stopTracking()
Stops tracking the user's location in the background.
-
isTracking
final static Boolean isTracking()
Returns a boolean indicating whether tracking has been started.
-
isUsingRemoteTrackingOptions
final static Boolean isUsingRemoteTrackingOptions()
Returns a boolean indicating whether the local tracking options are over-ridden by remote tracking options.
-
getPublishableKey
final static String getPublishableKey()
Returns a string of the publishable key.
-
getTrackingOptions
final static RadarTrackingOptions getTrackingOptions()
Returns the current tracking options.
-
setForegroundServiceOptions
final static Unit setForegroundServiceOptions(RadarTrackingOptions.RadarTrackingOptionsForegroundService options)
Settings for the foreground notification when the foregroundServiceEnabled parameter is true on Radar tracking options.
- Parameters:
options- Foreground service options
-
setNotificationOptions
final static Unit setNotificationOptions(RadarNotificationOptions options)
Settings for the all notifications.
- Parameters:
options- Notifications options
-
setCustomForegroundNotification
final static Unit setCustomForegroundNotification(Notification notification)
Sets a custom notification for the foreground service. This notification will be used instead of the default SDK notification.
- Parameters:
notification- The custom notification to use, or null to use the default
-
setReceiver
final static Unit setReceiver(RadarReceiver receiver)
Sets a receiver for client-side delivery of events, location updates, and debug logs.
- Parameters:
receiver- A delegate for client-side delivery of events, location updates, and debug logs.
-
setVerifiedReceiver
final static Unit setVerifiedReceiver(RadarVerifiedReceiver verifiedReceiver)
Sets a receiver for client-side delivery of verified location tokens.
- Parameters:
verifiedReceiver- A delegate for client-side delivery of of verified location tokens.
-
setInAppMessageReceiver
final static Unit setInAppMessageReceiver(RadarInAppMessageReceiver inAppMessageReceiver)
Sets a delegate for handling in-app message lifecycle events.
-
acceptEvent
final static Unit acceptEvent(String eventId, String verifiedPlaceId)
Accepts an event. Events can be accepted after user check-ins or other forms of verification. Event verifications will be used to improve the accuracy and confidence level of future events.
- Parameters:
eventId- The ID of the event to accept.verifiedPlaceId- For place entry events, the ID of the verified place.
-
rejectEvent
final static Unit rejectEvent(String eventId)
Rejects an event. Events can be accepted after user check-ins or other forms of verification. Event verifications will be used to improve the accuracy and confidence level of future events.
- Parameters:
eventId- The ID of the event to reject.
-
getTripOptions
final static RadarTripOptions getTripOptions()
Returns the current trip options.
-
startTrip
final static Unit startTrip(RadarTripOptions options, Radar.RadarTripCallback callback)
Starts a trip.
- Parameters:
options- Configurable trip options.callback- An optional callback.
-
startTrip
final static Unit startTrip(RadarTripOptions options, RadarTrackingOptions trackingOptions, Radar.RadarTripCallback callback)
Starts a trip.
- Parameters:
options- Configurable trip options.trackingOptions- Tracking options to use during the tripcallback- An optional callback.
-
startTrip
final static Unit startTrip(RadarTripOptions options, Function3<Radar.RadarStatus, RadarTrip, Array<RadarEvent>, Unit> block)
Starts a trip.
- Parameters:
options- Configurable trip options.block- An optional block callback.
-
startTrip
final static Unit startTrip(RadarTripOptions options, RadarTrackingOptions trackingOptions, Function3<Radar.RadarStatus, RadarTrip, Array<RadarEvent>, Unit> block)
Starts a trip.
- Parameters:
options- Configurable trip options.trackingOptions- Tracking options to use on trip.block- An optional block callback.
-
updateTrip
final static Unit updateTrip(RadarTripOptions options, RadarTrip.RadarTripStatus status, Radar.RadarTripCallback callback)
Manually updates a trip.
- Parameters:
options- Configurable trip options.status- The trip status.callback- An optional callback.
-
updateTrip
final static Unit updateTrip(RadarTripOptions options, RadarTrip.RadarTripStatus status, Function3<Radar.RadarStatus, RadarTrip, Array<RadarEvent>, Unit> block)
Manually updates a trip.
- Parameters:
options- Configurable trip options.status- The trip status.block- An optional block callback.
-
completeTrip
final static Unit completeTrip(Radar.RadarTripCallback callback)
Completes a trip.
- Parameters:
callback- An optional callback.
-
completeTrip
final static Unit completeTrip(Function3<Radar.RadarStatus, RadarTrip, Array<RadarEvent>, Unit> block)
Completes a trip.
- Parameters:
block- An optional block callback.
-
cancelTrip
final static Unit cancelTrip(Radar.RadarTripCallback callback)
Cancels a trip.
- Parameters:
callback- An optional callback.
-
cancelTrip
final static Unit cancelTrip(Function3<Radar.RadarStatus, RadarTrip, Array<RadarEvent>, Unit> block)
Cancels a trip.
- Parameters:
block- An optional block callback.
-
searchPlaces
final static Unit searchPlaces(Integer radius, Array<String> chains, Array<String> categories, Array<String> groups, Array<String> countryCodes, Integer limit, Radar.RadarSearchPlacesCallback callback)
Gets the device's current location, then searches for places near that location, sorted by distance.
- Parameters:
radius- The radius to search, in meters.chains- An array of chain slugs to filter.categories- An array of categories to filter.groups- An array of groups to filter.countryCodes- An array of country codes to filter.limit- The max number of places to return.callback- A callback.
-
searchPlaces
final static Unit searchPlaces(Integer radius, Array<String> chains, Map<String, String> chainMetadata, Array<String> categories, Array<String> groups, Array<String> countryCodes, Integer limit, Radar.RadarSearchPlacesCallback callback)
Gets the device's current location, then searches for places (with or without chain-specific metadata) near that location, sorted by distance.
- Parameters:
radius- The radius to search, in meters.chains- An array of chain slugs to filter.chainMetadata- A map of metadata keys and values.categories- An array of categories to filter.groups- An array of groups to filter.countryCodes- An array of country codes to filter.limit- The max number of places to return.callback- A callback.
-
searchPlaces
final Unit searchPlaces(Integer radius, Array<String> chains, Array<String> categories, Array<String> groups, Array<String> countryCodes, Integer limit, Function3<Radar.RadarStatus, Location, Array<RadarPlace>, Unit> block)
Gets the device's current location, then searches for places near that location, sorted by distance.
- Parameters:
radius- The radius to search, in meters.chains- An array of chain slugs to filter.categories- An array of categories to filter.groups- An array of groups to filter.countryCodes- An array of country codes to filter.limit- The max number of places to return.block- A block callback.
-
searchPlaces
final Unit searchPlaces(Integer radius, Array<String> chains, Map<String, String> chainMetadata, Array<String> categories, Array<String> groups, Array<String> countryCodes, Integer limit, Function3<Radar.RadarStatus, Location, Array<RadarPlace>, Unit> block)
Gets the device's current location, then searches for places (with or without chain-specific metadata) near that location, sorted by distance.
- Parameters:
radius- The radius to search, in meters.chains- An array of chain slugs to filter.chainMetadata- A map of metadata keys and values.categories- An array of categories to filter.groups- An array of groups to filter.countryCodes- An array of country codes to filter.limit- The max number of places to return.block- A block callback.
-
searchPlaces
final static Unit searchPlaces(Location near, Integer radius, Array<String> chains, Array<String> categories, Array<String> groups, Array<String> countryCodes, Integer limit, Radar.RadarSearchPlacesCallback callback)
Search for places near a location, sorted by distance.
- Parameters:
near- The location to search.radius- The radius to search, in meters.chains- An array of chain slugs to filter.categories- An array of categories to filter.groups- An array of groups to filter.countryCodes- An array of country codes to filter.limit- The max number of places to return.callback- A callback.
-
searchPlaces
final static Unit searchPlaces(Location near, Integer radius, Array<String> chains, Map<String, String> chainMetadata, Array<String> categories, Array<String> groups, Array<String> countryCodes, Integer limit, Radar.RadarSearchPlacesCallback callback)
Search for places (with or without chain-specific metadata) near a location, sorted by distance.
- Parameters:
near- The location to search.radius- The radius to search, in meters.chains- An array of chain slugs to filter.chainMetadata- A map of metadata keys and values.categories- An array of categories to filter.groups- An array of groups to filter.countryCodes- An array of country codes to filter.limit- The max number of places to return.callback- A callback.
-
searchPlaces
final Unit searchPlaces(Location near, Integer radius, Array<String> chains, Array<String> categories, Array<String> groups, Array<String> countryCodes, Integer limit, Function3<Radar.RadarStatus, Location, Array<RadarPlace>, Unit> block)
Search for places near a location, sorted by distance.
- Parameters:
near- The location to search.radius- The radius to search, in meters.chains- An array of chain slugs to filter.categories- An array of categories to filter.groups- An array of groups to filter.countryCodes- An array of country codes to filter.limit- The max number of places to return.block- A block callback.
-
searchPlaces
final Unit searchPlaces(Location near, Integer radius, Array<String> chains, Map<String, String> chainMetadata, Array<String> categories, Array<String> groups, Array<String> countryCodes, Integer limit, Function3<Radar.RadarStatus, Location, Array<RadarPlace>, Unit> block)
Search for places (with or without chain-specific metadata) near a location, sorted by distance.
- Parameters:
near- The location to search.radius- The radius to search, in meters.chains- An array of chain slugs to filter.chainMetadata- A map of metadata keys and values.categories- An array of categories to filter.groups- An array of groups to filter.countryCodes- An array of country codes to filter.limit- The max number of places to return.block- A block callback.
-
searchGeofences
final static Unit searchGeofences(Integer radius, Array<String> tags, JSONObject metadata, Integer limit, Boolean includeGeometry, Radar.RadarSearchGeofencesCallback callback)
Gets the device's current location, then searches for geofences near that location, sorted by distance.
- Parameters:
radius- The optional radius to search, in meters.tags- An array of tags to filter.metadata- A dictionary of metadata to filter.limit- The max number of places to return.includeGeometry- Include geofence geometries in the response.callback- A callback.
-
searchGeofences
final Unit searchGeofences(Integer radius, Array<String> tags, JSONObject metadata, Integer limit, Boolean includeGeometry, Function3<Radar.RadarStatus, Location, Array<RadarGeofence>, Unit> block)
Gets the device's current location, then searches for geofences near that location, sorted by distance.
- Parameters:
radius- The optional radius to search, in meters.tags- An array of tags to filter.metadata- A dictionary of metadata to filter.limit- The max number of places to return.includeGeometry- Include geofence geometries in the response.block- A block callback.
-
searchGeofences
final static Unit searchGeofences(Location near, Integer radius, Array<String> tags, JSONObject metadata, Integer limit, Boolean includeGeometry, Radar.RadarSearchGeofencesCallback callback)
Search for geofences near a location, sorted by distance.
- Parameters:
near- The location to search.radius- The optional radius to search, in meters.tags- An array of tags to filter.metadata- A dictionary of metadata to filter.limit- The max number of places to return.includeGeometry- Include geofence geometries in the response.callback- A callback.
-
searchGeofences
final Unit searchGeofences(Location near, Integer radius, Array<String> tags, JSONObject metadata, Integer limit, Boolean includeGeometry, Function3<Radar.RadarStatus, Location, Array<RadarGeofence>, Unit> block)
Search for geofences near a location, sorted by distance.
- Parameters:
near- The location to search.radius- The optional radius to search, in meters.tags- An array of tags to filter.metadata- A dictionary of metadata to filter.limit- The max number of places to return.includeGeometry- Include geofence geometries in the response.block- A block callback.
-
autocomplete
final static Unit autocomplete(String query, Location near, Integer limit, Radar.RadarGeocodeCallback callback)
Autocompletes partial addresses and place names, sorted by relevance.
- Parameters:
query- The partial address or place name to autocomplete.near- A location for the search.limit- The max number of addresses to return.callback- A callback.
-
autocomplete
final Unit autocomplete(String query, Location near, Integer limit, Function2<Radar.RadarStatus, Array<RadarAddress>, Unit> block)
Autocompletes partial addresses and place names, sorted by relevance.
- Parameters:
query- The partial address or place name to autocomplete.near- A location for the search.limit- The max number of addresses to return.block- A block callback.
-
autocomplete
final static Unit autocomplete(String query, Location near, Array<String> layers, Integer limit, String country, Radar.RadarGeocodeCallback callback)
Autocompletes partial addresses and place names, sorted by relevance.
- Parameters:
query- The partial address or place name to autocomplete.near- A location for the search.layers- Optional layer filters.limit- The max number of addresses to return.country- An optional country filter.callback- A callback.
-
autocomplete
final Unit autocomplete(String query, Location near, Array<String> layers, Integer limit, String country, Function2<Radar.RadarStatus, Array<RadarAddress>, Unit> block)
Autocompletes partial addresses and place names, sorted by relevance.
- Parameters:
query- The partial address or place name to autocomplete.near- A location for the search.layers- Optional layer filters.limit- The max number of addresses to return.country- An optional country filter.block- A block callback.
-
autocomplete
final static Unit autocomplete(String query, Location near, Array<String> layers, Integer limit, String country, Boolean expandUnits, Boolean mailable, Radar.RadarGeocodeCallback callback)
Autocompletes partial addresses and place names, sorted by relevance.
- Parameters:
query- The partial address or place name to autocomplete.near- A location for the search.layers- Optional layer filters.limit- The max number of addresses to return.country- An optional country filter.expandUnits- (Deprecated) This is always true, regardless of the value passed here.mailable- Whether to only include mailable addresses.callback- A callback.
-
autocomplete
final Unit autocomplete(String query, Location near, Array<String> layers, Integer limit, String country, Boolean expandUnits, Boolean mailable, Function2<Radar.RadarStatus, Array<RadarAddress>, Unit> block)
Autocompletes partial addresses and place names, sorted by relevance.
- Parameters:
query- The partial address or place name to autocomplete.near- A location for the search.layers- Optional layer filters.limit- The max number of addresses to return.country- An optional country filter.expandUnits- (Deprecated) This is always true, regardless of the value passed here.mailable- Whether to only include mailable addressesblock- A block callback.
-
validateAddress
final static Unit validateAddress(RadarAddress address, Radar.RadarValidateAddressCallback callback)
Validates an address, attaching to a verification status, property type, and plus4.
- Parameters:
address- The address to validate.callback- A callback.
-
validateAddress
final Unit validateAddress(RadarAddress address, Function3<Radar.RadarStatus, RadarAddress, Radar.RadarAddressVerificationStatus, Unit> block)
Validates an address, attaching to a verification status, property type, and plus4.
- Parameters:
address- The address to validate.block- A block callback.
-
geocode
final static Unit geocode(String query, Array<String> layers, Array<String> countries, Radar.RadarGeocodeCallback callback)
Geocodes an address, converting address to coordinates.
- Parameters:
query- The address to geocode.layers- Optional layer filters.countries- Optional country filters.callback- A callback.
-
geocode
final Unit geocode(String query, Array<String> layers, Array<String> countries, Function2<Radar.RadarStatus, Array<RadarAddress>, Unit> block)
Geocodes an address, converting address to coordinates.
- Parameters:
query- The address to geocode.layers- Optional layer filters.countries- Optional country filters.block- A block callback.
-
reverseGeocode
final static Unit reverseGeocode(Array<String> layers, Radar.RadarGeocodeCallback callback)
Gets the device's current location, then reverse geocodes that location, converting coordinates to address.
- Parameters:
layers- Optional layer filters.callback- A callback.
-
reverseGeocode
final Unit reverseGeocode(Array<String> layers, Function2<Radar.RadarStatus, Array<RadarAddress>, Unit> block)
Gets the device's current location, then reverse geocodes that location, converting coordinates to address.
- Parameters:
layers- Optional layer filters.block- A block callback.
-
reverseGeocode
final static Unit reverseGeocode(Location location, Array<String> layers, Radar.RadarGeocodeCallback callback)
Reverse geocodes a location, converting coordinates to address.
- Parameters:
location- The location to reverse geocode.layers- Optional layer filters.callback- A callback.
-
reverseGeocode
final Unit reverseGeocode(Location location, Array<String> layers, Function2<Radar.RadarStatus, Array<RadarAddress>, Unit> block)
Reverse geocodes a location, converting coordinates to address.
- Parameters:
location- The location to geocode.layers- Optionalblock- A block callback.
-
ipGeocode
final static Unit ipGeocode(Radar.RadarIpGeocodeCallback callback)
Geocodes the device's current IP address, converting IP address to partial address.
- Parameters:
callback- A callback.
-
ipGeocode
final Unit ipGeocode(Function3<Radar.RadarStatus, RadarAddress, Boolean, Unit> block)
Geocodes the device's current IP address, converting IP address to partial address.
- Parameters:
block- A block callback.
-
getDistance
final static Unit getDistance(Location destination, EnumSet<Radar.RadarRouteMode> modes, Radar.RadarRouteUnits units, Radar.RadarRouteCallback callback)
Gets the device's current location, then calculates the travel distance and duration to a destination.
- Parameters:
destination- The destination.modes- The travel modes.units- The distance units.callback- A callback.
-
getDistance
final Unit getDistance(Location destination, EnumSet<Radar.RadarRouteMode> modes, Radar.RadarRouteUnits units, Function2<Radar.RadarStatus, RadarRoutes, Unit> block)
Gets the device's current location, then calculates the travel distance and duration to a destination.
- Parameters:
destination- The destination.modes- The travel modes.units- The distance units.block- A block callback.
-
getDistance
final static Unit getDistance(Location origin, Location destination, EnumSet<Radar.RadarRouteMode> modes, Radar.RadarRouteUnits units, Radar.RadarRouteCallback callback)
Calculates the travel distance and duration from an origin to a destination.
- Parameters:
origin- The origin.destination- The destination.modes- The travel modes.units- The distance units.callback- A callback.
-
getDistance
final Unit getDistance(Location origin, Location destination, EnumSet<Radar.RadarRouteMode> modes, Radar.RadarRouteUnits units, Function2<Radar.RadarStatus, RadarRoutes, Unit> block)
Calculates the travel distance and duration from an origin to a destination.
- Parameters:
origin- The origin.destination- The destination.modes- The travel modes.units- The distance units.block- A block callback.
-
getMatrix
final static Unit getMatrix(Array<Location> origins, Array<Location> destinations, Radar.RadarRouteMode mode, Radar.RadarRouteUnits units, Radar.RadarMatrixCallback callback)
Calculates the travel distances and durations between multiple origins and destinations for up to 25 routes.
- Parameters:
origins- The origins.destinations- The destinations.mode- The travel mode.units- The distance units.callback- A callback.
-
getMatrix
final Unit getMatrix(Array<Location> origins, Array<Location> destinations, Radar.RadarRouteMode mode, Radar.RadarRouteUnits units, Function2<Radar.RadarStatus, RadarRouteMatrix, Unit> block)
Calculates the travel distances and durations between multiple origins and destinations for up to 25 routes.
- Parameters:
origins- The origins.destinations- The destinations.mode- The travel mode.units- The distance units.block- A block callback.
-
getContext
final static Unit getContext(Radar.RadarContextCallback callback)
Gets the device's current location, then gets context for that location without sending device or user identifiers to the server.
- Parameters:
callback- A callback.
-
getContext
final Unit getContext(Function3<Radar.RadarStatus, Location, RadarContext, Unit> block)
Gets the device's current location, then gets context for that location without sending device or user identifiers to the server.
- Parameters:
block- A block callback.
-
getContext
final static Unit getContext(Location location, Radar.RadarContextCallback callback)
Gets context for a location without sending device or user identifiers to the server.
- Parameters:
location- The location.callback- A callback.
-
getContext
final Unit getContext(Location location, Function3<Radar.RadarStatus, Location, RadarContext, Unit> block)
Gets context for a location without sending device or user identifiers to the server.
- Parameters:
location- The location.block- A block callback.
-
logConversion
final static Unit logConversion(String name, JSONObject metadata, Radar.RadarLogConversionCallback callback)
Logs a conversion.
- Parameters:
name- The name of the conversion.metadata- The metadata associated with the conversion.callback- A callback.
-
logConversion
final static Unit logConversion(String name, JSONObject metadata, Function2<Radar.RadarStatus, RadarEvent, Unit> block)
Logs a conversion.
- Parameters:
name- The name of the conversion.metadata- The metadata associated with the conversion.block- A block callback
-
logConversion
final static Unit logConversion(String name, Double revenue, JSONObject metadata, Radar.RadarLogConversionCallback callback)
Logs a conversion with revenue.
- Parameters:
name- The name of the conversion.revenue- The revenue generated by the conversion.metadata- The metadata associated with the conversion.callback- A callback.
-
logConversion
final static Unit logConversion(String name, Double revenue, JSONObject metadata, Function2<Radar.RadarStatus, RadarEvent, Unit> block)
Logs a conversion with revenue.
- Parameters:
name- The name of the conversion.revenue- The revenue generated by the conversion.metadata- The metadata associated with the conversion.block- A block callback.
-
logOpenedAppConversion
final static Unit logOpenedAppConversion(Intent intent)
-
setLogLevel
final static Unit setLogLevel(Radar.RadarLogLevel level)
Sets the log level for debug logs.
- Parameters:
level- The log level.
-
logResigningActive
final static Unit logResigningActive()
Log application resigning active.
-
logBackgrounding
final static Unit logBackgrounding()
Log application entering background and flush logs in memory buffer into persistent buffer.
-
stringForSource
final static String stringForSource(Radar.RadarLocationSource source)
Returns a display string for a location source value.
- Parameters:
source- A location source value.
-
stringForMode
final static String stringForMode(Radar.RadarRouteMode mode)
Returns a display string for a travel mode value.
- Parameters:
mode- A travel mode value.
-
stringForVerificationStatus
final static String stringForVerificationStatus(Radar.RadarAddressVerificationStatus verificationStatus)
Returns a display string for a verification status value.
- Parameters:
verificationStatus- A verification status value.
-
stringForTripStatus
final static String stringForTripStatus(RadarTrip.RadarTripStatus status)
Returns a display string for a trip status value.
- Parameters:
status- A trip status value.
-
jsonForLocation
final static JSONObject jsonForLocation(Location location)
Returns a JSON object for a location.
- Parameters:
location- A location.
-
sdkVersion
final static String sdkVersion()
Gets the version number of the Radar SDK, such as "3.5.1" or "3.5.1-beta.2".
-
loadImage
final static Unit loadImage(String url, Function1<Bitmap, Unit> callback)
Loads an image from a URL using the existing API pattern.
- Parameters:
url- The URL to load the image fromcallback- Callback to handle the result
-
showInAppMessage
final static Unit showInAppMessage(RadarInAppMessage payload)
-
-
-
-