Comments (6)
Hello,
Thanks for the report, do you confirm that you already DO receive push notification and call consumeReceivedRemoteNotification
, if you add some logging before this call for example you can see the notification?
What is the return value of consumeReceivedRemoteNotification
in this case?
In which state are you, is the app closed, opened ? is the chat opened ?
Did you implement Dimelo.BasicNotificationDisplayer
or Dimelo.NotificationDisplayer
?
The most probably cause is that the user identifier or installation id in the notification is not the same as in the app (last message in the chat sent as a different user). Is the notification you're testing received on the same instance and for the same user which wrote the last chat message?
from engage-digital-messaging-android.
I receive intent of notification and call consumeReceivedRemoteNotification
, it returns false, at that moment app is opened, but chat is not opened.
I use own implementation of BasicNotificationDisplayer
, but I override only createPendingIntent
and this method is not called when I try to handle notification.
I test the app on the same instance and with the same user. Whether it is possible that when I set the jwt, the user identifier is nullified, and because of it the notification is not processed?
from engage-digital-messaging-android.
If consumeReceivedRemoteNotification
returns false
it means the SDK did not recognized the notification as valid for this chat, there can be several reasons but the most probably in your case is that the notification's user_id or installation_id did not match the one provided to the SDK receiving it.
Could you please share a notification payload? (you can display it just before calling consumeReceivedRemoteNotification
) and could you please also display the value of getUserIdentifier()
and getInstallationIdentifier()
on the Dimelo chat instance at the same time?
If you're using the JWT authentication, what's possible also is that the JWT payload returned by your server does not contain the same userIdentifier as the one you set in your app, if that's the case it should be visible in the debug I asked you to display above.
Thanks !
from engage-digital-messaging-android.
Extras of the notification intent.
Bundle[{google.sent_time=1499241925641, dimelo=1.0, appdata={"a":false,"uid":"101059932","s":"a","t":"m","d":1499241925,"u":"Team Mobile","i":"5381ab1f-d13f-42df-93a4-9af0dac34287","uuid":"a65d05b6-36f7-420c-8b1a-5f3a1e2e95df","tr":false,"n":1}, from=1092766345379, alert=test, google.message_id=0:1499241925660648%1b50ee93f9fd7ecd}]
Values at the time of the calling consumeReceivedRemoteNotification
getJwt()
eyJhbGciOiJIUzI1NiJ9.eyJleHRyYSI6eyJuYW1lIjoiRVJJQyIsImJwIjoiMDEwMTA1OTkzMiIsImxhc3RuYW1lIjoiRkFMTEFTIiwiZW1haWwiOiJmYWxsYXMuZXJpY0BnbWFpbC5jb20ifSwidXNlcklkIjoiMTAxMDU5OTMyIiwidXNlck5hbWUiOiJNLiBFUklDIEZBTExBUyIsImFwaUtleSI6ImMzYzM3NDdlZTMzNjMyYzY2Zjg2NzRjM2Y3ZmQ0MTM3MzkwNmMyOWNiYjlmNDQ0YmYwNzViYjhmN2YwY2Y5Y2YiLCJpbnN0YWxsYXRpb25JZCI6IjUzODFhYjFmLWQxM2YtNDJkZi05M2E0LTlhZjBkYWMzNDI4NyJ9.Q-rVsshEjR3DLTEnRISHhfmAP1oF5vjSD4tQ20l1jwI
getUserIdentifier()
null
getInstallationIdentifier()
5381ab1f-d13f-42df-93a4-9af0dac34287
from engage-digital-messaging-android.
Ok thanks for these details!
That's what I though, your JWT contains a userId
(101059932
) but the Dimelo client isn't initialized with one (getUserIdentifier() == null
). That's why the notification is ignored, because it means it's not for the currently connected account. You need to set the userIdentifier
on the Dimelo instance when you instantiate it, even if you use JWT authentication.
from engage-digital-messaging-android.
Did you manage to fix this issue?
from engage-digital-messaging-android.
Related Issues (20)
- With Android P on Pixel 2 and Pixel 3, Dimelo initialization fails and the app crahes HOT 3
- Incident étrange HOT 1
- Unread show
- How to display the time when the notification was received HOT 11
- Hello, I want to know how to customize the notification display. HOT 1
- Crash caused by a conflict with the Picasso lib HOT 5
- dimelo.setWelcomeMessage() could not receive a welcome message HOT 4
- IndexOutOfBoundsException from ChatActivity HOT 6
- Crash when clicking on camera HOT 6
- React Native Wrapper HOT 2
- Localization HOT 7
- Last release breaks build of previous versions HOT 1
- Push Notification icon HOT 1
- compileSdkVersion 31 build fail HOT 1
- Deprecated API HOT 1
- Could not send the message HOT 4
- Crash HOT 13
- Chat$24.run
- Close button not working in camera page HOT 9
- NullPointerException StartAndValidateAttachmentProvider Bitmap.isRecycled
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from engage-digital-messaging-android.