Dynamic data with cordova and mobile

Is there someone who has made a mobile application with wappler?
Do you receive the dynamic data from the mobile when you launch cordova?
If someone has done it, they can give me an advice, I am willing to pay for the service …

See:

Just don’t forget to enable CORS to your API project. We should add that to the docs as well @Teodor

1 Like

Hello Jorge:
I have already activated cors with the arterisk, I have already seen the complete wappler manual and there is no way to show the dynamic data by the simulator. I am in a cordova project and if I run as a web app it works the same as in a desktop application. Once simulated on the mobile, it no longer shows the dynamic data. I already think it is a wappler problem, something is wrong. Have you tried to perform a data query as an android project with cordova?

Hi Oscar

A month ago, you already asked questions about CORS in your app. In that topic, we gave tips for solving problems that in 90% of cases prevent getting data from your server in the mobile app. Did you apply all the recommendations from those materials? If Yes, what error do you get in the browser console if you choose the browser as the platform when building the app?

1 Like

Try debugging your app by using Chrome to connect to the emulated device. Very useful. You could also run the compiled apk in Android Studio and use the built in Log Cat tool to debug. Try this first though:

Will definitely help with diagnosis, and us with helping you resolving the issue once you can share with us the console output from Chrome. If this doesn’t work will try to help you out getting the app running in Android Studio and try the alternative route…

:wink:

In the chrome console it does not give me any error. The error seems to give it to me in chrome dev tools, I show an image of the error

Your app refers to a server action listCars.php at localhost: 8100

Your server must be hosted so that it (server actions) can be accessed by any users over the Internet. Only you have access to your localhost. Neither I nor anyone else can get data from this address, including your app.

But what does he mean?
I don’t understand you, I am on localhost because I am working locally. Is the error due?

The security of connections on Android has being tighten up and as you are not using https for secure connections, you will see this error, here is how to solve it:

Thank you very much Jorge, this is the problem, I have added these 2 lines to the config.xml file and it works perfectly …
Thanks a lot…
Captura de pantalla 2020-11-11 a las 16.18.07

Now the following happens to me:
If I configure the server as http, the application returns the data, but if the server I configure it as https it does not return the data, George, any advice?