Framework to support Applivery.com Mobile App distribution for Android Apps.
With Applivery you can massively distribute your Android Apps (both Ad-hoc or In-House/Enterprise) through a customizable distribution site with no need of your users have to be registered in the platform. No matter if your Android Apps are signed using Play Store or debug developer signature, Applivery is perfect not only for beta testing distribute to your QA team, but also for In-House Enterprise distribution for beta testing users, prior to a release, or even for corporative Apps to the employees of a company.
- Automatic OTA Updates when uploading new versions to Applivery.
- Force update if App version is lower than the minimum version configured in Applivery.
- Send feedback. Your test users can report a bug or send improvements feedback by simply taking a screenshot.
Applivery SDK is fully compatible with Android 7 (API level 24) and higher versions.
First of all, you should create an account on Applivery.io and then add a new Application.
APP TOKEN: that identifies and grants access to your app in order to use the SDK.
You can get your APP TOKEN in your App -> Settings -> Integrations section.
Applivery SDK is designed for non-production builds (debug builds or other testing build variants).
Add the following dependency to your app's build.gradle file:
// debugImplementation because Applivery SDK should only run in debug builds.
debugImplementation("com.applivery:applivery-sdk:${latestVersion}")Applivery SDK exclusion in release builds may require complex source set configuration. To ease this scenario we also publish a no-op artifact with the same public API as the SDK so you do not have to make any changes in your code rather than including it as dependency in the compile configurations you do not want Applivery SDK to run.
releaseImplementation("com.applivery:applivery-sdk-no-op:${latestVersion}")This approach lets you call Applivery SDK methods throughout your codebase without affecting release builds.
Call Applivery.start() method whenever you want to start Applivery SDK, typically in your
Application.onCreate() method:
import com.applivery.android.sdk.Applivery
import com.applivery.android.sdk.start
...
Applivery.start(APPLIVERY_TOKEN)For private Applivery instances, tenants can be configured passing it as parameter in the
Applivery.start() method:
import com.applivery.android.sdk.Applivery
import com.applivery.android.sdk.start
...
Applivery.start(APPLIVERY_TOKEN, TENANT)An optional Configuration class can be passed in Applivery.start() method to configure
certain SDK behavior.
val configuration = Configuration(
postponeDurations = listOf(
2.hours,
30.minutes,
5.minutes,
),
enforceAuthentication = false,
downloadAction = BuildDownloadAction.IMMEDIATE
)postponeDurations: List of postponing options to be shown in the dialog when an update is
available.
enforceAuthentication: If set to true and Require authentication option is enabled in the
Dashboard, users will be forced to login into Applivery before using the SDK. Set it to false
(default) to allow users to cancel the login process.
downloadAction: Defines what action to take once an update is downloaded. Possible values are:
IMMEDIATE: The update will be installed as soon as the download is complete.DEFERRED: The installation will be deferred until the user decides to install it (A notification with Install action will be shown once the download is finished).
For Java users (version 4.0.0+), use the AppliveryInterop class to access the SDK functionality.
After initializing the SDK, check for available updates by calling:
import com.applivery.android.sdk.Applivery
import com.applivery.android.sdk.getInstance
...
Applivery.getInstance().checkForUpdates()This will verify if there are newer versions of your app available on Applivery and prompt users to update if needed.
Everytime checkForUpdates() is called, a prompt dialog will show up to the user if there are
updates available. This dialog showing logic can be customized in order for users to allow
postponing the update passing your postponing options to the Configuration object in the SDK
initialization method.
NOTE: only up to three options are supported. If you pass more than three options, the first ones will be used.
Applivery SDK requires certain permissions to function properly. You need to request these permissions in your app:
- POST_NOTIFICATIONS: Used to display ongoing notifications during update downloads and screen recording.
- READ_MEDIA_IMAGES: Required to detect screenshots for the feedback feature.
- SYSTEM_ALERT_WINDOW: Required for screen recording feedback report.
Note: On Android 14+, users can grant partial access to media files. For screenshot detection to work properly, Applivery needs full access. Follow the official documentation for properly requesting these permissions.
The SDK provides several methods to control the update experience:
Manually check for updates:
// Manually check for available updates
Applivery.getInstance().checkForUpdates()
// Enable automatic update checks when app returns from background
Applivery.getInstance().setCheckForUpdatesBackground(true)Handle updates download without installing them immediately:
val downloadCallback = object : DownloadLastUpdateCallback {
override fun onSuccess(update: CachedAppUpdate) {
//Update is downloaded and cached, now you can install it manually
update.install()
}
override fun onError(error: Throwable) {
//Handle error
}
}
// Download the latest update without installing it
Applivery.getInstance().downloadLastUpdate(downloadCallback)
// Enable automatic download of the latest update when app returns from background
Applivery.getInstance().enableDownloadLastUpdateBackground(downloadCallback)NOTE: enableDownloadLastUpdateBackground and setCheckForUpdatesBackground are mutually exclusive. Only one of them can be enabled at the same time so enabling one will disable the other.
Trigger immediate download of the latest version.
// Installation behavior will follow the configured
// downloadAction in the SDK Configuration.
Applivery.getInstance().update()Applivery offers two ways for users to submit feedback:
You can enable or disable the screenshot feedback by using the following methods:
Applivery.getInstance().enableScreenshotFeedback()
Applivery.getInstance().disableScreenshotFeedback()and the feedback event by using:
Applivery.getInstance().feedbackEvent()where behavior is one of the following:
-
Take Screenshot: Captures a screenshot and then opens the feedback form with the image attached. -
Record Screen: Records a video of the screen and then opens the feedback form with the recording attached.
Track users in the Applivery platform:
// Associate a user with the current app session
Applivery.getInstance().bindUser(email, firstName, lastName, tags)
// Remove user association
Applivery.getInstance().unbindUser()
// Retrieve the current user profile
Applivery.getInstance().getUser(getUserCallback)Create a custom applivery.xml file in your `res/values folder to override default colors and
strings:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!--Main colors-->
<color name="applivery_primary_color">#FF0241E3</color>
<color name="applivery_accent_color">#FF0241E3</color>
<color name="applivery_foreground_color">#FF010258</color>
<!--Update texts-->
<string name="appliveryUpdateMsg">There is a new version available for download. Do you want to
update to the latest version?
</string>
<string name="appliveryMustUpdateAppLocked">Sorry this App is outdated. Please, update the App
to continue using it
</string>
<!--Login prompt texts-->
<string name="appliveryLogin">Login</string>
<string name="appliveryLoginRequiredText">Please log-in before using this app</string>
</resources>res/values/applivery.xml
For a complete implementation example, check our sample app.
If you encounter issues implementing the SDK:
- Verify you're using the latest SDK version
- Ensure your APP TOKEN is correct
- Check that permissions are properly requested in your app
- Review Android logcat for Applivery-related logs
For additional assistance:
- Visit Applivery Documentation
- Open an issue on GitHub
- Contact Applivery Support support@applivery.com