Adobe Experience Platform support for React Native apps.
npm install @adobe/react-native-aepplaces

@adobe/react-native-aepplaces is a wrapper around the iOS and Android Adobe Experience Platform Places Extension to allow for integration with React Native applications. Functionality to enable Adobe Places is provided entirely through JavaScript documented below.
The Adobe Experience Platform Optimize extension has the following peer dependency, which must be installed prior to installing the optimize extension:
See Requirements and Installation instructions on the main page
Install the @adobe/react-native-aepplaces package:
NPM:
``bash`
npm install @adobe/react-native-aepplaces
Yarn:
`bash`
yarn add @adobe/react-native-aepplaces
To initialize the SDK, use the following methods:
- MobileCore.initializeWithAppId(appId)
- MobileCore.initialize(initOptions)
Refer to the root Readme for more information about the SDK setup.
`typescript`
import {
Places,
PlacesAuthStatus,
PlacesGeofence,
PlacesGeofenceTransitionType,
PlacesLocation,
PlacesPOI,
} from "@adobe/react-native-aepplaces";
#### Getting the extension version:
Syntax
`typescript`
extensionVersion(): Promise
Example
`typescriptAdobeExperienceSDK: Places version: ${version}
const version = await Places.extensionVersion();
console.log();`
#### Get the nearby points of interest:
Syntax
`typescript`
getNearbyPointsOfInterest(location,
Example
`typescript
let location = new PlacesLocation(
try {
const pois = await Places.getNearbyPointsOfInterest(location,
console.log(AdobeExperienceSDK: Places pois: ${pois})AdobeExperienceSDK: Places error: ${error}
} catch(error) {
console.log(`
}
#### Process geofence:
Syntax
`typescript`
processGeofence(geofence,
Example
`typescript`
// create a geofence
let geofence = new PlacesGeofence("geofence Identifier",
Places.processGeofence(geofence, PlacesGeofenceTransitionType.ENTER);
Places.processGeofence(geofence, PlacesGeofenceTransitionType.EXIT);
#### Get the current point of interests:
Syntax
`typescript`
getCurrentPointsOfInterest(): Promise
Example
`typescript`
const pois = await Places.getCurrentPointsOfInterest();
console.log('AdobeExperienceSDK: Places pois: ' + pois);
);
#### Get the last known location
Syntax
`typescript`
getLastKnownLocation(): Promise
Example
`typescript`
const location = await Places.getLastKnownLocation();
console.log('AdobeExperienceSDK: Places location: ' + location)
);
#### Clear
Syntax
`typescript`
clear(): void
Example
`typescript`
Places.clear();
#### Set Authorization status:
Syntax
`typescript`
setAuthorizationStatus(authStatus?: PlacesAuthStatus): void;
Example
`typescript``
Places.setAuthorizationStatus(PlacesAuthStatus.ALWAYS);
Places.setAuthorizationStatus(PlacesAuthStatus.DENIED);
Places.setAuthorizationStatus(PlacesAuthStatus.RESTRICTED);
Places.setAuthorizationStatus(PlacesAuthStatus.WHEN_IN_USE);
Places.setAuthorizationStatus(PlacesAuthStatus.UNKNOWN);