Proje: Okul B2B App · Hub: Okul B2B App — Domain

NotificationManager — Foreground Bildirim Konfigürasyonu

services/NotificationManager.tsexpo-notifications ile foreground bildirim yönetimi.

Foreground Handler

Uygulama açıkken gelen bildirimler için konfigürasyon:

Notifications.setNotificationHandler({
  handleNotification: async (notification) => ({
    shouldShowAlert: true,
    shouldPlaySound: priority === 'urgent' || priority === 'high',  // Sadece önemlilerde ses
    shouldSetBadge: true,
    shouldShowBanner: true,
    shouldShowList: true,
    priority: getPriorityLevel(data.priority)
  })
});

Priority Mapping

Bildirim PriorityAndroid Priority
urgentMAX
highHIGH
mediumDEFAULT
lowLOW
defaultDEFAULT

Device Token

AsyncStorage['@device_token'] = { token, platform, deviceId, timestamp }
AsyncStorage['@permission_asked'] = bildirim izni soruldu mu

NotificationManager vs PushNotificationService vs OneSignalService

  • NotificationManager — expo-notifications, local/FCM fallback
  • PushNotificationService — unified soyutlama (her ikisini kapsıyor)
  • OneSignalService — OneSignal SDK, ana push channel