1

According to the documentation http://salesforce-marketingcloud.github.io/JB4A-SDK-Android/trouble-shooting/multiple-push-sdks.html We can use the following method to know if a push was from ExactTarget or from any other provider.

PushMessageManager.isMarketingCloudPush(bundle)

But in the latest SDK (5.4.2), this method has been moved from this interface and obfuscated into another class.

salesforce.marketingcloud.messages.push.a.a(bundle) 

Why this is not available publicly any more? and what's the alternative method? I can of course use the source in my own code like

public static boolean isMarketingCloudPush(@NonNull Bundle bundle) {
        return bundle != null && (bundle.containsKey("_m") || bundle.containsKey("_nodes"));
    }

but would be nice if SDK provides the method itself.

1

There was a refactor to that class in the 5.4.x release and that method was missed as being part of the public interface. I will log a bug to get that corrected, but in the meantime, you can just do the bundle.containsKey("_m") check before passing the Bundle into the PushMessageManager.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.