We have an IONIC app where we call to an external service witch publishes a JSON object with data.
When we execute de app through > ionic serve, all works fine on the browser, but when we try to execute it on emulator, nothing happens after the get is executed.
We call it with:
//we pop a message just here, and the device shows it.
this.http.get('https://ourExternalSite.com/getData').subscribe(data => {
//do things. We put here a message that never pops
}, error => {
//do things, we also put here a message, that never pops neither
});
We've checked the https://ourExternalSite.com/getData url on the device, and is perfectly reachable and shows the JSON object.
We're not experts on IONIC, this app was developed by a subcontractor and we're trying to integrate it on our environment.
EDIT: I've tried to add a network_security_config.xml file into the project, as those answers propose: Http.get() working but not working in build(Release/Debug) in Ionic 4 Ionic Native HTTP does not work for Anroid 9 (Pie) and up?
But nothing changed
EDIT2: Ok, I narrowed the problem. It has to be with the use of https, if I change the call to a http petition all works fine!
So I supose that I need to somewhat enable the https calls on the network_security_config.xml file
Any help would be much appreciated.