Hello Danny,
Sorry, I see now your latest post. If the script works in an "alone" way, there is no reason to work calling it from AB, if you provide to the script the right arguments, of course. But, if something is wrong, if some argument is missing, then the script must provide the right response, so the client side (the AB app) can know what happen and what to do.
But remember: there is no differences between a call to the script "alone" and a call to the script "from AB"... in both cases we are talking about HTTP calls, that must include the right arguments, etc. If the AB calling to the script don't work... then something is wrong and you must investigate what happen.
Hello Danny,
Please, use the "code" HTML tag when you post code or console outputs, etc. About your last question, in fact it's not important if the script is called outside of AB or not, that is, the script expect certain arguments (comming from the POST input), and therefore they do their work. That is, except if you setup one, talking about this specific script, we no need to call it from AB in order to put it working.
But maybe the above is not what matter here... what matter here is that you can / must debug the script, and to do this you can call to the script using AB or another tool: probably it's better to call it using AB, so you are not only debugging the server script, but also the client side. But it's completely up to you how you debug the script. What I recommend is that you use a browser like Firefox with the Console developer opened, that is, launch the app (from AB) in Firefox or other browser.
Hello Danny,
We can talking here about two different things. You can try to put the URL inside an IFrame control, so you really see the external website inside an app view. This approach can be taken with caution, since the external website can disallow to be placed inside an IFrame control, or may they don't appear like we can expect.
The other way is to place a button or any other control and use the "OpenWindow" action to open the URL in another browser or "webview". If your target platform include some of the Apache Cordova supported, you can check the "Browser" plugin in App Options -> Cordova -> Plugins, so the "OpenWindow" action open the URL in an "in app browser" or in the system browser if you like (see the OpenWindow action help).
One thing to be noted is that we can't just use an HTML link in order to open the URL, because this cause that the user go out of the app scope, and, if they back to the app, what happen is that the app is started again. So we need to catch this kind of links in order to use the "OpenWindow" action, like I refer above.
P.S. For Cordova platforms like Android, in my honest opinion, the best is to use the "OpenWindow" action with the "_system" argument. Remember that the Cordova "Browser" plugin must be checked in the app options. Doing this the URL is opened in the system's browser, the preferred by the user to see web pages: I think it's better than using the "in app browser" option, even when this can be useful in some scenarios, of course.
Hello Danny,
May can be difficult to help in this case, even when we are happy to do it when possible. Taking a look there is no syntax errors in the script, so, they must work, at least in order to see what happen. Since you are using the stuff provided by the Database app sample, look at the "Initialization.php" script, and, change the below lines:
... by the below lines:
Doing that we are ready to receive any possible PHP error. But that's what we can do... debug the HTTP call to see what happen, place some "echo" in the script that can help us to see what happen, in few words: debug the script...
Check that the database connection is OK, look for the HTTP call response (is the Error event of the HTTP client fired?). Do it in a brower like Firefox with the Console Developer open: this offer to us lot of information about the HTTP call, what code response we get, what response text, etc.
Please, try the above, and, post here what happen, if you get an specific error message, etc.
Hello Ryan,
Look at the App Options -> Cordova -> Plugins. There are various plugins that can be installed just by checking the checkbox that you can see, one of them is the Network plugin for Cordova.
No problem Ryan! Please, take a look at the samples... because there are various samples that uses Cordova plugins... look at the app's options, in particular at the app's Cordova options: some of them are related with the Cordova plugin or can be used to install and configure it, for example. Just ask if you have any questions about!
Hello Ryan,
I have not experience using PouchDB (maybe other customers can post here something about) even when here in this forum it's possible to find some posts related with PouchDB. The main problem with offline data is that the browsers vendors (probably with good reasons) don't allow us to use the file system, so, we can't store database files, etc. We can use the app's local storage, but, maybe it's not enough (even when it's quite powerful).
Talking about Android and other platforms the above problem do not exists, that is, in this case we can access the file system using some Apache Cordova plugins, in fact, we have actions ready to use like "FileRead" and "FileWrite". Just this can be a possible way to store not only text files, but also JSON files, for example, so we can load it and use it in our apps in an "offline" way.
We can't forget the server's databases, since they can offer us all their power, and we can just use certain scripts in the server side in order to communicate with that databases and work with them. I don't have experience using some Apache Cordova SQLite plugin, but I am sure that must works as expected, so, if our targers are Cordova platform's and not the browsers (even when we can provide another approach in this last case) we can think to use an Apache Cordova plugin to deal with SQLite... or maybe another kind of client databases too.
Hello Ryan,
The most easy way to get ready with an Apache Cordova plugin is to use the App Options -> Cordova -> Custom plugins. Inside the Custom plugins textarea you can add one or more plugins IDs, in this case "cordova-sqlite-storage". Once you do that, DecSoft App Builder generates the right stuff in the Cordova's BAT files, in order to install that plugins and put it available into the app.
Remember that all the Cordova plugins requires to wait until the app's Ready event (or after) in order to be used. Of course, what you must use is the Javascript API provided with that Apache Cordova plugin in question.
P.S. Please, remember that it's possible (and recommendable) to use some HTML tags in our posts, like paragraphs (P tag) or the "code" tag, very useful when we need to post code or console outputs here.
Hola Juan,
Sí; afortunadamente, el mensaje de error estaba claro esta vez. En todo caso es bien saber que podemos proporcionar la ruta del archivo mediante las opciones de la app, pues así nos ahorraremos hacerlo "a mano" cada vez.
Hola Juan,
Pareciera que lo primero que hay que solucionar es el hecho de que no se encuentre el archivo "google-services.json". Fíjese en el siguiente código XML, que, deberá situar en Opciones de la app -> Cordova -> Configuration -> Extra XML:
Note el atribute "src", esto es, deberá apuntar al archivo "google-services.json" que le ha proporcionado Google. Se trata de una ruta relativa al directorio de compilación de la app. En principio no debe tocar el atributo "target", pues, la ruta que se indica es la adecuada.
P.S. Por favor, Juan, utilice la etiqueta HTML "code" cuando publique mensajes de error, etc. De este modo no tendrá que añadir etiquetas "BR" y además, como puede ver, dichos mensajes de error, código, etc., se leerán mejor si están dentro de una etiqueta "code".
Hola Juan,
Por favor, para otra vez, abra un nuevo hilo en el foro para nuevas preguntas. Respecto del error que encuentra, lo cierto es que no tiene nada que ver con App Builder, como sabe, sino con Apache Cordova, o, más particularmente, con el plugin que trata de instalar. Estos plugins suelen tener su página de soporte, etc. O buscando por Google con el nombre del plugin más "Apache Cordova", también por el propio mensaje de error, es probable que encontremos la información que necesitemos.
En todo caso, me llama la atención que quiera instalar el plugin "cordova-android-firebase-gradle-release" en particular, puesto que, no parece que sea el propio plugin para usar Firebase, sino, una especie de solución o parche para evitar ciertos problemas en determinados escenarios. Como digo, este plugin que usted trata de instalar, acaso no sea necesario, sino que deberá instalar otro plugin, que, será el que precise para lo que necesita hacer.
Esto último puede sonar un poco críptico, pero, es que, según parece, hay varios plugins relacionados con Firebase, de modo que, seguramente, habremos de elegir el plugin que nos proporcione el API que necesitamos. Entonces, tengo que preguntar, ¿de qué se trata? ¿De acceder a una base de datos? ¿De otra cosa?
¡No hay de qué, Juan! ;-)
Hello Ryan,
Centering in this specific error, it's caused by the Report "reportContracts" placed in the "ContractList" app view, specifically you assign the value "[Item.contract_name]" to the Report Order variable in the designtime control inspector, but this is the possible expected value. That assignment causes certain syntax error that ends in the errors that you can see.
Take a look at the Report control help, specifically at the, "Order" variable description. To fix the problem right now just remove the referred value from the referred "Order" variable.
Hello Ryan,
Not common errors for sure... probably you can't reproduce it in a new app... please, try to delete the "_Compiled" directory of the app and compile it again.
Everybody can read the DecSoft support forum for learning purposes, however only DecSoft customers can post new threads. Purchase one or more licenses of some DecSoft products in order to give this and other benefits.