Skip to content

Update appwrite to 28.4.0 and track push events - #27

Open
lohanidamodar wants to merge 1 commit into
mainfrom
feat/appwrite-28.4.0
Open

lohanidamodar wants to merge 1 commit into
mainfrom
feat/appwrite-28.4.0

Conversation

@lohanidamodar

Copy link
Copy Markdown
Collaborator

Summary

  • Bumps appwrite from 28.4.0-rc.1 to ^28.4.0. I read the changelog from rc.1 to 28.4.0 and nothing breaks. The one Android change is that the plugin no longer declares FOREGROUND_SERVICE / FOREGROUND_SERVICE_REMOTE_MESSAGING. Our manifest already removes both, and the merged debug manifest has neither.
  • Push analytics were missing, so this adds them. AnalyticsService gets pushReceived / pushOpened, and both go through ConsentedAnalytics, so the opt-out still applies.
    • Android (Appwrite Push): SdkLivePush calls Push.setTracking with a PushTracking, a small Tracking subclass that hands the SDK's push hooks to AnalyticsService. The SDK sends push_received (non-interactive) and push_opened with the messageId and removes duplicates.
    • iOS (APNs via the push plugin): push_received fires when a notification arrives in the foreground, and push_opened fires on taps (launch tap, later taps, local-notification taps). The messageId is included when the payload has one.
  • Tracking.start(), which sends lifecycle events plus first_open / app_updated, and the screen-view NavigatorObserver already match the 28.4.0 API, so they are unchanged.

Test plan

  • flutter analyze: no issues on Flutter 3.47.8, the same minor as CI's 3.47.1
  • flutter test: 83 passed, including new tests for push events and consent gating
  • flutter build apk --debug (Flutter 3.47.8)

Bump appwrite from 28.4.0-rc.1 to ^28.4.0. Nothing breaks: the release
adds to rc.1 and the Android plugin stops declaring the foreground
service permissions, which the manifest already removes.

The app was not reporting push analytics. Android (Appwrite Push) now
passes a Tracking to Push.setTracking, so the SDK sends push_received
and push_opened with the messageId and deduplicates them. iOS (APNs via
the push plugin) sends the same events from its foreground and tap
handlers. Both go through AnalyticsService, so the user's analytics
opt-out still applies.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant