Hello Peter,
If I am not wrong, you can modify your code in order to do something like this:
"querySnapshot" is already an Array of objects, which is what the Report.Data must be.
Posts by DecSoft Hello Peter,
If I am not wrong, you can modify your code in order to do something like this:
"querySnapshot" is already an Array of objects, which is what the Report.Data must be.
I think we are talking about Javascript objects variables with their properties and values, because, what else? Maybe some defined data structure provided by the Firebase Javascript? We must talk about objects... but maybe "masked" by that structure...
Anyway... what is the problem, Peter? Sorry but I start to miss around (maybe we are mixing various things at the same time, and it's better to be more specific I think) can you output in the console the values that you get from the database? If so, what you can see? Is that the problem now?
P.S. If I am not wrong, the Firebase Javascript related code have some problem to run in Internet Explorer 11... you need to search around this too... and see if, in case that that code can't work in Internet Explorer 11... asume that the app can't work in Internet Explorer 11...
Hello Peter,
So maybe what happen is that the Firebase related Javascript is not compatible with Internet Explorer 11 (which is the internal debugger browser)? About the output... are you sure that we are not talking about JSON too? Maybe with a different format, to say like that... but finally some JSON objects?
Hello Peter,
If I am not wrong, the "console.info" don't work.... in the internal debugger... but for sure work if you try the app in a browser like Firefox with the developer console opened... so look if you can see something there... because at a first view the "Promise is undefined" error message don't say too much...
I will take a look... but I start by search for "output" and no results found... :-(
Hello Peter,
I am curious anyway... what kind of output provide the "non JSON" one? But it's ok... maybe this is not important (right now...), so yes, go ahead, start with what you think that you must to do, and, of course, on any problem, specific error, unexpected result, etc., post it here and we will try to help!
Hello Peter,
The problem is, of course, the time... I am busy with some customer's projects, also with my own ones... I have no time, for sure, to start to read about Firebase in a deep way right now, Peter. Maybe in the future, but for now maybe we can go ahead in a step by step way...
In principle, whatever thing that you can see working in an HTML file... must work in AB, because our AB apps are also HTML... of course we need what happen in the HTML file, what we do in that, in order to maybe "translate" and do the same thing in AB.
You mention that the database that you want to use don't provide JSON, but, you don't mention what is the format that the database provide... maybe you can use that format directly in AB (again, if the HTML file do it... in principle we can also do it...).
Another possible solution is to use a "bridge" between the database and our app. That is, we can prepare an app's server script, who deal with the database, and finally provide to the app the right data, maybe already converted to JSON, if we wanted that.
So please, try the above, and, of course, if you find any specific error or problem (this is important, that is, to be specific), don't hesitate to post it here, and we will try to help you as bes as possible.
P.S. I want to try your provided app XML, but, can't open it properly... please, take a look... and, if once you be sure that the code is correct, post it here: if then don't work... maybe you need to send me this specific XML (app) using my E-Mail address...
You're welcome! :-)
No problem! :-)
Hello Danny,
We can use an IFrame control like you can see in the "PDFViewer" app sample. We use here our own PDF viewer (the Mozilla PDF viewer). We can also use that viewer in order to shown the PDF using the "OpenWindow" action. Another possibility is to use the "OpenWindow" action without any viewer, but the system may have no viewers. Can be another possibilities like download the PDF file and open it, using the system default viewer. Depending the target platforms we can use one or another approach.
Hello Danny,
The "in app browser" window of the Apache Cordova "Browser" plugin is shown in full screen, and, we can't do nothing about: the user must use the back button of the devices to get back to our app. I think we no need a back button here... since the user know what to do... use the back button of the device... this is my opinion, of course.
So the only way to do what you wanted is to show the external URL inside an IFrame control. Doing that we can certainly place the IFrame and the Push button that we wanted in the app's view. The problem here can be two, but in fact it's the same: the external URL can refuse to be shown inside an IFrame, and, on the other hand, maybe the contents of the external URL don't shown as we can expected inside the IFrame.
We can say that the IFrames can be useful to shown our own external contents, but not "any" website, since the problems referred above. I am not sure if one of these problems is what you get: I am not sure if the external URL that you try to show refuses to be shown in the IFrame (I remember that I try your URL, and it's works inside the IFrame).
No problem, Ryan!
Hello Ryan,
That is (between other things) what you can see in the referred tutorial. If you need to assign a value to an AB variable from Javascript, you can use something like this:
Once that the "MyVariable" AB variable have the expected value.
Hello Ryan,
I am not sure if can understand... for that we have the StartJS and the EndJS actions: all the code inside that actions are considered Javascript code, so, we can use... Javascript code... to do whatever we need...
Hello Ryan,
Yes; the code between the StartJS and the EndJS actions is pure Javascript code. Take a look at this help tutorial about how to access AB controls and variables from pure Javascript code.
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.