Remark: USE ALWAYS @DonManfreds MOST RECENT Wrap of the Firebase-Realtime-Database-Library
The testproject is intended to help the community to get started with the Firebase Database as an useful addition to the RAD environment of B4X
It has two different activities to test the two variants of database access:
a) Realtime --> Event driven access to data
b) REST --> "representational state transfer" with commands integrated in an URL
It is an extended version of the first REST project
here.
Unfortunately this testproject is not finished yet:
- The REST part is working fine
- The REALTIME part is in a growing status with a problem in testfibart.writeNewPost(...) as
the push.key function of the library generates not the expected key fixed since 1.20
- and the map for "updateChildren is not accepted
This project will be made available to the community as soon as the REALTIME part is finished.
Picture 1: Key-problem [Solved]
Picture 2: updateChildren problem
Link 1:
https://firebase.google.com/docs/reference/android/com/google/firebase/database/DatabaseReference#push()
Link 2:
https://github.com/firebase/quickst...base/quickstart/database/NewPostActivity.java
The following prerequisites should be done before the first test:
1. Be sure to have YOUR "google-services.json" file in your B4A project folder
2. Goto service module "Starter" and set up your Firebase parameters in Process_Globals
3. Set up your database RULES in the Firebase console
4. Set up Firebase auth
5. In the "Files"-folder is a file with testdata that you MAY IMPORT in the Firebase console: "fir-quickstartsforandroid-testdata.json"