TF-3341 Enable web socket for mobile

This commit is contained in:
DatDang
2024-12-17 14:59:00 +07:00
committed by Dat H. Pham
parent 4a024699e2
commit ea58e3297b
6 changed files with 43 additions and 64 deletions
@@ -20,16 +20,11 @@ class FcmReceiver {
static const int MAX_COUNT_RETRY_TO_GET_FCM_TOKEN = 3;
Future onInitialFcmListener() async {
_onForegroundMessage();
_onBackgroundMessage();
await _onHandleFcmToken();
}
void _onForegroundMessage() {
FirebaseMessaging.onMessage.listen(FcmService.instance.handleFirebaseForegroundMessage);
}
void _onBackgroundMessage() {
FirebaseMessaging.onBackgroundMessage(handleFirebaseBackgroundMessage);
}