[codex] Show Android achievement completion banners - #238
Conversation
|
Thanks for your contribution @JoelFerrando.
Can you share a little more about your usage?
|
|
Thanks — you were right. We made the wrong assumption here: we treated an API/code review and a successful build as if they proved the missing-banner behavior, but we had not reproduced that behavior reliably on a physical device. That also means this implementation is wrong. It calls both For reference, the physical environment now available to us is a V2310 running Android 15 (API 35), Google Play services 26.26.34, and the Play Games app 2025.09.66390. Logivibe disables I also accidentally mixed an unrelated leaderboard error-classification commit into this branch. I have split that work into focused proposals that use native status codes instead of localized-message parsing and do not treat Thanks for checking the behavior and catching this. |
|
I have split the useful parts into two focused drafts:
I am keeping both as drafts until those remaining platform-specific checks are either completed or agreed with the maintainer. |
What changed
Achievement.showsCompletionBannerfrom theunlockmethod channel call.true, Android invokes Play Gamesunlock(...)so Google Play Games can show its native achievement completion banner.unlockImmediate(...)afterward so the DartFuturekeeps the existing success/error behavior.showsCompletionBanneris 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 usedunlockImmediate(...), 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 existingFuturesuccess/error contract throughunlockImmediate(...), 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.dartflutter analyze --no-fatal-warningsingames_services(only the repo's existing localpathdependency warning is reported)dart analyzeingames_services_platform_interfaceflutter build apk --debugingames_services/example