Skip to content

Releases

v2.0.0

Choose a tag to compare

@raj-cometchat raj-cometchat released this 30 Oct 20:07

cometchat_push_notifications 2.0.0

New

  • Android notifications are now built by this package: one per conversation, expanding into its recent messages, with the sender's avatar and a summary across conversations.
  • A Notification Service Extension base class for iOS, CometChatNotificationServiceExtension, shipped as the CometChatPushNotificationsNSE pod. It sends delivery receipts while the app is backgrounded or killed, attaches the sender's avatar, groups notifications by conversation and strips markdown a notification cannot render.
  • onNotificationTap reports taps, holding a cold-start tap until a listener attaches so it is not lost to app startup.
  • setActiveConversation takes a receiver type alongside the id, as a CometChatPushReceiverType. It is named apart from the Chat SDK's CometChatReceiverType on purpose: both are in scope in any UI Kit app, and matching names there are an ambiguous_import error at the point of use.
  • PushPlatform covers FCM_FLUTTER_IOS and FCM_WEB. 1.x had neither, so an iOS app using firebase_messaging — the usual Flutter setup — had no correct value to register its FCM token under.
  • Web has a real implementation. It reaches as far as Dart does — token registration and the rest of the API — and no-ops the display methods, since a web push is delivered to a service worker. init used to throw there.
  • A privacy manifest for iOS.

Enhancements

  • notification_voip_plugin is no longer a dependency.
  • cometchat_sdk moves to 5.0.9.
  • The push token now carries ringingFlowVersion: "v2" and always a timezone, as the native Android and iOS SDKs send them. The Chat SDK's CometChatNotifications.registerPushToken cannot carry the field, so the token is now registered with CometChat directly, under the Chat SDK's auth token, over dart:io (Android, iOS) or fetch (web). No new dependency.
  • registerPushToken and unregisterPushToken throw CometChatNotificationException on failure, carrying the SDK's error code and message alongside the platform and provider id they used.
  • The package no longer claims Android's FirebaseMessagingService. Your app keeps its messaging library and forwards payloads to handlePushNotification, which now reports whether it took the payload.

Fixes

  • Clearing notifications no longer cancels notifications this package did not post. clearAll() called cancelAll(), taking down the host app's own.
  • Cancelling one conversation's notification now works. It targeted a (tag, id: 0) pair that never matched what was posted.
  • showInAppNotifications now has an effect on Android, where it was sent to a native setter that did not exist.
  • A tap on a notification that launched a killed app now opens the conversation rather than the conversation list: the tap is held until a listener attaches instead of being lost to app startup.
  • Notification suppression no longer applies to the wrong conversation when a user and a group share an id. setActiveConversation takes the receiver type with the id, so the two can no longer collide.

Removed

  • Calling, in full: the call screen, call handlers, CometChatCallDetails, the incoming-call activity, and every call member on the facade. It moves to its own package, cometchat_voip.
  • PushPlatform.APNS_FLUTTER_VOIP. Chat delivery runs over the APNs device token, so a chat integrator has no VoIP provider to register against.
  • NvpConfig and every other notification_voip_plugin type.
  • onPushReceived, which reported what your messaging library already gives you, along with parsePayload, showNotification and showInAppNotification: handlePushNotification parses and posts.
  • openAutoStartSettings, openOverlaySettings and openBatteryOptimizationSettings, which belonged to ringing. openFullScreenIntentSettings moves to CometChatVoip.openSettings(CometChatRingReadiness.fullScreenIntentDenied).
  • Inline reply. A notification carried a reply field, and the reply was sent through cometchat_sdk — from a background isolate when the app was dead. Sending a message is the app's job, not a notification package's, and the machinery it needed (a broadcast receiver, an on-disk queue, a headless Flutter engine, a second entry point the tree shaker could drop) cost more than the feature returned. CometChatNotificationAction, replyText, enableInlineReply, onBackgroundSetup and onNotificationResponse go with it; use onNotificationTap.

Breaking changes

  • The push transport is now yours. Add a messaging library such as firebase_messaging and forward every payload to handlePushNotification, which reports whether it took the payload — call and other non-chat payloads come back false for you to route onward (to cometchat_voip, for a call).
  • Renamed: registerToken to registerPushToken (now a Future that throws on failure), getPushToken to getApnsToken (iOS only), cancelNotification(tag) to clearNotifications(conversationId:), clearAll() to clearNotifications(), and setCurrentOpenChatId(id) to setActiveConversation(id:, receiverType:), which now requires the receiver type.
  • CometChatReceiverType is now CometChatPushReceiverType, to resolve an ambiguous_import against the Chat SDK's type of the same name in UI Kit apps.
  • nvpConfig on CometChatNotificationConfig gives way to native fields such as androidChannelId and androidSmallIcon.
  • iOS needs a Notification Service Extension for delivery receipts and sender avatars while the app is backgrounded or killed. Add one that subclasses CometChatNotificationServiceExtension.

