I created an ionic angular app and compiled it with the command ionic build –prod
I then added android platform using the following commands
npm install –save @capacitor/core@6 @capacitor/cli@6
npm install @capacitor/android
npx cap add android
ionic cap copy android
ionic cap sync android
ionic cap open android
With those commands, Android Studio opens the app. I attached my smartphone to test the app which also works well.
However, I am facing one change, The API call works well in ionic angular but does not work in the corresponding Android App. I have tested the angular app by running the command ionic serve, but on the Android Studio when I launch the app there is no record showing yet this same record shows in the web browser when I run the app in ionic studio as I mentioned above. The application is calling an https backend. Please, advise me on what I might be doing wrong, why the android app is not calling the api yet the same app calls APIs when I am using it as Progressive Web App.
Please refer to the attached pictures
API call from angular application
API call from Android App – Empty record
Both the desktop and the phone are connected to the same network.
I tried to research about it but could not solve the problem