docs: mark onNativeMessageReady as not invoked since 7.12.0 - #887
Open
bschmalb-ksta wants to merge 1 commit into
Open
docs: mark onNativeMessageReady as not invoked since 7.12.0#887bschmalb-ksta wants to merge 1 commit into
bschmalb-ksta wants to merge 1 commit into
Conversation
`SpClient.onNativeMessageReady` is still declared, still documented in NATIVEMESSAGE_GUIDE.md and still described as current on docs.sourcepoint.com, but nothing in the library has invoked it since 7.12.0. Disassembling the published cmplibrary-7.15.10.aar with `javap -p -c` shows exactly eight SpClient callbacks invoked anywhere in the artifact: onSpFinished, onConsentReady, onUIReady, onUIFinished, onNoIntentActivitiesFound, onMessageInactivityTimeout, onError and onAction. onNativeMessageReady is not among them; it survives only as the interface declaration and a Kotlin default-implementation bridge with an empty body. NativeMessageController.sendConsent ships with no implementations. 7.15.13 is identical. In the repository, call sites under cmplibrary/src/main number three at v7.11.2 and zero at v7.12.0 and every tag since, when c6c977e deleted SpConsentLibImpl.kt as part of the mobile-core integration. Configuration does not reach it either: MessageType has no native variant and fromMessageSubCategory maps NoticeNative to MOBILE, so a property configured for a native message is rendered by SPConsentWebView with no callback and no error. This adds a deprecation notice matching the wording already used on the neighbouring onMessageReady callback, and a note at the top of the guide. It changes no behaviour.
Contributor
|
Hi Bastian, native messaging is not supported anymore since we switched to SDK version > 7. We only support the WebView approach going forward, so you'll need to adjust your implementation accordingly. There's also a Flutter bridge maintained by a client's dev, available here: https://github.com/thekorn/sourcepoint_unified_cmp/ |
Author
|
Thanks, that's the confirmation we needed — we're on the WebView approach already. Two questions:
Separately: the guide and the Native App Messages pages still present native messaging as current — that's what cost us the time here. A short note there would spare the next integrator the same detour. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hello — we are a Sourcepoint customer integrating the Android SDK in a new Flutter app. We evaluated rendering the first consent layer in our own UI via the native message API, spent a fair amount of time on it, and eventually concluded that the callback is never invoked. This PR records that so the next person does not repeat the exercise.
This changes no behaviour. It adds a deprecation notice and a note in the guide.
If we have this wrong, please close it and tell us what we missed — we would genuinely rather be wrong here, and we will happily adopt the feature if there is a configuration we have not found.
What we found
SpClient.onNativeMessageReadyis declared, documented inNATIVEMESSAGE_GUIDE.md, and described as current on docs.sourcepoint.com, but nothing in the shipped library calls it.From the published artifact. We pulled
cmplibrary-7.15.10.aarfrom Maven Central, verified the checksum, and disassembled all 245 classes withjavap -p -c. Exactly eightSpClientcallbacks are invoked anywhere in the artifact:onNativeMessageReadyis not among them. It exists only as the interface declaration plus a Kotlin default-implementation bridge whose body is two null checks and a return. No reflective dispatch.NativeMessageController.sendConsentships with no implementations. 7.15.13 is identical.From this repository. Call sites under
cmplibrary/src/main:SpConsentLibImpl.kt)c6c977ecdeletedSpConsentLibImpl.kt, the only class that invoked it, as part of the mobile-core integration in #846.1f382ac2removednat-message-demofromsettings.gradle.Configuration does not reach it either.
MessageTypehas onlyMOBILE,OTTandLEGACY_OTT, andMessageType.fromMessageSubCategorymaps everything outside the three OTT subcategories — includingNoticeNative— toMOBILE. The onlySPMessageUIimplementor in the artifact isSPConsentWebView. So a property configured for a native message is rendered as a web message, with no callback and no error.iOS is unaffected:
onSPNativeMessageReadyis still wired inios-cmp-appat 7.12.10.Why a PR rather than an issue
Issues are disabled on this repository, so there was no other way to raise it.
Notes for review
onMessageReadycallback ("Currently this callback is disabled").@Deprecatedwill produce warnings for integrators who still override the method. That is the intent — since 7.15.3 the method has a no-op default body, so there is currently no signal at all that an override is dead code. If your build treats warnings as errors and this is inconvenient, we are happy to reduce it to a KDoc note only.