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 v5.0 (API 21) and higher versions. However it will build properly from Android 4.1 (API 16) but the with limited functionality.
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.
Add the following repository to your's root gradle:
allprojects {
repositories {
maven { url "https://jitpack.io" }
}
}
Add the following dependency to your app gradle:
implementation 'com.github.Applivery:applivery-android-sdk:${latestVersion}'
add the following dependency to your app gradle:
implementation 'com.applivery:applivery-sdk:${latestVersion}'
At your application startup, in a class extending from Application
, you must call the Applivery.init()
method:
class AppliveryApplication : Application() {
override fun onCreate() {
super.onCreate()
if (BuildConfig.BUILD_TYPE != "release") {
Applivery.init(this, BuildConfig.APPLIVERY_APP_TOKEN)
}
}
}
This method is intended to initialize the Applivery SDK. The only thing you have to take care about is that this call MUST be performed in App's onCreate()
Method.
IMPORTANT: Don't init Applivery on release
builds
Once initialized the SDK and once your App is stable in the Home Screen you have to call proactivelly the following method in order to check for new updates:
Applivery.checkForUpdates()
- app: Your app instance.
- appToken: Your app token from applivery dashboard
You will find that the following public methods are available:
Manually check for updates:
Applivery.checkForUpdates()
Check for updates when coming from background
Applivery.setCheckForUpdatesBackground(true)
Start the download of the last app version:
Applivery.update()
Versions up to 3.5.1 contains a FileProvider needed to support in-app updates. This FileProvider builds its authorities by using the host app package name plus ".fileprovider" literal, giving us something like "com.foo.bar.fileprovider". If you are using another FileProvider in your app, check that its authorities are not conflicting with the SDK's ones, if so please change it to avoid issues.
Versions 3.5.2 and above do not have this limitation.
You can either take a screenshot or shake your phone if you want to send activate the Feedback Reproting feature
You can enable or disable the screenshot feedback by using the following methods:
Applivery.enableScreenshotFeedback();
Applivery.disableScreenshotFeedback();
... and the shake event by using:
Applivery.enableShakeFeedback();
Applivery.disableShakeFeedback();
Programatically login a user in Applivery, for example if the app has a custom login and don't want to use Applivery's authentication to track the user in the platform
Applivery.bindUser(@NonNull String email, @Nullable String firstName,
@Nullable String lastName, @Nullable Collection<String> tags);
Logout a previously binded user
Applivery.unbindUser();
This public method returns the user profile from Applivery API. It will be required that the user has previously logged in or has been bound to the platform through the `bindUser() method. In case it does not exist it will return an unauthorized error.
Applivery.getUser(@NonNull GetUserCallback getUserCallback);
In order to customize the appearance of the UI, you can make a new resource file called applivery.xml
under your res/values
folder overwriting the Applivery default attributes.
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="applivery_primary_color">#ffbb33</color>
<color name="applivery_secondary_color">#ffffff</color>
<color name="applivery_primary_font_color">#ffffff</color>
<color name="applivery_secondary_font_color">#444444</color>
<color name="applivery_drawing_color">#ffbb33</color>
<string name="appliveryUpdate">Update!</string>
<string name="appliveryUpdateMsg">There is a new version available for downloadInfo! Do you want to update to the latest version?</string>
<string name="appliveryMustUpdateAppLocked">You must update.</string>
<string name="appliveryLoginFailDielogTitle">Invalid credentials</string>
<string name="appliveryLoginFailDielogText">The email or password you entered is not valid</string>
</resources>
res/values/applivery.xml
You can also override the following drawable resources:
- Feedback tab indicator (should be provided as a 9patch png):
applivery_selected_tab_button - Feedback close button:
applivery_close
applivery_close_pressed - Feedback done button:
applivery_done
applivery_done_pressed - Feedback send button:
applivery_send
applivery_send_pressed
As a sample integration you can take a look at our sample app
We would like to mention every open source lib authors:
- Thank's to Square, we are using several libs they developed (Retrofit 2, OkHttp).
- Thank's to Google, and Android Dev team, obviously, Android SDK, Support Libs ...
- Thank's to Karumi for his great contributions to developers community in general. We are using Dexter from Karumi as well.
Copyright (C) 2020 Applivery
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.