allboatsrise / expo-marketingcloudsdk

Expo module for Salesforce Marketing Cloud SDK
MIT License
12 stars 12 forks source link

addInboxResponseListener not working #34

Closed lucasoliveirabhs closed 4 months ago

lucasoliveirabhs commented 7 months ago

Hi, I'm trying to retrieve the payload of a received push, but the addInboxResponseListener listener doesn't work, it simply doesn't log any information when the push is received

inboxEnabled is set to true

andrejpavlovic commented 7 months ago

expo version? @allboatsrise/expo-marketingcloudsdk version?

Please copy/paste config. It's inboxEnabled, not inboxEnable.

lucasoliveirabhs commented 7 months ago

expo version? @allboatsrise/expo-marketingcloudsdk version?

Please copy/paste config. It's inboxEnabled, not inboxEnable.

Sorry, in app.json, inboxEnabled is correct, but even so, I can't see the payload of messages either through getMessages or through addInboxResponseListener.

I'm using the version "@allboatsrise/expo-marketingcloudsdk": "^49.0.1",

andrejpavlovic commented 7 months ago

iOS or Android?

Anyway, I'm not really going to be able to help you with this, since I've moved onto v50 a while ago.

If you update to latest version, I could have another look.

lucasoliveirabhs commented 7 months ago

both, android and ios. I'll update

lucasoliveirabhs commented 7 months ago

I updated and I still have the same problem

andrejpavlovic commented 7 months ago

You need to call MarketingCloud.refreshInbox() I think

andrejpavlovic commented 7 months ago

It should also trigger automatically whenever you put the app into background and then back into foreground. Inbox is checked automatically any time you bring the app into foreground.

lucasoliveirabhs commented 7 months ago

I noticed that the expo listeners (addNotificationReceivedListener, addNotificationResponseReceivedListener) also don't work when a message is sent from salesforce, only on Android, but sending from https://expo.dev/notifications works.

andrejpavlovic commented 4 months ago

Marked as stale, closing.