Adobe Experience Platform Location Service provides an SDK extension which allows you to act based on the location of your users. This extension is the interface to the Location Service Web Services APIs.
The SDK extension listens for events that contain GPS coordinates and geofence region events, and dispatches new events that are processed by the Rules Engine. The SDK extension also retrieves and delivers a list of the nearest POI for the app data that retrieves from the APIs. The regions returned by the APIs are stored in cache and persistence, which allows limited offline processing.
Places
is the mobile SDK supporting the Location Service.
- In the Data Collection UI, from your mobile property, select the Extensions tab.
- On the Catalog tab, locate or search for the Places extension, and select Install.
- Select the POI Library (or libraries) you wish to use in the app.
- Select Save.
- Follow the publishing process to update SDK configuration.
{% tabs %} {% tab title="Android" %}
- Add the Mobile Core and Places extensions to your project using the app's Gradle file.
implementation 'com.adobe.marketing.mobile:core:1.+'
implementation 'com.adobe.marketing.mobile:places:1.+'
- Import the Mobile Core and Places extensions in your Application class.
import com.adobe.marketing.mobile.MobileCore;
import com.adobe.marketing.mobile.Places;
{% endtab %}
{% tab title="iOS (AEP 3.x)" %}
- Add the Mobile Core and Places extensions to your project using CocoaPods. Add the following pods in your
Podfile
:
use_frameworks!
target 'YourTargetApp' do
pod 'AEPCore'
pod 'AEPPlaces'
end
- Import the Mobile Core and Places modules:
// AppDelegate.swift
import AEPCore
import AEPPlaces
// AppDelegate.h
@import AEPCore;
@import AEPPlaces;
{% endtab %}
{% tab title="iOS (ACP 2.x)" %}
- Add the Mobile Core and Places extensions to your project using CocoaPods. Add the following pods in your
Podfile
:
use_frameworks!
target 'YourTargetApp' do
pod 'ACPCore', '~> 2.0'
pod 'ACPPlaces', '~> 1.0'
end
- Import the Mobile Core and Places modules:
// AppDelegate.swift
import ACPCore
import ACPPlaces
// AppDelegate.h
#import "ACPCore.h"
#import "ACPPlaces.h"
{% endtab %}
{% endtabs %}
{% tabs %} {% tab title="Android" %}
public class MobileApp extends Application {
@Override
public void onCreate() {
super.onCreate();
MobileCore.setApplication(this);
try {
Places.registerExtension();
// register other extensions
MobileCore.start(new AdobeCallback () {
@Override
public void call(Object o) {
MobileCore.configureWithAppID("yourAppId");
}
});
} catch (Exception e) {
//Log the exception
}
}
}
{% endtab %}
{% tab title="iOS (AEP 3.x)" %}
// AppDelegate.swift
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
MobileCore.registerExtensions([Places.self], {
MobileCore.configureWith(appId: "yourLaunchEnvironmentID")
})
...
}
// AppDelegate.m
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
[AEPMobileCore registerExtensions:@[AEPMobilePlaces.class] completion:^{
...
}];
[AEPMobileCore configureWithAppId: @"yourLaunchEnvironmentID"];
...
}
{% endtab %}
{% tab title="iOS (ACP 2.x)" %}
// AppDelegate.swift
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
ACPPlaces.registerExtension()
ACPCore.configure(withAppId: "yourLaunchEnvironmentID")
ACPCore.start()
})
...
}
// AppDelegate.m
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
[ACPPlaces registerExtension];
[ACPCore configureWithAppId:@"yourLaunchEnvironmentID"];
[ACPCore start];
...
}
{% endtab %}
{% endtabs %}