Skip to content

[codex] Show Android achievement completion banners#238

Draft
JoelFerrando wants to merge 2 commits into
Abedalkareem:developfrom
JoelFerrando:codex/android-achievement-banners
Draft

[codex] Show Android achievement completion banners#238
JoelFerrando wants to merge 2 commits into
Abedalkareem:developfrom
JoelFerrando:codex/android-achievement-banners

Conversation

@JoelFerrando

@JoelFerrando JoelFerrando commented Jun 29, 2026

Copy link
Copy Markdown

What changed

  • Android now reads Achievement.showsCompletionBanner from the unlock method channel call.
  • When the flag is true, Android invokes Play Games unlock(...) so Google Play Games can show its native achievement completion banner.
  • Android still invokes unlockImmediate(...) afterward so the Dart Future keeps the existing success/error behavior.
  • Updated public docs and API comments so showsCompletionBanner is no longer documented as iOS-only.

Why

The Dart/platform-interface layer already sends showsCompletionBanner, and iOS/macOS already honor it. Android dropped the argument and only used unlockImmediate(...), which can confirm the unlock result but does not trigger the native Play Games completion UI. Apps that rely on the native banner therefore need a custom Android bridge today.

Compatibility

This does not add a new public API. It keeps the existing default of showsCompletionBanner: true, preserves the existing Future success/error contract through unlockImmediate(...), and only changes Android so it respects the flag that Dart already sends.

Validation

  • dart format games_services/lib/src/achievements.dart games_services/lib/src/games_services.dart games_services_platform_interface/lib/src/models/achievement.dart
  • flutter analyze --no-fatal-warnings in games_services (only the repo's existing local path dependency warning is reported)
  • dart analyze in games_services_platform_interface
  • flutter build apk --debug in games_services/example

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