SDK Version: 8.1.5
implementation 'com.salesforce.marketingcloud:marketingcloudsdk:8.1.5'
Issue: when setting the profileId the value is not synchronized with the SF backend. Furthermore, it seems like the device is not registered on the SF console at all, we can't reach it with notifications.
fun registerUserToSalesForce(salesForceId: String?) { salesForceId ?: return SFMCSdk.requestSdk { sdk -> sdk.identity.setProfileId(salesForceId) } } Other issues we found:
fun registerUserToSalesForce(salesForceId: String?) { salesForceId ?: return SFMCSdk.requestSdk { sdk -> sdk.identity.setProfileId(salesForceId) sdk.mp { --> the code never enters here it.moduleIdentity.profileId } --> the map object returned here is not the one from the documentation at all https://salesforce-marketingcloud.github.io/MarketingCloudSDK-Android/trouble-shooting/trouble-shooting-push-setup.html (sdk.getSdkState()["PUSH"] as JSONObject).let { Timber.d("this") } } }
sdk.mp { }code then the Marketing Cloud SDK did not successfully complete initialization. Turn on logging and look at logcat. The SDK is very good at telling you what you've done wrong. If that fails, open a support case -- but know that the first thing you're going to be asked for is logs so you might as well give it a go ;)SFMCSdkModuleConfig.build { SFMCSdkModuleConfig.build { pushModuleConfig = MarketingCloudConfig.builder().apply { [...] } } }Notice the doubleSFMCSdkModuleConfig.build. The SDK wouldn't log any error nor the compiler would, but then it wouldn't work at runtime. My bad for the mistake, but I'd expect at least some compiling error. Thanks for your help @BillMoteInitializing 0 modules, but yeah, that's not going to be an obvious issue to a customer. I'll present this to the team and maybe we'll beef up the logging around that.