I’m super excited for the opportunity to collaborate with Appybuilder now that it is opensource! I don’t have a formal education in programming, but what I have learned it is thanks to AppInventor and its distributions.

So I took the step to edit a component that I like very much, and find it very useful for nowadays apps like FirebaseDB. To be able to participate, I researched the library used and found its documentation available at: FirebaseDocumentation.

The main features I would like to add are:

GoOnline and GoOffline methods to “save” data usage and manually reestablish a connection or disconnect to the Firebase server.

Authenticate users. Be able to use the rules to set a database private and access it only with authenticated users.

Firebase Analytics

Editing-Component First Experience

First of all, when a first tried my first feeling was:
Wow! Editing a component is a very hard work!

I didn’t know about the internationalization process because it isn’t needed for Extension Developing. It cost me a few hours to understand it and avoid those errors when building from the sources. But here I am! Ready to share.

First Feature: GoOnline and GoOffline methods

This is the first feature I accomplished editing the FirebaseDB component:

GoOnline: A method to manually reestablish a connection to the Firebase server and enable automatic reconnection.

GoOffline: A method to manually disconnect the Firebase client from the server and disable automatic reconnection.

These methods are useful to decide whether the app will be continuosly trying to connect to the server. When offline, the user will be able to store values to the database, but they only are going to sync when using the GoOnline method again.

I am new to GitHub, I will learn how to make a Pull Request(?) to add it to the AppyBuilder and AppInventor sources. I share it here because it is very simple, and in case I don’t figure out how to make it

Second Feature: Authenticating users

I think this is the main feature I would like to add.
This can be achieved by two ways:

For the first solution, it is required to show a Property Block to set the FirebaseToken given by the extension after authenticating. It will lead to be able to set the rules to the database to private and access it only by authenticated users.

That block already exists, but it cannot be seen. My modification proposal is: (I still have to test this)

For the second solution, I tried to use .createUser() and .authWithPassword() methods from the FirebaseDocumentation, but it returns: a FirebaseError that says: Project created at console.firebase.google.com must use the new Firebase Authentication SDKs available from firebase.google.com/docs/auth. This means that it cannot be done with the library used, we will have to add the new library in order to achieve this.

Here I share the code I used, it is very simple because I wanted to try it first:

Third feature: Firebase Analytics

I didn’t make any progress in this feature because it needs the new library as well. (Homework!)
Noob question: Is it a way to get the .jar or .aar file in order to use it in the component by using Gradle in Android Studio? (I don’t how Gradle works)

I really like this idea because you don’t have to set your database on public this should be put into appybuilder online please I’m waiting for this sooo long

Right now, this is possible using two extensions: @mirxtrem_apps’ FirebaseAuth Extension V3 and my recently published FirebaseAddOn extension. This is a temporary solution until I achieve updating the Firebase Component to the latest Firebase library. By sponsoring my FirebaseAddOn extension, you are also sponsoring my work with the Firebase component. Please check this post where I provided an example to know how to use them.