-
Notifications
You must be signed in to change notification settings - Fork 78
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
TF-2298 Always get token when open app
Signed-off-by: dab246 <[email protected]>
- Loading branch information
Showing
10 changed files
with
105 additions
and
148 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 0 additions & 13 deletions
13
lib/features/push_notification/presentation/config/fcm_configuration.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,9 @@ | ||
|
||
import 'package:firebase_core/firebase_core.dart'; | ||
import 'package:tmail_ui_user/features/push_notification/presentation/config/firebase_options.dart'; | ||
import 'package:tmail_ui_user/features/push_notification/presentation/services/fcm_receiver.dart'; | ||
import 'package:tmail_ui_user/features/push_notification/presentation/services/fcm_service.dart'; | ||
|
||
class FcmConfiguration { | ||
|
||
static Future<void> initialize() async { | ||
await Firebase.initializeApp(options: DefaultFirebaseOptions.currentPlatform); | ||
await FcmService.instance.recreateStreamController(); | ||
_initMessageListener(); | ||
} | ||
|
||
static void _initMessageListener() { | ||
FcmReceiver.instance.onForegroundMessage(); | ||
FcmReceiver.instance.onBackgroundMessage(); | ||
FcmReceiver.instance.onMessageOpenedApp(); | ||
FcmReceiver.instance.getFcmToken(); | ||
FcmReceiver.instance.onRefreshFcmToken(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.