cometchat_voip 2.0.0

New

  • Three ways to take an incoming call, as CometChatCallMode:
  • auto (the default): the package rings — the notification, the ringtone, the expiry, the keep-alive, and Answer and Decline from the lock screen.
  • autoCustomScreen: everything auto does, except that the ring's full-screen alert and its tap open the app, which draws its own ring screen from CometChatVoip.onRingScreenRequested. Held until the screen subscribes, so a cold-start ring is not missed. Android only; iOS rings in CallKit, as it must.
  • manual: the package parses, gates and forwards, and the app rings. CometChatVoip.ringSurfaces offers each step of auto on its own (Android).
  • iOS: the package owns the PushKit registry and the CXProvider, and reports every VoIP push to CallKit before acknowledging it. Presentation is set with CometChatCallKitOptions.
  • Android: a CallStyle notification with Answer and Decline, full screen over the lock screen, held by a phoneCall foreground service until the answered call joins. A decline tapped after the app was killed is sent from a headless isolate.
  • The call connects while it rings, so answering only adds media.
  • Call waiting. A second call rings over the live one and says that answering ends it ("End & accept"); declining it sends busy. A third call, or one that arrives while this device's own outgoing call is still ringing, is refused as busy and shown as a missed call (Android).
  • Ring gates, as on the native SDKs: a call this user placed, a one-to-one call addressed to someone else, a duplicate and a call already over never ring. A call that arrives past its ring window is dropped (dropExpiredCalls). RingGate and TerminalLedger are exported.
  • Durable declines: WorkManager on Android, a background task with replay on iOS. A one-to-one ring that times out sends unanswered; a group call declined or timed out ends locally and carries on for the other members.
  • A caller is told how its call ended: a decline, busy or cancel reaches the caller's IncomingCallListener through the Calls SDK.
  • Missed calls: a notification on Android (showMissedCallNotification), Recents on iOS.
  • iOS: calls this device places are on CallKit too, from the moment they are placed — a Recents entry whether or not anyone answers, a hang-up from the lock screen while the callee still rings (onOutgoingCallEnded), and survival of a cellular call. reportOutgoingCall names the callee and the call type; a session the Calls SDK owns that CallKit has not heard of is reported by the package itself and renamed when a participant connects.
  • onCallRinging, onCallAnswered and onCallEnded, holding the answer that launched the app until something listens. Every ringing call also reaches the Calls SDK's IncomingCallListener.
  • answer, accept, decline, dismissRinging and getActiveCall. permissionsToAnswer and requestCallPermissions cover the microphone, and the camera for video; answer asks by itself when requestCallPermissions is on.
  • reportOutgoingCall, reportCallConnected, reportCallEnded, reportMuted and reportVideoPaused keep CallKit in step with the call. They are optional: the package follows the Calls SDK's session and media events itself.
  • Push tokens register on every Calls SDK login, with no Chat SDK: registerPushToken, setPushToken, handleTokenRefresh, handleRegistrationFailure, unregisterPushToken, and getVoipToken on iOS. Each registration carries ringingFlowVersion: "v2" and a timezone, as the native SDKs send them; a device that cannot name its zone sends a fixed-offset zone from its UTC offset (or UTC) rather than nothing.
  • acceptOnAnswer marks an answered call ongoing, which a caller on the Chat SDK's calling waits for.
  • Setup checks: verifyPushSetup, checkRingReadiness, openSettings, requestNotificationPermission, lastWakeTiming, and getDiagnostics — a redacted snapshot for a bug report.
  • CometChatVoipConfig.fromCallAppSettings builds the config from the Calls SDK settings the app already has. Also configurable: defaultRingTimeout, timezone, clientHost, extensionGroupID and callKitAudio.
  • CometChatVoipCall carries source, extras and initials.
  • `CometChatVo...
Read more

v1.0.1

Choose a tag to compare

@raj-cometchat raj-cometchat released this 27 Jul 08:40

New

  • None

Enhancements

  • Updated the required cometchat_sdk dependency to version 5.0.6.
  • Added homepage and repository links to the package metadata, making the source repository and website discoverable from the pub.dev listing.

Fixes

  • None