Android Native HTTP calls are not working

Hi,

I’m building a custom plugin on top of our Android native library, but I have a strange issue that I can’t find a solution to.

The native HTTP requests are not invoked when called from Capacitor function, although the same function is working as expected on native Android Apps.

I tried this configuration but still got the same result.

import type { CapacitorConfig } from '@capacitor/cli';

const config: CapacitorConfig = {
  appId: 'com.xxx.yyy',
  appName: 'xxxxx',
  npmClient: 'npm',
  webDir: 'www',
  server: {
    hostname: 'my-host',
    androidScheme: 'http',
    allowNavigation: []
  },
  android: {
    allowMixedContent: true
  },
  plugins: {
    CapacitorHttp: {
      enabled: true,
    },
  },
};

export default config;

You need to provide some example code of what you are trying to do and how you are making “native HTTP requests”.

@twestrick thanks, figured it out today, but it took me some time as for some reason, Capacitor swallowed the exception coming from Android.