Installation
How to add the Fruga Relay SDK to an Android app. Covers the platform floors, the hard Android System WebView requirement, the Gradle dependency, permissions, and the ProGuard/R8 rules a minified build needs.
Requirements
| Requirement | Value |
|---|---|
minSdk | 29 (Android 10) |
compileSdk / targetCompatibility | 35 / Java 17 |
| Toolchain | AGP 8.13.2, Kotlin 2.2.21, Gradle 8.14.5, JDK 17 |
| Android System WebView | Chromium 111 or newer |
The WebView floor is hard
Relay is a WebView that renders Fruga’s shell page, and that page is built with modern CSS — cascade layers, oklch colours — so Chromium 111 is a hard minimum. This is not downlevelled for older devices.
FrugaRelayFragment checks the installed WebView version before it creates a WebView, and fails closed. If WebView is older than 111, or the version cannot be determined at all, no WebView is created. The screen shows one centred native message instead:
Your Android System WebView (110) is not supported. Minimum supported: 111.
and UNSUPPORTED_ENGINE (non-recoverable) is reported once per screen. There is no code-side fix: the WebView has to be updated through the Play Store.
Real devices are normally far above the floor, because WebView updates through the Play Store independently of the OS. Old emulator images are the common exception — see Emulator images.
WebView is created, you will never see a blank screen or a half-rendered widget on an unsupported engine. The unsupported-engine message is deliberate and is the only thing that screen will ever show.Install
Add the JitPack repository to your root settings.gradle.kts:
// settings.gradle.kts
dependencyResolutionManagement {
repositories {
google()
mavenCentral()
maven { url = uri("https://jitpack.io") }
}
}
Then declare the dependency:
// app/build.gradle.kts
dependencies {
implementation("uk.co.fruga:relay:<version>")
}
That is the whole integration. The library ships as a single Android library module — uk.co.fruga:relay, Kotlin package uk.co.fruga.relay.
Permissions
No manifest changes are required. The library manifest declares INTERNET and ACCESS_NETWORK_STATE, and both merge into your app automatically:
<!-- Declared by the library manifest; merged into your app. -->
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
ProGuard / R8
The library ships no consumer R8 rules, so minified builds must add these by hand. If you do not, the JSON bridge breaks at runtime — messages are silently dropped, and you get a screen that renders but never reports anything.
-keepclassmembers class uk.co.fruga.relay.FrugaAndroid {
@android.webkit.JavascriptInterface <methods>;
}
-keepattributes *Annotation*, InnerClasses
-keepclasseswithmembers class uk.co.fruga.relay.** {
kotlinx.serialization.KSerializer serializer(...);
}
-keepclassmembers class uk.co.fruga.relay.** {
*** Companion;
}
Emulator images
The plain google_apis API 30 image ships WebView 83, which is below the floor — you will get the unsupported-engine screen instead of the widget.
Use a google_apis_playstore API 34 or 35 image, and update the Play Store app itself first so WebView can update through it. Then confirm the version under Play Store → Settings → About before concluding anything is wrong.