Skip to content

[Bug]: showTermsAndConditionsDialog returns true but areTermsAccepted remains false on Android 16 #757

Description

@mboada33

Is there an existing issue for this?

  • I have searched the existing issues

Description of the bug

On a physical Samsung Galaxy S24 Ultra (SM-S928B) running Android 16 / API 36, the official Navigation SDK Terms and Conditions dialog is displayed correctly.

After the user presses the visible acknowledgment button ("Entendido" in Spanish), GoogleMapsNavigator.showTermsAndConditionsDialog() returns true.

However, GoogleMapsNavigator.areTermsAccepted() still returns false, both immediately after the dialog closes and again after waiting 500 ms.

Observed diagnostic result:

termsBefore=false
dialogResult=true
termsAfterImmediate=false
termsAfter500ms=false

Because the accepted state remains false, navigation session initialization subsequently fails with SessionInitializationError.termsNotAccepted.

The diagnostic test intentionally does not initialize a navigation session, so the Terms API behavior is isolated from session initialization.

iOS Platform

Not affected

Android Platform

Affected

Flutter version

3.44.0

Package version

0.11.0

Native SDK versions

  • I haven't changed the version of the native SDKs

Flutter Doctor Output

[√] Flutter (Channel stable, 3.44.0, on Microsoft Windows [Versi¢n 10.0.19045.6456], locale es-CL) [743ms]
• Flutter version 3.44.0 on channel stable at C:\flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 559ffa3f75 (4 months ago), 2026-05-15 14:13:13 -0700
• Engine revision 4c525dac5e
• Dart version 3.12.0
• DevTools version 2.57.0
• Feature flags: enable-web, enable-linux-desktop, enable-macos-desktop, enable-windows-desktop, enable-android,
enable-ios, cli-animations, enable-native-assets, enable-swift-package-manager, omit-legacy-version-file,
enable-lldb-debugging, enable-uiscene-migration

[√] Windows Version (10 Enterprise 64-bit, 22H2, 2009) [5,2s]

[√] Android toolchain - develop for Android devices (Android SDK version 36.1.0) [3,8s]
• Android SDK at C:\Users\Main\AppData\Local\Android\sdk
• Emulator version 36.5.11.0 (build_id 15261927) (CL:N/A)
• Platform android-36.1, build-tools 36.1.0
• Java binary at: C:\Program Files\Android\Android Studio\jbr\bin\java
This is the JDK bundled with the latest Android Studio installation on this machine.
To manually set the JDK path, use: flutter config --jdk-dir="path/to/jdk".
• Java version OpenJDK Runtime Environment (build 21.0.10+-14961533-b1163.108)
• All Android licenses accepted.

[√] Chrome - develop for the web [398ms]
• Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe

[!] Visual Studio - develop Windows apps (Visual Studio Community 2026 18.9.1) [396ms]
• Visual Studio at C:\Program Files\Microsoft Visual Studio\18\Community
• Visual Studio Community 2026 version 18.9.12112.369
• Windows 10 SDK version 10.0.22621.0
X Visual Studio is missing necessary components. Please re-run the Visual Studio installer for the "Desktop
development with C++" workload, and include these components:
MSVC v142 - VS 2019 C++ x64/x86 build tools
- If there are multiple build tool versions available, install the latest
C++ CMake tools for Windows
Windows 10 SDK

[√] Connected device (4 available) [778ms]
• SM S928B (mobile) • RFCX80QWADH • android-arm64 • Android 16 (API 36)
• Windows (desktop) • windows • windows-x64 • Microsoft Windows [Versi¢n 10.0.19045.6456]
• Chrome (web) • chrome • web-javascript • Google Chrome 152.0.7977.82
• Edge (web) • edge • web-javascript • Microsoft Edge 152.0.4191.62

[√] Network resources [696ms]
• All expected network resources are available.

! Doctor found issues in 1 category.

Steps to reproduce

  1. Run the application on a physical Samsung Galaxy S24 Ultra (SM-S928B) running Android 16 / API 36.

  2. Call GoogleMapsNavigator.areTermsAccepted().

    • Result: false
  3. Call:
    GoogleMapsNavigator.showTermsAndConditionsDialog('DriveForGift Navigation Lab', 'DriveForGift')

  4. The official Google Navigation Terms and Conditions dialog appears.

  5. Scroll through the dialog and press the visible "Entendido" acknowledgment button.

  6. The Future returned by showTermsAndConditionsDialog() returns:

    • true
  7. Immediately call GoogleMapsNavigator.areTermsAccepted() again.

    • Result: false
  8. Wait 500 ms and call GoogleMapsNavigator.areTermsAccepted() again.

    • Result: false
  9. The complete diagnostic result is:

    termsBefore=false
    dialogResult=true
    termsAfterImmediate=false
    termsAfter500ms=false

  10. If GoogleMapsNavigator.initializeNavigationSession() is attempted afterward, session initialization fails with:
    SessionInitializationError.termsNotAccepted

Expected vs Actual Behavior

Expected

After showTermsAndConditionsDialog() returns true, the accepted Terms state should be persisted and:

GoogleMapsNavigator.areTermsAccepted()

should return true.

Navigation session initialization should then be allowed to proceed.

Actual

The dialog returns:

dialogResult=true

but the native acceptance state remains:

areTermsAccepted() == false

both immediately after dismissal and after waiting 500 ms.

Exact observed state:

termsBefore=false
dialogResult=true
termsAfterImmediate=false
termsAfter500ms=false

As a result, navigation session initialization fails with:

SessionInitializationError.termsNotAccepted

Code Sample

Future reproduceTermsIssue() async {
final termsBefore =
await GoogleMapsNavigator.areTermsAccepted();

final dialogResult =
await GoogleMapsNavigator.showTermsAndConditionsDialog(
'DriveForGift Navigation Lab',
'DriveForGift',
);

final termsAfterImmediate =
await GoogleMapsNavigator.areTermsAccepted();

await Future.delayed(
const Duration(milliseconds: 500),
);

final termsAfter500ms =
await GoogleMapsNavigator.areTermsAccepted();

debugPrint('termsBefore=$termsBefore');
debugPrint('dialogResult=$dialogResult');
debugPrint('termsAfterImmediate=$termsAfterImmediate');
debugPrint('termsAfter500ms=$termsAfter500ms');
}

Additional Context

Environment:

  • Device: Samsung Galaxy S24 Ultra (SM-S928B)
  • Architecture: android-arm64
  • Android: 16 / API 36
  • Flutter: 3.44.0 stable
  • Dart: 3.12.0
  • Android SDK: 36.1.0
  • JDK: OpenJDK 21.0.10
  • google_navigation_flutter: 0.11.0
  • Navigation SDK Android bundled by the plugin: 7.8.0
  • Physical device (not emulator)
  • Navigation SDK is enabled in the Google Cloud project

No manual Terms acceptance state is stored by the application.
No SharedPreferences workaround is used.
No acceptance bypass is implemented.
The native Navigation SDK version has not been overridden.

The official dialog is displayed and closes normally. On this device the visible dialog contains scrollable Terms text and an "Entendido" acknowledgment button. No checkbox is visible.

The key diagnostic result is:

termsBefore=false
dialogResult=true
termsAfterImmediate=false
termsAfter500ms=false

Therefore, the dialog reports successful acceptance, but the acceptance state exposed by areTermsAccepted() is not persisted.

I can provide full logcat output, screenshots, and the minimal reproduction project if required.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

triage meI really want to be triaged.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions