This page describes how to install the Shake SDK into your Android application via Gradle. Whether you are using Java or Kotlin, you can follow the steps below.
Add Shake dependency to your app-level build.gradle file
Set compileSdkVersion version in the build.gradle file
Since Shake requires
compileSdkVersion 29 or greater, verify that
compileSdkVersion is correctly set in the app build.gradle file.
Initialize Shake in the
onCreate callback of your Application.
your-api-client-secret with the actual values you have in your workspace settings.
If you’re creating a custom Application class for the first time, make sure to specify it in your AndroidManifest.xml:
We recommend initializing Shake in the Application class, but sometimes you'll want to initialize Shake after the app is started, depending on the data retrieved from the backend.
You can use
Shake.start() method in the Activity, just make sure to call it in the onCreate callback of the Activity.
Now build your project and see everything work! To build and run your app, select Run › Run in the menu bar. This first run will automatically add your app to your Shake Dashboard based on your app bundle ID.