From 4b1283e0984f2f49869aacfc05d6c6674f3eda0c Mon Sep 17 00:00:00 2001 From: pandeymangg Date: Wed, 5 Aug 2026 20:48:24 +0530 Subject: [PATCH 1/3] fix: default onFinished() so WebAppCallback stays source-compatible MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit WebAppCallback is public with no visibility modifier, so adding an abstract member would stop any existing implementor from compiling — turning an additive change into a breaking one and forcing a major release. Only the SDK implements it today, but a default body costs nothing and keeps this a minor. --- .../com/formbricks/android/webview/WebAppInterface.kt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/android/src/main/java/com/formbricks/android/webview/WebAppInterface.kt b/android/src/main/java/com/formbricks/android/webview/WebAppInterface.kt index 76a4c8b..39f4992 100644 --- a/android/src/main/java/com/formbricks/android/webview/WebAppInterface.kt +++ b/android/src/main/java/com/formbricks/android/webview/WebAppInterface.kt @@ -14,7 +14,13 @@ class WebAppInterface(private val callback: WebAppCallback?) { fun onClose() fun onDisplayCreated() fun onResponseCreated() - fun onFinished() + + /** + * Defaulted rather than abstract: [WebAppCallback] is public, so adding an abstract + * member would stop any existing implementor from compiling. Only the SDK implements + * this today, but that would make an additive change a breaking one. + */ + fun onFinished() {} fun onFilePick(data: FileUploadData) fun onSurveyLibraryLoadError() } From 74378f98086a02923d1e2e91f34be4699d6d150d Mon Sep 17 00:00:00 2001 From: pandeymangg Date: Wed, 5 Aug 2026 21:06:54 +0530 Subject: [PATCH 2/3] chore: bump to 2.1.0 --- README.md | 2 +- android/build.gradle.kts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index ed51408..438a6e5 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ repositories { } dependencies { - implementation("com.formbricks:android:2.0.0") // replace with latest version + implementation("com.formbricks:android:2.1.0") // replace with latest version } ``` diff --git a/android/build.gradle.kts b/android/build.gradle.kts index ba3bf55..9622652 100644 --- a/android/build.gradle.kts +++ b/android/build.gradle.kts @@ -11,7 +11,7 @@ plugins { id("org.sonarqube") version "4.4.1.3373" } -version = "2.0.0" +version = "2.1.0" val groupId = "com.formbricks" val artifactId = "android" From 90d5de3736893abc49b3b66f15f75561dbf5e3b0 Mon Sep 17 00:00:00 2001 From: pandeymangg Date: Thu, 6 Aug 2026 10:07:36 +0530 Subject: [PATCH 3/3] fix: satisfy kotlin:S1186 on the defaulted onFinished() Sonar wants the explanation nested inside the braces; a KDoc block above the declaration does not count. Kept the KDoc for why the default exists and added a body comment for why it is empty. --- .../java/com/formbricks/android/webview/WebAppInterface.kt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/android/src/main/java/com/formbricks/android/webview/WebAppInterface.kt b/android/src/main/java/com/formbricks/android/webview/WebAppInterface.kt index 39f4992..8f6d196 100644 --- a/android/src/main/java/com/formbricks/android/webview/WebAppInterface.kt +++ b/android/src/main/java/com/formbricks/android/webview/WebAppInterface.kt @@ -20,7 +20,10 @@ class WebAppInterface(private val callback: WebAppCallback?) { * member would stop any existing implementor from compiling. Only the SDK implements * this today, but that would make an additive change a breaking one. */ - fun onFinished() {} + fun onFinished() { + // Intentionally empty. The default exists so implementors that predate this + // callback keep compiling; FormbricksFragment overrides it to do the real work. + } fun onFilePick(data: FileUploadData) fun onSurveyLibraryLoadError() }