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

Automatic push subscription doesn't work. #802

Closed ghost closed 1 year ago

ghost commented 1 year ago

Hello, I'm following this documentation (https://docs.quickblox.com/docs/android-push-notifications) and the push sample (https://github.com/QuickBlox/quickblox-android-sdk/tree/master/sample-pushnotifications-kotlin) to enable push notification on my app but the automatic push subscription doesn't work properly.

From the documentation, it says that QuickBlox Android SDK provides automatic push subscription management. However, after the app is initialized, there is no subscription created. So, the app does not receive any notifications.

QuickBlox Android SDK provides automatic push subscription management. It means that you do not need to bother how to get FCM device token, create push subscription, and what to do with the received data. Thus, you can reduce your code and make it cleaner.

Please take a look at this issue and let me know how to resolve it. Thanks.

Environment details

Logs

<service android:name=".notification.MyCustomPushNotificationListener" android:exported="false">

<service android:name="com.quickblox.messages.services.fcm.QBFcmPushListenerService" android:exported="false">

<service android:name="com.quickblox.messages.services.fcm.QBFcmPushInstanceIDService" android:exported="false">

QB-maksym-pidhorbunskyi commented 1 year ago

Hello @quangnguyen-agilityio Could you update your current version to the latest version of Android SDK 4.0.0 and try to reproduce the issue again? There was a fix related to subscribe/unsubscribe flow so, perhaps, the issue you faced was already fixed in the latest version. If not, we will request additional details for further investigation.

ghost commented 1 year ago

@QB-maksym-pidhorbunskyi I've already tried version 4.0.0 but it does not work. After quickblox is initialized and users logged in chat successfully, I don't see any subscription created on the dashboard. I have to manually subscribe to push via the API SubscribeService.subscribeToPushes(context, false), then it works. Let me know if you need more info for investigating. Thank you.