Skip Navigation

Integrate 
BlackBerry Persona
 with a 
BlackBerry Dynamics
 app

If 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 on 
    BlackBerry Analytics
     SDK from the 
    build.gradle
     file: 
    implementation(name:'BlackberryAnalytics-release, ext:'aar')
  • Verify that the dependency on the SDK .aar file is correctly linked in your 
    build.gradle
     file. See Integrating the BlackBerry Dynamics SDK in .aar format.
  • Remove the following method calls within your project:
    • BlackberryAnalytics.setStage()
    • BlackberryAnalytics.hostInitializationCompleted()
  1. Add a compile dependency for 
    Google Play
     Services 17.0.0 or later (for example, for 
    Gradle
    , com.google.android.gms:play-services-location:17.0.0).
  2. Add the following 
    Persona
     flag metadata to the 
    <app_name>
    /assets/com.blackberry.dynamics.settings.json
     file, or create the file if it doesn't exist:
    { "EnableBlackBerryPersona": true }
  3. 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 the 
    BlackBerry Dynamics Runtime
     to display a screen that prompts the user to opt in or opt out of 
    Persona
     using 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 allow 
    Persona
     to collect and use data.
  4. Verify that the dependency on the SDK .aar file is correctly linked in your 
    build.gradle
     file. 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”.