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.
Hello Ryan,
Yes; not only you can... in fact, is the preferred way: the server's response can be (always that is possible) an Array of objects, that is, something that we can directly assign to the Report.Data variable.
Hello Ryan,
Before go ahead, and, since the server's response is an Array of objects, please, try to directly assign the server's response to the report's data variable: in other words, probably you no need to iterate over the server's response, just assign the server's response to the report's data variable. You can use the "CopyVar" or the "ArrayConcat" actions, for example.
Hello Ryan,
It's difficult to say, after take a look at your code, which appear fine, that is, I can't see right now anything rare or wrong, so, that code must work as expected. You must debug what happen, Ryan, for example, take a look at the browser's console (use Firefox, Chrome or other browser) for the HTTP Client response: look if that is what you expect, and, also look if some possible error occur (and it's placed in the browser's console).
P.S. If you want to provide an app which can reproduce the problem, please, don't hesitate to send me the app at info@decsoftutils.com
Hola Juan,
Creo que este reciente hilo en el foro puede ser de su interés. Está en inglés, pero, como digo, creo que puede resultarle útil, pues contiene un sencillo ejemplo "Hello world" que utiliza Firebase desde DecSoft App Builder.
Hello Peter,
You don't mention the error that you get... even in the AB debugger: because we are talking about a syntax error. The problem is caused by the syntax used in the below line:
On the other hand, maybe other changes are also needed, for example, how you want to shown or use the value get from the database. If you place an "Input1" control in the app view, and, the below code in the app view Show event, you can see the things working as expected, that is, once the value is retrieved from the database, it's placed in the "Input1" control:
You can also copy the below code in a file and save it as "MyApp.ab", for example, then open it with DecSoft App Builder and run the app:
Hola Juan,
En su código Javascript se incluye la referencia a ciertos otros archivos Javascript, pero, dichas referencias tendrá que incorporarlas a la app usando el "Gestor de archivos" (app's File manager). Una vez especifique los archivos Javascript necesarios (usando sus URLs, por ejemplo, así como cualquier posible y necesaria "query", como podrá ver en el "Gestor de archivos"), podrá utilizar el código Javascript que necesite.
Ha de empezar por ahí... y, si encuentra después algún otro error, por favor, refiéralo aquí y trataremos de ayudarle.
P.S. He editado su mensaje de modo que ahora aparece el código Javascript, pero, sin las referencias antes mencionadas: en principio ese será el código Javascript que acaso tendrá que usar.
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.