Steps
1
Sign up for Radar
If you haven’t already, sign up for Radar to get your API key. You can create up to 1,000 geofences and make up to 100,000 API requests per month for free.Get API keys
2
Create geofences
There are several ways to create geofences:The
tag
is a group for the geofence. In this tutorial, we’ll create two geofences for each drive-thru, a large circular geofence with radius 500m with tag ramp-up
and a small, car-length polygon geofence in front of the menu board.3
Initialize the SDK
Initialize the SDK with your publishable API key.
4
Request foreground permissions
5
Configure remote tracking options
In the Radar dashboard, navigate to the SDK configuration section in settings. Toggle on “Remotely set tracking options”. Then toggle on “Enable on-trip tracking options” and set the “Tracking preset” to “Continuous”. Toggle on “Enable in-geofence tracking options”, set the “Tracking preset” to “Custom” and replace the JSON blob below with the following tracking options on iOS and Android respectively:In the field entitled “Geofence tags”, input the tag of the geofence you created to trigger the increase in tracking frequency,
ramp-up
.6
Start tracking and start a trip
When the user places an order and taps “I’m on my way,” start tracking to start live location tracking, start a trip to the destination geofence. Use the order ID, in this case When a user is being tracked and enters the
456
, for the trip externalId
.ramp-up
geofence, the SDK will increase the frequency of location updates. With the frequency and accuracy of the ramped-up tracking, you can accurately detect when a users enters a car-length geofence in front of a menuboard.