Skip Navigation

Configure an existing Android project

These steps assume you have a project already created and a
libs
directory in that project. The
libs
directory must not be at the top level of your project. It must be at the same level as your
build.gradle
file.
  1. Download and unzip the
    BlackBerry Dynamics SDK
    release .zip distribution package.
  2. Download and unzip the
    BlackBerry Dynamics Launcher Library
    release .zip distribution package.
  3. Copy GoodLauncherLibrary/launcherlib.aar to the project libs directory.
  4. Make the following declarations in your
    build.gradle
    file, as shown in these snippets:
    1. Declare a dependency on the
      launcherlib.aar
      library and
      gd
      library:
      dependencies { implementation 'com.blackberry.blackberrydynamics:android_handheld_platform:<version>' implementation(name: 'launcherlib', ext: 'aar') }
    2. Add the following repositories for Blackberry Dynamics Launcher and
      BlackBerry Dynamics SDK
      components:
      repositories{ //Copy launcherlib.aar inside app/libs folder flatDir { dirs 'libs' } //Maven url points to the local Dynamics SDK download folder path ex: gdsdk-release-<version>/m2repository/maven { url '<dynamics-sdk-root-folder>/m2repository' } }
    3. Add the
      Android
      support library dependencies:
      implementation 'androidx.legacy:legacy-support-v13:1.0.0' implementation 'androidx.appcompat:appcompat:1.0.0' implementation 'com.google.android.material:material:1.0.0' implementation 'androidx.cardview:cardview:1.0.0' implementation 'androidx.constraintlayout:constraintlayout:1.1.3' }
  5. To build your project with
    Gradle
    , use either
    gradle--info --stacktrace clean assembleDebug
    or
    gradle --info --stacktrace clean assembleRelease
    .