LOCATION SDK INTEGRATION GUIDE


In this detailed guide, we take you through the steps required to integrate the library with your Android and iOS app.

GETTING THE INTEGRATION KEY
 
STEP 1 - After a legal contract has been signed between the Publisher and Quadrant, an invitation will be sent to Publisher’s email redirecting to register to the platform.
 
1
 
STEP 2 - Register on the Quadrant Publisher Platform
 
2-Jul-01-2021-06-22-46-69-AM
 
STEP 3 - Once you're logged in, click PUBLISHER DASHBOARD from the menu on the left. This will display your publisher dashboard.
 
3-Jul-01-2021-06-25-30-83-AM
 
STEP 4 - Add your App, and choose 'Location' as SDK type, select your desired OS Type and submit.
 
4-4
 
STEP 5 - Once submitted, your app will be enlisted, but the Integration key will not be displayed yet. At this point, you require an admin's approval. The admin will be automatically notified and can take the needful action.
 
5
 
STEP 6 - Once approved, your integration key will be displayed on the dashboard. You need to distribute this integration key to your app developers.
 
6
 

INTEGRATING THE SDK - ANDROID

Latest version: 1.0.9

STEP 1 - In Android Studio, open setting.gradle or build.gradle (at project level), and add the “maven” line:
STEP 2 - Open build.gradle (at the app level), and add this under 'dependencies' code section:
 
 
 
STEP 3 - Still at the build.gradle (at the app level), add this under android → defaultConfig code section:

STEP 4 - Example code for SDK setup (best to put it at application class):

JAVA

KOTLIN

STEP 5 - Example code to start tracking location:

JAVA

KOTLIN

 
STEP 6 - When you release an app and use minifyEnabled true, add this to your proguard rules file:
 
-keep class com.quadrant.sdk.locationdata.** {*;}
 
Click here for a reference on Github
 
and that's it!
 

INTEGRATING THE SDK - iOS

Latest version: 1.1.3

STEP 1 - Installation using Cocoapods

Add this line in your Podfile:

pod "QDPublisher", :git => 'https://github.com/datastreamx-plc/ios- data-acquisition-sdk.git', :tag => '1.1.3'

and then install by type pod install in your command lineTo install dependencies from cocoapods.

Sometimes the pod is not updated so you can clean cache and update pod using

pod cache clean --all pod udpate QDPublisher 

 
STEP 2
- Configure Info.plist

Update your location usage descriptions

<key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
<string><your location access description></string>
<key>NSLocationAlwaysUsageDescription</key>
<string><your location access description></string>
<key>NSLocationWhenInUseUsageDescription</key>
<string><your location access description></string>

Update your tracking manager description

<key>NSUserTrackingUsageDescription </key> <string><your tracking usage description></string>
 
STEP 3
- Setup Integration Key and Start Tracking

Register your integration key after app launch, after that you can setup your event and start tracking location, usually your AppDelegate.swift

Implement QDPublisherDelegate - iOS

After setting data-renderer-mark="true">publisher.delegate = self you need to implement PublisherDelegate

Implement QDPublisherDelegate - iOS

Basically, the API is same just different language. Here’s the full code for objective-c in AppDelegate.m

 

And don’t forget to add implement PublisherDelegate in AppDelegate.h

 


  • Ready to add an ethical, hassle-free revenue stream to your business?
Speak to our data consultant to start using Quadrant Location SDK