MicrosoftDocs / CordovaDocs

content repo for Apache Cordova on docs.microsoft.com
https://docs.microsoft.com/en-us/visualstudio/cross-platform/tools-for-cordova/
Creative Commons Attribution 4.0 International
14 stars 31 forks source link

getJSON not working when debugging to Android Device #73

Open DataMonitor opened 4 years ago

DataMonitor commented 4 years ago

[Enter feedback here]

Hi.

I have set up and tested the WeatherApp. it works perfectly when run in any of the emulators. however when I set it to debug to my Android device ( Samsung A50) the app appears fine on the device and allows me to enter the ZIP code, but then I get the error message saying : Error retrieving data. Error

subsequent testing clearly indicates that the getJSON() function is failing on the device. I also tried changing this to an XMLHttpRequest to obtain the weather api URL. It also works on the emulator but fails on the device.

what could be causing these to fail on the device but work in the emulators ?

Look forward to hearing.

regards Jon McKenna

Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.