QuickBlox / quickblox-android-sdk

QuickBlox Android SDK includes code snippets with main use cases and framework JAR library.
BSD 3-Clause "New" or "Revised" License
417 stars 697 forks source link

Not receiving system notifications about dialog creation #547

Closed Shahjahan786 closed 3 years ago

Shahjahan786 commented 6 years ago

When group dialog is created my app is sending system notification about dialog creation but the dialog occupants are not receiving system notification.

I have add gist for my code files, please review and suggest https://gist.github.com/Shahjahan786/f0c946bed57cdd3e38a349afe0c4fcd6

02-16 07:20:47.146 27619-27619/com.my.app D/ProgressDialogFragment: show
02-16 07:20:47.146 27619-27619/com.my.app D/ProgressDialogFragment: fm.findFragmentByTag(TAG) == null
02-16 07:20:47.146 27619-27619/com.my.app D/ProgressDialogFragment: newInstance = ProgressDialogFragment{20496bb}
02-16 07:20:47.146 27619-27619/com.my.app D/ProgressDialogFragment: backstack = []
02-16 07:20:47.147 27619-27619/com.my.app D/QBDialogCustomData[buildDialog]: QBBaseCustomObject{className='DialogMetaData', fields={data[class_name]=DialogMetaData, data[admins]=[18707]}}
02-16 07:20:47.148 27619-27619/com.my.app D/QBASDK: =========================================================
                                                         === REQUEST ==== 554c3e88-c1a4-4ba3-80b9-b4f14d4c3942 ===
                                                         REQUEST
                                                             POST https://api.quickblox.com//chat/Dialog.json
                                                         HEADERS
                                                             QuickBlox-REST-API-Version=0.1.1
                                                             QB-SDK=Android 3.5.0
                                                             QB-Token=341290e230e386a60b10935127dfac21f8000010
                                                         PARAMETERS
                                                             name=wfasd
                                                             type=2
                                                             occupants_ids=15439,15162
                                                             data[class_name]=DialogMetaData
                                                             data[admins]=[18707]
                                                         INLINE
                                                             POST https://api.quickblox.com//chat/Dialog.json?name=wfasd&type=2&occupants_ids=15439%2C15162&data[class_name]=DialogMetaData&data[admins]=%5B18707%5D
02-16 07:20:47.188 27619-27664/com.my.app D/EGL_emulation: eglMakeCurrent: 0xaa985720: ver 3 0 (tinfo 0xaa983390)
02-16 07:20:47.952 27619-27664/com.my.app I/chatty: uid=10087(com.my.app) RenderThread identical 80 lines
02-16 07:20:47.959 27619-27664/com.my.app D/EGL_emulation: eglMakeCurrent: 0xaa985720: ver 3 0 (tinfo 0xaa983390)
02-16 07:20:47.969 27619-27619/com.my.app D/QBASDK: *********************************************************
                                                         *** RESPONSE *** 554c3e88-c1a4-4ba3-80b9-b4f14d4c3942 ***
                                                         STATUS : 201 
                                                         HEADERS
                                                             Status=201 Created
                                                             Transfer-Encoding=chunked
                                                             Server=nginx/1.12.1
                                                             Access-Control-Allow-Origin=*
                                                             X-Request-Id=ea65b4b8-0141-4a64-9809-fe823b8ef6da
                                                             X-Content-Type-Options=nosniff
                                                             X-Runtime=0.057921
                                                             Connection=close
                                                             X-Android-Received-Millis=1518765647968
                                                             Date=Fri, 16 Feb 2018 07:20:48 GMT
                                                             QuickBlox-REST-API-Version=0.1.1
                                                             X-Frame-Options=SAMEORIGIN
                                                             X-Android-Selected-Protocol=http/1.1
                                                             Strict-Transport-Security=max-age=31536000max-age=15768000;
                                                             Cache-Control=max-age=0, private, must-revalidate
                                                             ETag=W/"2f4a3b3987a57fe4181f3076fa3cb708"
                                                             X-Android-Response-Source=NETWORK 201
                                                             Set-Cookie=_mkra_ctxt=72045f055b23dea2d4a6416bd34a01db--201; path=/; max-age=5; HttpOnly; secure
                                                             X-Android-Sent-Millis=1518765647575
                                                             X-XSS-Protection=1; mode=block
                                                             QB-Token-ExpirationDate=2018-02-16 09:16:08 +0000
                                                             Content-Type=application/json; charset=utf-8
                                                         BODY
                                                             '{"_id":"5a868650876ca9775261486a","created_at":"2018-02-16T07:20:48Z","data":{"admins":"[18707]","class_name":"DialogMetaData"},"last_message":null,"last_message_date_sent":null,"last_message_user_id":null,"name":"wfasd","occupants_ids":[15162,15439,18707],"photo":null,"type":2,"updated_at":"2018-02-16T07:20:48Z","user_id":18707,"xmpp_room_jid":"16_5a868650876ca9775261486a@muc.chat.quickblox.com","unread_messages_count":0}'
