Currently I am using axios, but it is not working in Android but working on Web Browser.
Any Solution?
Currently I am using axios, but it is not working in Android but working on Web Browser.
Any Solution?
I am using axios and it works in browser and android
See my dataservice.js here
It should work - you might be experiencing CORS issues. To dig deeper, please show some code and any error messages you’re getting.
Built into the browser, the fetch
API is an option.
You can also make native HTTP calls which helps avoid CORS, see the Capacitor Community HTTP plugin.
I also had a problem, where my local server api is http, and had to add a setting to allow insecure
Could you please tell me what setting have you added and where?
In this case, in my opinion, you just only have 1 option, and the problem why u unable to fetch API by using Axios.
cuz your backend doesn’t set up “CORS”, so maybe any API will fail or get errors.
Here is the linked talk about how to set up cors: https://ionicframework.com/docs/troubleshooting/cors
I worked on twice devices without any errors.