- Android: MainActivity, AppLifecycleTracker, Firebase Messaging Service - Android: Notification handlers (dismiss, reply, receipt delivery) - Android: Custom push notification helper and database support - Android: Drawable resources for notification actions - Android: Mipmap resources with foreground/background/round icons - iOS: Push notification service support - Flutter: Push notification background and foreground services - Web/Windows: Generated plugin registrant updates - Config: Added google-services.json for Firebase
12 lines
648 B
Dart
12 lines
648 B
Dart
import 'package:firebase_messaging/firebase_messaging.dart';
|
|
|
|
/// 백그라운드 FCM 메시지 핸들러.
|
|
/// main() 외부의 top-level 함수여야 함.
|
|
/// push_notifications.ts의 백그라운드 처리 대응.
|
|
@pragma('vm:entry-point')
|
|
Future<void> firebaseMessagingBackgroundHandler(RemoteMessage message) async {
|
|
// NOTE: 백그라운드에서는 네이티브 Android(MattermostFirebaseMessagingService)가
|
|
// FCM을 직접 처리하므로 이 핸들러는 Flutter가 완전히 종료된 상태에서만 호출됨.
|
|
// 필요 시 최소한의 작업만 수행.
|
|
print('[PushNotification] Background message: ${message.messageId}');
|
|
}
|