chat-sdk-android icon indicating copy to clipboard operation
chat-sdk-android copied to clipboard

Push Notifications do not contain Extras

Open Mithrandir21 opened this issue 8 years ago • 3 comments

I am trying to receive the Push notifications in another activity in the application.

When the app is in the background, I receive Push Notification with the correct visual data. But when I open click on it and open the app, I am missing the necessary data to be able to redirect with the help of the OpenFromPushChecker. Specifically, the extra in the intent does not contain BaseInterfaceAdapter.THREAD_ENTITY_ID, Defines.FROM_PUSH, Defines.MSG_TIMESTAMP. Therefore the open from push checker fails.

I believe it might have something to do with the work done in the MessagingService.

Mithrandir21 avatar Feb 24 '18 00:02 Mithrandir21

I believe I have found the cause of the issue. Somewhat surprising.

It looks like the notification is created in the private Completable pushToChannel(...) in the FirebasePushHandler. But as the source code shows, the fields checked for in the OpenFromPushChecker are not added to the data. Therefore the check will fail.

Is this a mistake in the FirebasePushHandler? Is this a mistake in the OpenFromPushChecker? Am I seeing it wrong?

Mithrandir21 avatar Feb 24 '18 23:02 Mithrandir21

is this solved?

kaplandroid avatar Apr 05 '18 19:04 kaplandroid

It seems to have been added to the FirebasePushHandler in the repo, but not in the latest released lib.

Mithrandir21 avatar Apr 06 '18 15:04 Mithrandir21