02-16 07:20:47.971 27619-27664/com.my.app D/EGL_emulation: eglMakeCurrent: 0xaa985720: ver 3 0 (tinfo 0xaa983390)
02-16 07:20:47.977 27619-27664/com.my.app I/chatty: uid=10087(com.my.app) RenderThread identical 1 line
02-16 07:20:47.991 27619-27664/com.my.app D/EGL_emulation: eglMakeCurrent: 0xaa985720: ver 3 0 (tinfo 0xaa983390)
02-16 07:20:47.997 27619-27619/com.my.app D/SYSTEM_NOTIFICATION[sendSystemMessageAboutCreatingDialog]: sent to :15162
02-16 07:20:47.997 27619-27619/com.my.app D/SYSTEM_NOTIFICATION[sendSystemMessageAboutCreatingDialog]: sent to :15439
02-16 07:20:47.998 27619-27950/com.my.app D/SMACK: SENT (1): <message to='15162-16@chat.quickblox.com' id='5a86864fbd0404b0790e722e' type='headline'><extraParams xmlns='jabber:client'><notification_type>creating_dialog</notification_type><dialog_name>wfasd</dialog_name><occupants_ids>15162,15439,18707</occupants_ids><dialog_id>5a868650876ca9775261486a</dialog_id><dialog_type>2</dialog_type><moduleIdentifier>SystemNotifications</moduleIdentifier></extraParams></message>
02-16 07:20:47.998 27619-27950/com.my.app D/SMACK: SENT (1): <r xmlns='urn:xmpp:sm:3'/>
02-16 07:20:47.998 27619-27950/com.my.app D/SMACK: SENT (1): <message to='15439-16@chat.quickblox.com' id='5a86864fbd0404b0790e722e' type='headline'><extraParams xmlns='jabber:client'><notification_type>creating_dialog</notification_type><dialog_name>wfasd</dialog_name><occupants_ids>15162,15439,18707</occupants_ids><dialog_id>5a868650876ca9775261486a</dialog_id><dialog_type>2</dialog_type><moduleIdentifier>SystemNotifications</moduleIdentifier></extraParams></message>
02-16 07:20:47.998 27619-27950/com.my.app D/SMACK: SENT (1): <r xmlns='urn:xmpp:sm:3'/>
02-16 07:20:48.019 27619-27619/com.my.app D/ProgressDialogFragment: fm.beginTransaction().remove(fragment)ProgressDialogFragment{20496bb #0 ProgressDialogFragment}
02-16 07:20:48.019 27619-27619/com.my.app D/ProgressDialogFragment: backstack = [ProgressDialogFragment{20496bb #0 ProgressDialogFragment}]
02-16 07:20:48.039 27619-28039/com.my.app V/FA: Recording user engagement, ms: 17309
02-16 07:20:48.040 27619-28039/com.my.app V/FA: Using measurement service
02-16 07:20:48.040 27619-28039/com.my.app V/FA: Connecting to remote service
02-16 07:20:48.041 27619-28039/com.my.app V/FA: Activity paused, time: 267976699
02-16 07:20:48.044 27619-28039/com.my.app D/FA: Logging event (FE): user_engagement(_e), Bundle[{firebase_event_origin(_o)=auto, engagement_time_msec(_et)=17309, firebase_screen_class(_sc)=CreateGroupActivity, firebase_screen_id(_si)=7201264409904776525}]
02-16 07:20:48.045 27619-27664/com.my.app D/EGL_emulation: eglMakeCurrent: 0xaa985720: ver 3 0 (tinfo 0xaa983390)
02-16 07:20:48.051 27619-28039/com.my.app V/FA: Using measurement service
02-16 07:20:48.051 27619-28039/com.my.app V/FA: Connection attempt already in progress
tatanka987 commented 6 years ago

did you add system messages listener for occupants like there? if yes, provide us full logs from both sides (sender and receiver).

Shahjahan786 commented 6 years ago

It looks working(without making any change) now! I don't know why it wasn't working prior so can't reproduce, As I see the issue again will provide you logs.

ghost commented 3 years ago

Hello QuickBlox customer,

This is Nikolay from QuickBlox support.

The issue was closed as it was outdated.

Pease update the SDK to the latest version: https://github.com/QuickBlox/quickblox-android-sdk-releases/releases/tag/3.9.11

Additionally, please check our new samples: https://docs.quickblox.com/docs/code-samples#chat-samples

If it is still relevant after reviewing the updated information, feel free to open a new issue.

Have a nice day.