Android Build Distribution
How to get started
- If you already have an existing Emerge CI integration: check out your Installable Builds, if you don't see any builds listed ensure you are uploading app bundles (
.aab
files). - If this is your first time using Emerge, check out our docs on how to complete a CI integration.
Installable Builds
Easily see all of the builds that can be installed with all the filters you want to make sure you're sharing the right builds.
Easy Installation
Any build with a valid signing profile will have automatically generated install codes that are easily accessible from the desktop/mobile web UI.
Auto-update prompt SDK
com.emergetools.distribution is a Android library that simplifies the process of distributing new app versions and checking for updates. It provides an easy-to-use API to verify if a new version is available and handles the update process seamlessly, ensuring your users are always on the latest release.
Install the SDK
Latest versions:
// app-module build.gradle.kts
dependencies {
implementation("com.emergetools.distribution:distribution:<latest_version>")
}
Automatic initialization
Distribution relies on the Androidx startup library to auto-initialize the Distribution SDK as part of your app's startup.
Disable automatic initialization
To disable automatic initialization add the following snippet to your app's AndroidManifest.xml
:
<provider
android:name="androidx.startup.InitializationProvider"
android:authorities="${applicationId}.androidx-startup"
android:exported="false"
tools:node="merge">
<meta-data android:name="com.emergetools.distribution.DistributionInitializer"
tools:node="remove" />
</provider>
You may need to add a direct dependency on theandroidx.startup:startup-runtime
library if the app does not already have such a dependency.
// app-module build.gradle.kts
dependencies {
implementation("androidx.startup:startup-runtime:<latest_version>")
}
Follow the Manual initialization steps below to ensure that Distribution is initialized.
Manual initialization
To manually initialize Distribution call Distribution.init(context)
. For example:
import com.emergetools.distribution.Distribution
class MyApp : Application() {
override fun onCreate() {
Reaper.init(this)
}
}
import com.emergetools.reaper.Reaper;
public class MyApp extends Application {
@Override
public void onCreate() {
super.onCreate();
Reaper.init(this);
}
}
A common case when manual initialization is required is when androidx.startup.InitializationProvider
has been globally disabled by the following snippet being included in the AndroidManifest.xml
:
<provider
android:name="androidx.startup.InitializationProvider"
android:authorities="${applicationId}.androidx-startup"
android:exported="false"
tools:node="remove">
<meta-data
android:name="androidx.work.WorkManagerInitializer"
android:value="androidx.startup"
tools:node="remove" />
</provider>
Updated about 9 hours ago