FirebaseAddOn Extension (To be sponsored!)

FIREBASE ADDON EXTENSION

Hello Builders!

I am super excited to contribute to AppInventor and all its distributions! My efforts are now oriented to develop the Firebase component. In you are interested, you can check this post (at :appybuilder:) if you want to check my progress.

In the meantime, @Andres_Cotes and I bring to you a Firebase AddOn Extension that is very useful specially if you want to authenticate with @mirxtrem_appsFirebaseAuth Extension V3.

Methods

  • Input: Method for registering the FirebaseDB component you want to get or set its FirebaseURL and FirebaseToken. Use can use it when initializing the screen.
    image

  • GetFirebaseToken: Method for getting the firebase token. Returns a string with the firebase token used in the registered FirebaseDB component.
    image

  • SetFirebaseToken: Method for setting the firebase token in the registered FirebaseDB component. Parameters: String: The new firebase token to be set.
    image

  • GetFirebaseURL: Method for getting the firebase URL. Returns a string with the firebase URL used in the registered FirebaseDB component.
    image

  • SetFirebaseURL: Method for setting the firebase URL in the registered FirebaseDB component. Parameters: String: The new firebase URL to be set.
    image

Best practices

In order to register the Firebase component you want to use in the FirebaseAddOn extension, use the input method when initializing the screen. Also, you can use SetFirebaseURL at this moment with an Obfuscated Text block to add a line of security against (instead of adding it in the Designer View).
image

If you are using @mirxtrem_appsFirebaseAuth Extension V3, after signing in with the provider of your choice. Set the FirebaseToken to the idToken you receive from the FirebaseAuthUserData. Also, if you want to use specific project buckets with information of your user, then set FirebaseDB1.ProjectBucket to users/localId for example.
image
image
By doing that, you are now ready to Store and Get values from your private Firebase Database.
image

When the user want to unauthenticate, you can use these blocks:
image
Known Issues about this method from the FirebaseDB component: It is known that the library that the component is using is deprecated. Using unauthenticate method will cause a Firebase error remembering that the library is deprecated. This extension is a temporary but effective solution to authenticate users using the FirebaseAuth extension. NOTE: The error will only appear when using the unauthenticate method. You can catch that error in the FirebaseError event handler.

For more information about Firebase Database rules, please check Firebase’s QuickStart Documentation.

Price

By donating USD$5 or more, I will send you the extension. When the donations reaches USD$40, the extension will be fully sponsored and liberated for free to all users.
Link to donate:

Why support by sponsoring extensions?

  1. Sponsoring gives you the opportunity to reward the developer for its efforts made to bring a feature you like/need in your projects.
  2. Get early access.
  3. Full support.

List of sponsors!

  1. @ivan_moreno
  2. Esko Rissanen
  3. Alexey Burkov
  4. Miguel Tarazona
  5. Michelle Pluas
  6. It can be you!

I want to know!

Now, I have a question for you. By answering it, maybe you can help other extension developers on how to monetize or take a little profit based on their efforts developing extensions. The poll is very simple:

Do you agree with supporting developers by sponsoring their extensions?

  • Definitely, I like to support new features.
  • Yes, but I think the target shouldn’t be greater than USD$50.
  • No, I like free stuff.

0 voters

11 Likes

Is it possible to set restricted read/write rules to Db using the extension and to grant authenticated access to specific node? With FirebaseAurh only unfortunately is not possible yet.

Yes, you can set those rules and only be accessed by authenticated users with the FirebaseAuthentication Extension V3 and this FirebaseAddOn Extension.

But the rules you have to set them in the Firebase Console, here is the documentation on how to do that.

3 Likes

Ok I will then try as soon as I can. Thanks for this nice extension.

2 Likes

We have a new sponsor! Thank you @ivan_moreno for your contribution!
To be fully sponsored and liberated, we need 7 sponsors more!

2 Likes

We have a new sponsor! Thank you Esko Rissanen for your contribution!
To be fully sponsored and liberated, we need 6 sponsors more!

2 Likes

We have a new sponsor! Thank you Alexey Burkov for your contribution! To be fully sponsored and liberated, we need 5 sponsors more!

We have two more sponsors! Miguel Tarazona and Michelle Pluas! Thank you for your contribution! We need only three more sponsors!

hi.
sorry but in my country the paypal not supported .
did you have another way to send the money to you.

hayder hashim
[email protected]

thank

Hola!
Yo compre la extension para no tener el problema del error “permission denied” que sale con firebase cuando las reglas estan puestas para usuarios registrados…
Sigo los pasos que dices en Best Practices pero no hay forma de que funcione. La utilizo junto con FirebaseAth de mirxtrems…
Yo hago una pantalla que es de registro o login, y una vez que se loguean, se abre una nueva ventana… Pero ni bien se abre la primer pantalla de registro o login, ahi ya sale el mensaje de “Permission denied”

Estuve probando todo tipo de combinacion con las reglas de firebase, pero no hay caso… Ahora las tengo asi:

{
“rules”: {
“.read”: true,
“.write”: “auth != null”
}
}

para que pueda leer cualquiera y solo escribir los usuarios registrados…
Si un usuario se loguea en una pantalla, tengo que pasar el token del firebase auth a la otra pantalla?

llevo dias con esto y hoy ya me canse y borre todos los bloques que tenia y lo empezare todo de cero… para evitar algun error que se me haya pasado…

De todas formas sobre este tema no hay un tutorial claro. La solucion que dan todos es darles permiso de lectura y escritura a todos en tu firebase… y no creo que eso sea muy seguro… no?

seguire intentando… si al final lo logro hare un tutorial jejeje

2 Likes

Hi Dr.Carlos Pedroza @CarlosPedroza27
I just donated
Please send FIREBASE ADDON EXTENSION to Email: [email protected] for me.
Thanks very much!

1 Like

Hi @CarlosPedroza27
I would like to receive this EXTENSION as soon as possible :heart_eyes:

1 Like

Does is give access to firebase storage with auth

hello I send you a payment by paypal you would like to send me the extension thanking you in advance

Good job. I’ve learned a lot on your YouTube channel. BUT I got a question:
“By doing that, you are now ready to Store and Get values from your private Firebase Database.”
Is this still working? Firebase token is deprecated according to Firebase.

Thank you!

Hi, did you get the extension? Is it working for private rules on database? Thank you

Hello, I have the same problem. Did you find a solution? Thank you

This works for me:

This post was flagged by the community and is temporarily hidden.

Hey, Is there any way we can build an app with MIT app inventor for different users, as we always have to add the firebase token and url in Firedatabase properties, we always have to edit it then compile the project, Can you please tell me if i can fill the token and url of firebase from outside the code and through the app itself using a text input? Please help me I am just a beginner , it is my first time. How can I pay for this extension? Is this extension going to let any user fill in his Firebase token and url and have access to his own database?