0

My app is receiving push messages but is unable to receive in-app messages. I have implemented SFMC SDK from here.

I have set delay registration until contactkey is set to true.Followed the salesforce demo github project. Inapp message are being sent from MC but my app is not receiving it.

Here is my SDK state:

   2023-01-23 19:59:44.390 8364-8364/com.capty.wedbox I/~#SdkState: initConfig: MarketingCloudConfig(applicationId=**********, accessToken=**********, senderId=null, marketingCloudServerUrl=https://mcywc37f654knfqm53-qhdmyt8y4.device.marketingcloudapis.com/, mid=****, analyticsEnabled=false, geofencingEnabled=false, inboxEnabled=false, piAnalyticsEnabled=false, proximityEnabled=false, markMessageReadOnInboxNotificationOpen=true, delayRegistrationUntilContactKeyIsSet=true, useLegacyPiIdentifier=true, notificationCustomizationOptions={smallIconResId=2131165724, launchIntentProvider=com.capty.wedbox.ui.main_activity.MainActivity$$ExternalSyntheticLambda7, channelIdProvider=com.capty.wedbox.ui.main_activity.MainActivity$$ExternalSyntheticLambda6}, proximityNotificationCustomizationOptions=null, urlHandler=com.capty.wedbox.ui.main_activity.MainActivity$$ExternalSyntheticLambda5@90e33ba, appPackageName=com.capty.wedbox, appVersionName=1.7.17, predictiveIntelligenceServerUrl=************)
2023-01-23 19:59:44.392 8364-8364/com.capty.wedbox I/~#SdkState: initStatus: InitializationStatus(status=SUCCESS, unrecoverableException=null, locationsError=false, playServicesStatus=-1, playServicesMessage=null, encryptionChanged=false, storageError=false, proximityError=false, messagingPermissionError=false, sslProviderEnablementError=false, initializedComponents=[BehaviorManager, LifecycleManager, RequestManager, AlarmScheduler, SyncRoute, ControlChannel, ConfigComponent, LocationManager, ProximityManager, AnalyticsManager, InboxMessageManager, NotificationManager, RegionMessageManager, PushMessageManager, RegistrationManager, InAppMessageManager, Event], isUsable=true)
2023-01-23 19:59:44.395 8364-8364/com.capty.wedbox I/~#SdkState: PushMessageManager: {
      "pushEnabled": true,
      "pushPermissionsAllowed": true,
      "debugInfo": {
        "senderId": null,
        "deviceToken": "**********************",
        "firebaseApps": [
          "FirebaseApp{name=[DEFAULT], options=FirebaseOptions{applicationId=1:****:android:****, apiKey=***********, databaseUrl=https:\/\/project-7634974512462640080.firebaseio.com, gcmSenderId=******, storageBucket=project-7634974512462640080.appspot.com, projectId=project-7634974512462640080}}"
        ],
        "c2dmReceiver": [
          {
            "name": "com.google.firebase.iid.FirebaseInstanceIdReceiver",
            "priority": 0
          }
        ],
        "instanceIdService": [],
        "messagingService": [
          {
            "name": "com.salesforce.marketingcloud.messages.push.MCFirebaseMessagingService",
            "priority": -1
          },
          {
            "name": "com.google.firebase.messaging.FirebaseMessagingService",
            "priority": -500
          }
        ]
      }
    }
2023-01-23 19:59:44.398 8364-8364/com.capty.wedbox I/~#SdkState: RegistrationManager: {
      "current_registration": {
        "deviceID": "************",
        "device_Token": "***************",
        "sdk_Version": "8.0.7",
        "app_Version": "1.7.17 : 300",
        "dST": false,
        "location_Enabled": false,
        "proximity_Enabled": false,
        "platform_Version": "12",
        "push_Enabled": true,
        "timeZone": "21600",
        "subscriberKey": "**[email protected]",
        "platform": "Android",
        "hwid": "Google sdk_gphone64_x86_64",
        "etAppId": "************",
        "locale": "en_US",
        "tags": [
          "ALL",
          "Android",
          "DEBUG"
        ],
        "attributes": [
          {
            "key": "EmailAddress",
            "value": "****[email protected]"
          },
          {
            "key": "External_ID",
            "value": "**********"
          },
          {
            "key": "First Name",
            "value": "****"
          },
          {
            "key": "Last Name",
            "value": "Zobaer"
          }
        ]
      },
      "last_sent_timestamp": "2023-01-23T13:52:29.947Z"
    }
2023-01-23 19:59:44.401 8364-8364/com.capty.wedbox I/~#SdkState: InAppMessageManager: {
      "messages": [],
      "subscriberToken": "*******",
      "custom_font_set": false,
      "status_bar_color": 0
    }
2023-01-23 19:59:44.403 8364-8364/com.capty.wedbox I/~#SdkState: InApp Messages: []
2023-01-23 19:59:44.406 8364-8364/com.capty.wedbox I/~#SdkState: InApp Events: {
      "triggers": []
    }

1 Answer 1

0

The SDK state you provided shows that no messages have been sent to this device. You need to check your audience list/data extension on the server.

InAppMessageManager: {
      "messages": [],
      "subscriberToken": "*******",
      "custom_font_set": false,
      "status_bar_color": 0
    }
4
  • I have checked the data extension on MC , Device id is okay but contactId is null in the marketing cloud(for the same user contactId has a value in salesforce ), salesforce.stackexchange.com/questions/347737/… according to this link - In order to receive InApp Messages, you need to set a Contact Key." so how can I make sure that both in salesforce and MC contactID can be same? Jan 24, 2023 at 7:25
  • Set the contactKey with the SDK in your application.
    – Bill Mote
    Jan 24, 2023 at 17:05
  • 1
    Thank you, By setting delay registration until contactkey is set to true and Setting the contactKey with the SDK solved my issue. Jan 26, 2023 at 5:05
  • Delaying registration isn't required. Setting the contactKey is what fixed the issue. Either way, glad you're working.
    – Bill Mote
    Jan 26, 2023 at 13:00

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .