diff --git a/NATIVEMESSAGE_GUIDE.md b/NATIVEMESSAGE_GUIDE.md index 32097925c..16408065c 100644 --- a/NATIVEMESSAGE_GUIDE.md +++ b/NATIVEMESSAGE_GUIDE.md @@ -1,4 +1,18 @@ # The Nativemessage + +> **Note: this feature is currently not functional on Android.** +> +> Since **7.12.0**, when the SDK's internals moved to `mobile-core`, nothing in the library +> invokes `SpClient.onNativeMessageReady`. `SpConsentLibImpl` — the only class that called it — +> was removed, and `SpConsentLibMobileCore` renders every message through `SPConsentWebView`. +> `MessageType` has no native variant, so a property configured with a native message is +> rendered as a web message instead, with no callback and no error. +> +> The last release in which the callback was invoked is **7.11.2**. The equivalent iOS API, +> `onSPNativeMessageReady`, is unaffected. +> +> The rest of this guide is kept for reference and for anyone on 7.11.2 or earlier. + ## Table of Contents - [Intro](#intro) - [Configure a property to use with the Nativemessage](#configure-a-property-to-use-with-the-nativemessage) diff --git a/cmplibrary/src/main/java/com/sourcepoint/cmplibrary/SpClient.kt b/cmplibrary/src/main/java/com/sourcepoint/cmplibrary/SpClient.kt index 8b92ee40e..98587f8cb 100644 --- a/cmplibrary/src/main/java/com/sourcepoint/cmplibrary/SpClient.kt +++ b/cmplibrary/src/main/java/com/sourcepoint/cmplibrary/SpClient.kt @@ -14,8 +14,13 @@ interface SpClient { fun onUIReady(view: View) /** - * It is invoked when the message is available to the client App + * It is invoked when the message is available to the client App. + * + * Currently this callback is disabled. Since 7.12.0 every message is rendered through + * `SPConsentWebView`, and no code path in the library reaches this callback. See + * NATIVEMESSAGE_GUIDE.md. */ + @Deprecated("Currently this callback is disabled. Since 7.12.0 the SDK renders every message through SPConsentWebView and no code path reaches this callback. See NATIVEMESSAGE_GUIDE.md.") fun onNativeMessageReady(message: MessageStructure, messageController: NativeMessageController) {} @Deprecated("onMessageReady callback will be removed in favor of onMessageReady(message: MessageStructure, messageController: NativeMessageController). Currently this callback is disabled.")