
App developers and stakeholders are always on the lookout for bringing more value and context into their apps to reach their target audience and their needs better.Location-based triggers and features add tremendous value, bringing in a lot of meaning, depth and sense into the business.Today’s Location Management OptionsLocation management needn’t be a simple tracking of user movements along a map, like in your ride-sharing apps.
And most importantly we want these to be used from mobile apps without the need for specialized hardware like beacons or extra-sensitive GPS.While this kind of location management can be selectively built for each of the apps you manage, it makes much more sense to think of it as a separate component that can be simply plugged into any app with minimal coding for integration. Don’t you agree?While iOS and Android have their own in-built components for managing location and triggering events based on changes, as of today, they are quite limited in a number of ways -
What should a Location Management Solution Do?When we try and choose a component that helps us with our complicated location needs, we think of out-of-the-box support for
And from an implementation standpoint, we look out for
And trust us, there are very few platforms that does this all with reasonable flair! (Wink wink, potential billion dollar business idea). In this article, we are going to brief on one such platform we have come across that we think tackles these problems reasonably well - Radar.Enter RADARAt its core, Radar is a platform to add location context and tracking in mobile apps. It aims to make a whole lot of location-related use cases easier to manage and implement with minimal dev hours spent.Radar concentrates on
Let’s take the case of iOS. While iOS has geofencing enabled in its latest versions, at its heart it relies on the app to define geofences, track them as required and take actions. Compared to this, everything in Radar is managed with an administrative dashboard. So, it becomes easier to define and manage points of interest and rely on the mobile app mostly only for responding to triggers generated from the Radar SDK. It also supports creating geofences from mobile or API if the use case requires the app to handle this. But for most general use cases, separating the management of geofences from app logic is a huuuuuuge bonus.Other advantages include support for
In their own words, Radar in short, is a full stack solution withiOS and Android SDKs, an API, a dashboard, webhooks, and integrations.A Simple Use CaseConsider you are a retail chain with numerous outlets in the country. If the user has your mobile app installed, you can ask for permissions and track his location when the app is in use or is in background. And if the user is near one of your outlets (defined as a custom geofence by you), you can entice him with deals and coupons. While this behavior can be triggered by a custom setup between your app and your backend, Radar makes it so much easier with literally just a few lines of code.Your app
The Radar SDK manages all this silently and your app just needs to respond to events it notifies you of. What we like best is that all geofencing and event generation happens on the server side and so you can concentrate on other fundamental features of your app.Radar also claims that while used in background, it consumes less than 2% of battery per day. Say whaaaat! It also doesn’t send location data to the server every minute, it does so only when the user moves about 100 meters or stops in a location for more than a few minutes. Clever, don’t you think?Radar also boasts of numerous meaningful integrations with external services. Again, in their own words, Radar integrates directly with mParticle, Segment, Appboy, and Yext. Through mParticle and Segment, Radar integrates with hundreds of other platforms, including Amplitude, Mixpanel, and Amazon Redshift. Radar also supports webhooks for custom integrations. Did you read that right? Support for webhooks, aaaand we are sold!Within a year of its launch, Radar has also grown quite significantly as they claim to be on a million devices and processing billions of location requests.How Radar Actually Fared When We Implemented ItFirst things first. Understanding the platform and what it does was very easy. Their documentation is pretty straightforward and you can get everything setup and integrated with your app in a matter of hours. We loved this ease!We think these will be the simple chronological order of steps for any app integration (with code snippets for iOS)
The next step is to see the status of location permissions in the app
When the location authorization is only for foreground, we needed to make a call to Radar to do its stuff based on some custom business logic - like every time an action is triggered or based on a timer (we do tend to avoid this route). Radar provides us with a handy closure to perform the necessary actions if the tracking hits a valid geofence. You could do something like this -Radar.trackOnce(completionHandler: { (status: RadarStatus, location: CLLocation?, events: [RadarEvent]?, user: RadarUser?) in
DispatchQueue.main.async {
if status == .success {
if let events = events {
for event in events {
let eventString = RadarUtils.stringForEvent(event)
print(eventString)
if(event.type == .userEnteredGeofence){
if(event.confidence == .high){
// your custom logic in handling the event - like an alert, a business action etc
}
}
}
}
}When the location authorization is for background as well, it is simply managed with Radar.startTracking() and we fall back on the delegate methods to handle receiving the events as when they are generated, like -func didReceiveEvents(_ events: [RadarEvent], user: RadarUser) {
for event in events {
if(event.type == .userEnteredGeofence){
if(event.confidence == .high){
// your custom logic in handling the event - like an alert, a business action etc
}
}
}And that’s it. We were almost done and so will you be. You can test with entering the locations in your simulator - locations you originally configured in the dashboard - and see these events triggered.Note: We did see a repercussion in implementing both background and foreground support for Radar events (since we can’t possibly guess which user will opt for which level). When foreground closure is triggered, it triggered the didReceiveEvents method too. So, we had our custom logic called in twice. You can solve this by a simple flag or counter but we wish Radar had handled this better in their SDK.With this example, we have covered only the geofences feature from Radar. Like we said before, you can make use of their places and insights data too. If you need help with these in your app, drop us a line!Remember:User input is critical with location management. The whole can of features can become stale if the user just doesn’t want to turn on location in his phone. The prevalent phobia among most users that giving access to apps for location drains the battery and invades their privacy can be quite tough to break. But educating users to their benefits and assuring that their data is securely stored and processed only for the respective feature can convert these doubtful users to actively engage with your app. Be honest, direct and clear and the users will understand the benefits your app provides with location access enabled.SoDid we interest you into considering adding location management in your app and possibly use Radar for it? Let us know! We do a whole suite of interesting integrations and would love to chat with you about your app/idea.Are you looking to build a great product or service? Do you foresee technical challenges? If you answered yes to the above questions, then you must talk to us. We are a world-class custom .NET development company. We take up projects that are in our area of expertise. We know what we are good at and more importantly what we are not. We carefully choose projects where we strongly believe that we can add value. And not just in engineering but also in terms of how well we understand the domain. Book a free consultation with us today. Let’s work together.

