Applivery Android SDK
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
applvsdklib
documentation
downloads
gradle
sample
.gitignore
.travis.yml
LICENSE
README.md
bintrayv1.gradle
build.gradle
checkstyle.xml
contributors.txt
gradle.properties
gradlew
gradlew.bat
icon.png
maven_push.gradle
sample_keys.properties
settings.gradle

README.md

Applivery Logo

Download Language MinSDK Twitter

Quality checks

Build Status codecov.io

Framework to support Applivery.com Mobile App distribution for Android Apps.

Table of Contents

Overview

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.

Features

  • 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.

Getting Started

First of all, you should create an account on Applivery.com and then add a new Application.

Get your credentials

SDK API KEY: that identifies and grants access to your account in order to use the SDK.

You can get your SDK API KEY in the Developers section (left side menu).

Developers section

APP ID: Is your application identifier. You can find it in the App details, going to Applications -> Click desired App -> (i) Box

APP ID

SDK Installation

Gradle with jCenter dependency

Download

implementation 'com.applivery:applvsdklib:2.6.3'

Gradle with JitPack Maven dependency

Add the following repository to your's root gradle:

  allprojects {
    repositories {
      ...
      maven { url "https://jitpack.io" }
    }
  }

Add the following dependency to your app gradle:

  dependencies {
    compile 'com.github.Applivery:applivery-android-sdk:v2.6.4'
  }

Gradle with Nexus/MavenCentral dependency

Maven Central

add the following dependency to your app gradle:

 compile 'com.applivery:applivery-android-sdk:1.1.0'

Downloading source code

Dowload the zip called Zipped SDK from downloads folder.

Unzip all the content at the same level of your "app" folder.

FILES

Go to settings.gradle file:

Settings

And include your new module as follows:

include ':app', ':applvsdklib'

Now include this line into your app folder buld.gradle dependencies

compile project(":applvsdklib")

Downloading aar package as a lib

Dowload the zip aar called aar SDK from downloads folder. Now you can import a local aar file using the File --> New --> New Module -->Import .JAR/.AAR Package option in Android Studio and add this dependency to your app build.gradle in this way:

 compile project(":applvsdklib")

Do not forget that using this method you have to import the following libraries that Applivery SDK is using:

  compile 'com.android.support:appcompat-v7:23.1.1'
  compile 'com.squareup.retrofit2:retrofit:2.0.0'
  compile 'com.squareup.retrofit2:converter-gson:2.0.0'
  compile 'com.squareup.okhttp3:logging-interceptor:3.2.0'
  compile 'com.google.code.gson:gson:2.6.2'
  compile 'com.karumi:dexter:5.0.0'

SDK Setup

Step 1

At your application startup, in a class extending from Application, you must call the init method:

public class AppliveryApplication extends Application{
    @Override public void onCreate() {
      super.onCreate();
      Applivery.init(this, BuildConfig.APP_ID, BuildConfig.ACCOUNT_API_KEY, false);
      Applivery.setUpdateCheckingInterval(21600);
    }
}

After that make sure to call the following Applivery public methods:

Applivery.init(this, BuildConfig.APP_ID, BuildConfig.ACCOUNT_API_KEY, false);

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: As you can suspect, you should replace the strings ACCOUNT_API_KEY and APP_ID with you API Key and your App ID respectively. Easy! Don't you think so?

Step 2

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()

About params

  • app: Your app instance.
  • applicationId: Your application's ID
  • appClientToken: Your developer's Api Key
  • isStoreRelease: is the last param and the aim of this flag is to mark if the build will be submitted to Store. This is needed to prevent unwanted behavior like prompt to a final user that a new version is available on Applivery.com.
    • True: Applivery SDK will not trigger automatic updates anymore. Use this for Play Store
    • False: Applivery SDK will normally. Use this with builds distributed through Applivery.

The second call Applivery.setUpdateCheckingInterval(21600); indicates Applivery Sdk that the checking for new versions will be executed after 6 hours (21600 seconds) when the app will came back from background mode. Anyway if app is destroyed and app init method is called again the checking for new versions will be executed again.

Advanced concepts

Updates

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)

Disable check for updates during during a certain period of time

Applivery.setUpdateCheckingInterval(21600);

Feedback Reporting

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();

Styling the UI

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 download! 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

Sample App

As a sample integration you can take a look at: our sample app

Acknowledgements

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.

License

Copyright (C) 2018 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.