Integrate BlackBerry Persona with a BlackBerry
Dynamics app
BlackBerry Persona
with a BlackBerry
Dynamics
appIf you previously integrated the separate
BlackBerry Analytics
SDK with your BlackBerry
Dynamics
app, after you upgrade to use SDK version 8.0, do the following to remove the previous integration:
- Remove the dependency onBlackBerry AnalyticsSDK from thebuild.gradlefile:implementation(name:'BlackberryAnalytics-release, ext:'aar')
- Verify that the dependency on the SDK .aar file is correctly linked in yourbuild.gradlefile. See Integrating the BlackBerry Dynamics SDK in .aar format.
- Remove the following method calls within your project:
- BlackberryAnalytics.setStage()
- BlackberryAnalytics.hostInitializationCompleted()
- Add a compile dependency forGoogle PlayServices 17.0.0 or later (for example, forGradle, com.google.android.gms:play-services-location:17.0.0).
- Add the followingPersonaflag metadata to thefile, or create the file if it doesn't exist:<app_name>/assets/com.blackberry.dynamics.settings.json{ "EnableBlackBerryPersona": true }
- In the Settings or Preferences section of your app UI, add a menu item called “BlackBerry Persona Settings” that calls the following method:BlackberryAnalytics.displaySISsettings.This method triggers theBlackBerry Dynamics Runtimeto display a screen that prompts the user to opt in or opt out ofPersonausing the user’s location and IP address data when assessing the user’s risk level.This is a mandatory legal requirement to ensure that the end user can choose whether to allowPersonato collect and use data.
- Verify that the dependency on the SDK .aar file is correctly linked in yourbuild.gradlefile. See Integrating the BlackBerry Dynamics SDK in .aar format.allprojects { repositories { /// maven { url '../../../m2repository' } } } implementation 'com.blackberry.blackberrydynamics:android_handheld_platform:8.0.0.1968'
Note that
Persona
requires the ACCESS_FINE_LOCATION permission. If you submit the app to Google
Play
, for the question “Display User’s Location to Others”, answer “No”.