Skip to content

@capacitor/network - Network.getStatus() returns connected: false on Android 8 (API 26-27) with airplane mode + WiFi #2518

Closed

Description

@chiaramistro

Bug Report

Plugin(s)

@capacitor/network - 7.0.3

Capacitor Version

Latest Dependencies:

  @capacitor/cli: 8.3.1
  @capacitor/core: 8.3.1
  @capacitor/android: 8.3.1
  @capacitor/ios: 8.3.1

Installed Dependencies:

  @capacitor/cli: 7.4.5
  @capacitor/core: 7.4.5
  @capacitor/ios: 7.4.5
  @capacitor/android: 7.4.5

Platform(s)

Android

Current Behavior

Network.getStatus() returns connected: false on Android 8 (API 26-27) with airplane mode + WiFi.

Expected Behavior

If connected to the internet (eg. using WiFI), connected should return true.

Code Reproduction

Use Android 8 emulator/device, airplane mode ON, WiFi ON, call Network.getStatus():

    Network.getStatus().then((status: ConnectionStatus) => {
      this.networkType = status.connectionType;
      if (status.connected == true) {
        this.networkStatus = ConnectionStatusEnum.Online;
      } else {
        // HERE - on Android 8 we always land here even though device is connected to internet (WiFi)
        this.networkStatus = ConnectionStatusEnum.Offline;
      }
    }).catch((err) => {
      console.log('Failed to get initial network status: ', err);
    });

Other Technical Details

Additional Context

Possible cause: NET_CAPABILITY_VALIDATED is not set by Android 8 when WiFi reconnects in airplane mode, and getActiveNetwork() can return null.
On Android 8 (API 26) with airplane mode + WiFi, the system often fails to set the VALIDATED flag even though WiFi is fully connected and working. This was a known Android 8 quirk — the validation probe doesn't run properly when airplane mode is active. On newer Android versions (API 28+), this was fixed and the re-validation after WiFi reconnects in airplane mode works correctly.

Affected code: [Network.java#getNetworkStatus()] lines 93-113.

Activity

  1. Ionitron commented on Jul 10, 2026

    @Ionitron
    Collaborator

    This issue needs more information before it can be addressed.
    In particular, the reporter needs to provide a minimal sample app that demonstrates the issue.
    If no sample app is provided within 7 days, the issue will be closed.

    Please see the Contributing Guide for how to create a Sample App.

    Thanks!
    Ionitron 💙

  2. Ionitron commented on Jul 18, 2026

    @Ionitron
    Collaborator

    It looks like this issue didn't get the information it needed, so I'll close it for now. If I made a mistake, sorry! I am just a bot.

    Have a great day!
    Ionitron 💙

  3. ionitron-bot commented on Aug 2, 2026

    @ionitron-bot

    Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of the plugin, please create a new issue and ensure the template is fully filled out.

  4. locked and limited conversation to collaborators on Aug 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions