parley-messaging / android-library

Parley Android app library
MIT License
3 stars 3 forks source link

App does not receive new messages #38

Closed mennovogel closed 2 months ago

mennovogel commented 2 months ago

Hi,

I'm trying to implement this SDK in our app, but I'm running into an issue. I don't receive any messages within the app from the helpdesk after opening the chat screen. Only when I re-open the chat screen I see the new messages. I would expect these messages to be loaded on the chat screen within a few seconds without any interaction of the user.

I see that the iOS SDK has a polling mechanism to load the messages (https://github.com/parley-messaging/ios-library/blob/master/Sources/Parley/PollingService.swift), I don't see anything similar in the Android SDK. If I check the network traffic, I also don't see any api calls being performed to check the new messages.

Or should everything work via Firebase Messaging?

Thanks

alexkok commented 2 months ago

Hi @mennovogel,

So yeah in short, Android relies on Firebase messaging (or any push type) to do this. Unlike iOS, the Android library doesn't have polling implemented. Simply because it is not needed for the realtime the chat in Android.

Please make sure to have Firebase Messaging implemented, and configured as described in the Readme. That will make the messages appear as you would expect.