Skip to content

Move the embedded Android Push code to its own package #2053

Closed

Description

@ChiragAgg5k

Tracks PR #2051.

Plan

Goal

Let an app depend on more than one of the Android, Flutter and React Native SDKs. Today the Flutter plugin and the React Native module embed the Android Push code under the Android SDK's own packages, so the build fails on duplicate classes (io.appwrite.services.PushService) and the merged manifest declares the same components twice.

What changes

  • PR #2051 (fix/embedded-push-packages):
    • src/SDK/Language/Flutter.php and src/SDK/Language/ReactNative.php: the embedded Push files (PushCore, PushBackground, PushWakeups, PushService, PushReceiver, PushOpenActivity, PushBridge, the exception class) now go under io/<title>/flutter/... and io/<title>/reactnative/....
    • Shared templates under templates/android/library/src/main/java/io/package/services/, templates/android/library/src/main/AndroidManifest.xml.twig and templates/android/push/Exception.kt.twig: pushNamespace becomes io.<title>.<language> outside Android. The Android SDK keeps its packages (the PR reports its output is byte-identical to main).
    • templates/flutter/android/.../PushPlugin.kt.twig and templates/react-native/android/.../PushModule.kt.twig: imports follow the new packages.
    • templates/flutter/README.md.twig and templates/react-native/README.md.twig: the PushService name for tools:node="remove" and the notification-icon meta-data key (io.<title>.flutter.push.notification_icon / io.<title>.reactnative.push.notification_icon) are updated.
    • tests/generation/GenerationTest.php: new testEmbeddedAndroidPushClassesDoNotCollide checks that no Kotlin class is shared between the generated Android, Flutter and React Native trees.

Remaining steps

None. PR #2051 is the full generator change. Regenerated Flutter and React Native SDKs pick it up with the next sdk-generator release (related release work: appwrite-labs/cloud#6538).

Risks

  • Flutter or React Native apps that set the old notification-icon meta-data key, or remove io.<title>.services.PushService from their manifest, need the new names (the READMEs now say so).

Done when

Activity

  1. self-assigned this
    on Oct 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions