Hi Social Plus Team,
I’m experiencing two issues with Flutter Amity SDK v7.6.0 on Singapore server:
1. Real-time Messages Not Working - LiveCollection Not Triggering
Using LiveCollection with .listen() but receiving end gets nothing in the stream:dart
// Getting channels
final channelQuery = AmityChatClient.newChannelRepository()
.getChannels()
.sortBy(AmityChannelSortOption.LAST_ACTIVITY);
final channelLiveCollection = channelQuery.getLiveCollection();
final channelStreamController = channelLiveCollection.getStreamController();
channelStreamController.stream.listen((channels) {
// This receives initial data but NOT real-time updates
// When new message arrives in any channel, this doesn't trigger
print('Channels updated: ${channels.length}');
});
channelLiveCollection.loadNext();
// Getting messages
final messageQuery = AmityChatClient.newMessageRepository()
.getMessages(channelId);
final messageLiveCollection = messageQuery.getLiveCollection();
final messageStreamController = messageLiveCollection.getStreamController();
messageStreamController.stream.listen((messages) {
// This loads initial messages but doesn't receive new messages
// When another user sends a message, this listener is NOT triggered
// Nothing is being received in onListen callback
print('Messages received: ${messages.length}');
});
messageLiveCollection.loadNext();
Issue: The .listen() callback receives initial data but doesn’t get triggered when:
-
Another user sends a new message in the channel
-
A message is sent from another device
-
Any real-time update occurs
In the receiving end, onListen receives nothing - no new messages appear automatically.
2. iOS Push Notifications Not Working
-
Updated .p8 certificate in Social Plus Console
-
Notifications still not being received on iOS devices
-
Android notifications working fine