Jagjit Singh
Jagjit Singh

Reputation: 1

Trying to access internet in android api created with react native

I have created an app with react native expo. I have pre-build the app. I am creating an APK through android studio. I am able to create the APK. When i am trying to request an api I am getting no internet access as you can see in the below image enter image description here

I am sharing my AndroidManifest.xml file with you guys https://codesandbox.io/p/sandbox/xz4rh5?file=%2FAndroidManifest.json%3A40%2C12

and my app.json file as well


{
  "expo": {
    "name": "userApp",
    "slug": "userApp",
    "version": "1.0.0",
    "orientation": "portrait",
    "icon": "./assets/icon.png",
    "userInterfaceStyle": "light",
    "newArchEnabled": true,
    "jsEngine": "hermes",
    "splash": {
      "image": "./assets/splash-icon.png",
      "resizeMode": "contain",
      "backgroundColor": "#ffffff"
    },
    "android": {
      "adaptiveIcon": {
        "foregroundImage": "./assets/adaptive-icon.png",
        "backgroundColor": "#ffffff"
      },
      "usesCleartextTraffic": true,
      "permissions": ["INTERNET"],
      "config": {
        "googleMaps": {
          "apiKey": "AIzaSyAgN2d-G1jg1b-BK1mKogAO1gB6CdkmKj0"
        }
      },
      "package": "com.anonymous.userApp"
    },
    "ios": {
      "supportsTablet": true,
      "config": {
        "googleMapsApiKey": "AIzaSyAgN2d-G1jg1b-BK1mKogAO1gB6CdkmKj0"
      },
      "bundleIdentifier": "com.anonymous.userApp"
    },
    "web": {
      "favicon": "./assets/favicon.png"
    },
    "extra": {
      "clientId": "firstclub",
      "hyperSDKVersion": "2.1.33",
      "juspayMavenUrls": [
        "https://maven.juspay.in/jp-build-packages/hyper-sdk/",
        "https://maven.juspay.in/jp-build-packages/hyper-sdk/"
      ],
      "eas": {
        "projectId": "da663565-1cdd-4d70-b48b-65eafd6c6f6d"
      }
    },
    "plugins": ["hyper-sdk-expo-plugin"],
    "owner": "ankitoli"
  }
}

I have tried everything found on the internet but still not able to connect to the internet when running my android APK

Upvotes: 0

Views: 16

Answers (0)

Related Questions