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.- Download and unzip theBlackBerry Dynamics SDKrelease .zip distribution package.
- Download and unzip theBlackBerry Dynamics Launcher Libraryrelease .zip distribution package.
- Copy GoodLauncherLibrary/launcherlib.aar to the project libs directory.
- Make the following declarations in yourbuild.gradlefile, as shown in these snippets:
- Declare a dependency on thelauncherlib.aarlibrary andgdlibrary:dependencies { implementation 'com.blackberry.blackberrydynamics:android_handheld_platform:<version>' implementation(name: 'launcherlib', ext: 'aar') }
- Add the following repositories for Blackberry Dynamics Launcher andBlackBerry Dynamics SDKcomponents: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' } }
- Add theAndroidsupport 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' }
- To build your project withGradle, use eithergradle--info --stacktrace clean assembleDebugorgradle --info --stacktrace clean assembleRelease.