Skip to content

Feat/engine to lib#28

Merged
easonchen0816 merged 5 commits intodevelopfrom
feat/engine-to-lib
Feb 3, 2026
Merged

Feat/engine to lib#28
easonchen0816 merged 5 commits intodevelopfrom
feat/engine-to-lib

Conversation

@muxi1998
Copy link
Copy Markdown
Contributor

Overview

This PR adapts the BreezeApp-engine to be fully "embeddable" as a library within host applications. It lowers system requirements, implements library-aware build logic, and cleans up legacy resources.

Key Changes & Rationale

  1. EdgeAI SDK Updates (Integration Logic)

    • Embedded Service Binding: Updated EdgeAI.initialize() to prioritize finding the engine service within the host app's package first. This enables a zero-dependency integration where the host app can include the engine internally.

    • minSdk Downgrade (34 -> 23): Lowered the minimum Android API requirement for the SDK from Android 14 to Android 6.0. This removes a major blocker for apps that need to support a wide range of devices.

  2. BreezeApp-engine Build Refactoring (Library Mode Support)
    The changes in build.gradle.kts are significant to support dual-mode (Standalone App vs. Embedded Library).

    • Source Set Separation: Configured sourceSets to conditionally exclude standalone resources (e.g., launcher icons, specific activities) when building in Library Mode (isLibraryMode). This prevents resource conflicts (e.g., duplicate ic_launcher) when mergining into a host app.

    • Dependency Management:

      • compileOnly for UI: In Library Mode, dependencies like Material and AndroidX Core are set to compileOnly to avoid clashing with the host app's versions.
      • Local AAR Handling: Adjusted how local AARs (like sherpa-onnx) are included so they don't break the build when the library is consumed by a host.
  3. Cleanup

    • Manifest Cleanup: Removed unused/legacy manifest files (MyOldManifest.xml) and consolidation of resource definitions.

Impact

  • Host Integration: Fully ready for direct code integration into 3rd-party apps.
  • Build Stability: Cleaner separation between "App" resources and "Engine" logic prevents merge conflicts during APK assembly.

…ration

- Enable EdgeAI to bind to a local engine service within the host app (embedded mode), prioritizing it over the standalone app.
- Add targetPackageName parameter to initialize for explicit binding control.
- Lower minSdk from 34 to 23 to allow integration with apps supporting older Android versions (e.g., Signal-Android).
@muxi1998 muxi1998 marked this pull request as ready for review January 30, 2026 03:35
@easonchen0816 easonchen0816 merged commit b13738c into develop Feb 3, 2026
1 check passed
@easonchen0816 easonchen0816 deleted the feat/engine-to-lib branch February 3, 2026 06:56
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.

2 participants