You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by GitBox <gi...@apache.org> on 2022/12/19 15:21:57 UTC

[GitHub] [cordova-android] zerealone opened a new issue, #1529: Can't call API's

zerealone opened a new issue, #1529:
URL: https://github.com/apache/cordova-android/issues/1529

   When I build a debug version of my app and tested it on my android phone, the API's I am using didn't connected to it but when I tested the HTML code itself (with the API's) on my pc it worked just fine.
   I am using cordova-android 10.1.1 and 30.0.3 as my android build tools sdk version.
   How to solve it?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-android] breautek commented on issue #1529: Can't call API's

Posted by GitBox <gi...@apache.org>.
breautek commented on issue #1529:
URL: https://github.com/apache/cordova-android/issues/1529#issuecomment-1357871622

   We need a lot more info... like what API your trying to use, how your trying to use it, perhaps some sample code.
   
   Please use the issue template instead of deleting it when you create your issue, it's there for a reason. Help us help you.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-android] zerealone commented on issue #1529: Can't call API's

Posted by GitBox <gi...@apache.org>.
zerealone commented on issue #1529:
URL: https://github.com/apache/cordova-android/issues/1529#issuecomment-1358857742

   I'm sorry for not using the template, I didn't understood how to use it.
   The API I am using is a simple weather API from WeatherApi.Com.
   I am using it by the fetch function in js and gets the output to a div.
   An example code :
   ```
   <div id="weather">Loading...</div>
   <script>
   fetch("the api url")
   .then((response) => {response.json()})
   .then((data) => {
       document.getElementById("weather").innerHTML = data.weather;
   })
   </script>
   ```
   With this code, the div stays on "Loading..." forever.
   
   I am not using any plugin, and I just removed the css and the js from the default index.html file I got in the www folder.
   
   Is there a solution for this issue?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-android] breautek commented on issue #1529: Can't call API's

Posted by GitBox <gi...@apache.org>.
breautek commented on issue #1529:
URL: https://github.com/apache/cordova-android/issues/1529#issuecomment-1359647145

   > I'm sorry for not using the template, I didn't understood how to use it.
   
   Its okay. For next time, when you create an issue it will have sections already in the form for things like version info, description of the problem and the expected vs actual results, etc. It's a guideline that makes it easier triaging issues.
   
   Here's a couple of things to try...
   
   If the api is using http, try using https. Android blocks all http/insecure requests by default. If the weather api doesn't offer a https endpoint, then you can enable cleartext, see https://cordova.apache.org/docs/en/latest/guide/platforms/android/index.html#android-quirks
   
   If it doesn't help, then you should remote debug your app so that you can gain more insights. If you haven't already, you need to enable developer mode, then inside Developer Options, enable USB Debugging. Then while the device is connected to your computer, inside the desktop Chrome, go to chrome://inspect and you should see your apps webview as a debuggable webview. See https://developer.android.com/studio/debug/dev-options#enable for a more detailed guide for enabling developer options / usb debugging. 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-android] breautek closed issue #1529: Can't call API's

Posted by GitBox <gi...@apache.org>.
breautek closed issue #1529: Can't call API's
URL: https://github.com/apache/cordova-android/issues/1529


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org