Android SDK
While DeployGate can distribute an app with just an APK file upload, incorporating an SDK makes the app development process more seamless.
SDK Installation (Android Studio/Gradle)
- Enter the following into the app module’s build.gradle file (Example: app/build.gradle).
// Groovy DSL
dependencies {
// Use SDK dependency for variants like debug.
debugImplementation "com.deploygate:sdk:${latest_version}"
// Use no-op inplementation for vatiants you would like to disable DeployGate SDK.
releaseImplementation "com.deploygate:sdk-mock:${latest_version}"
}
// Kotlin DSL
dependencies {
// Use SDK dependency for variants like debug.
debugImplementation("com.deploygate:sdk:${latest_version}")
// Use no-op inplementation for vatiants you would like to disable DeployGate SDK.
releaseImplementation("com.deploygate:sdk-mock:${latest_version}")
}
sdk-mock
is preferable?Currently, we provides two dependencies for Android apps.
- com.deploygate:sdk
- com.deploygate:sdk-mock
Please use sdk-mock
dependency for production builds instead of sdk
when you would like to disable DeployGate SDK on production builds. sdk-mock
dependency has public interfaces that are same as of sdk
but their implementations are empty, so you don't have to modify your app code for specific build variants.
Please use Android SDK 4.3.0 or later. If use 4.3.0 or earlier, for devices with Android 11 or later, package queries must be enabled for SDK to connect to DeployGate services. As such, please add the following to AndroidManifest.xml.
<queries>
<package android:name="com.deploygate" />
</queries>
- On Android Studio, click on Sync Project With Gradle Files to apply the edits.
- After building and distributing an app with DeployGate, the app’s launch and crash reports will be available on DeployGate.
Gradle Plugin allows you to build and upload by simply running Gradle task.
DeployGate SDK will only function with builds distributed via DeployGate in conjunction with the DeployGate app. It will not function when installed on emulators or devices directly connected to development environments, not through DeployGate.
Please review the corresponding references listed below for more details.
References
- Javadoc - https://deploygate.github.io/deploygate-android-sdk/
- Release Notes - https://github.com/DeployGate/deploygate-android-sdk/releases
- Source Code - https://github.com/DeployGate/deploygate-android-sdk/
- Sample Project - https://github.com/DeployGate/deploygate-android-sdk/tree/master/sample