Reputation: 1
Cordova app stopped working after upgrading phone to Android 9
Here is the code that is sending requests
fetch('http://mydomain/restapi/example', { method: "GET" })
.then(handleErrors)
.then((response) => response.json())
.then((responseData) => {
console.log(responseData);
UpdateCurrentTemp(responseData);
GoodConnections++; // count sucessful connections
isConnected = true;
})
.catch((error) => {
ErrorConnections++;
console.error(error);
});
When phone is connected to wifi everything is working as expected, when switching to data over cellular, app stops working. I connected debugger, all GET requests are having status (pending).
I've tested access to API over cellular connection in REST client app, it's working fine.
Cordova web app works just fine over cellular data on this phone.
What did change in Android 9 that can cause this behavior?
Upvotes: 0
Views: 469