Beagle gRPC for Android

Here you will find the beagle-grpc-android library to help you use gRPC in a project using Beagle in Android. This lib will hold almost all necessary configuration to add gRPC into a Beagle Android project.


Before you start to configure Beagle for your Android system, it’s important to check out if you have installed all the current versions of the following programs: ‌

  • JDK 8+ language
  • Android API level: at least 19 or higher
  • Kotlin 1.3+

Getting started

This tutorial will configure Beagle from the Start.

Step 1: Add a configuration on the Gradle file in your project:

  • Add mavenCentral() into the All projects block on your Project Gradle file(build.gradle)
allprojects {
    repositories {

Step 2: Add Kotlin Kapt plugin and 3 dependencies on your application dependency manager (gradle.gradle)

Maven Central Maven Central

  • Add the packagingOptions code block to the build.gradle file, as in the example below.

  • The version numbers listed below may have been updated. Please check the actual versions on the tags above:

plugins {
    id ''
    id 'kotlin-android'
    id 'kotlin-kapt'

dependencies {
    implementation ""
    implementation ""

    kapt ""

Step 3: Create an AppHttpClientFactory

  • This class will be responsible to provide the HttpClient that will be used by Beagle to perform requests.
const val BASE_URL = "" // your gRPC host

class AppHttpClientFactory: HttpClientFactory {
    override fun create(): HttpClient {
        return GrpcClient(BASE_URL, HttpClientDefault())

Here, we are telling Beagle to use GrpcClient to perform network requests.

Let’s look to the constructor params of GrpcClient:

  • grpcAddress: Host of your gRPC server. Every request pointing to this host will be performed by GrpcClient.
  • customHttpClient: All requests made to another host will be performed by this HttpClient.

Therefore, a request to will be performed by GrpcClient and a request to another host, let’s say, will be performed by HttpClientDefault.

The HttpClientDefault implementation can be found at Beagle-Default lib.

For more on Beagle: Please check our Beagle repository.
For more on Beagle-Defaults: Please check our Beagle-Default documentation.