–
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_apps’ FirebaseAuth 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.
-
GetFirebaseToken: Method for getting the firebase token. Returns a string with the firebase token used in the registered FirebaseDB component.
-
SetFirebaseToken: Method for setting the firebase token in the registered FirebaseDB component. Parameters: String: The new firebase token to be set.
-
GetFirebaseURL: Method for getting the firebase URL. Returns a string with the firebase URL used in the registered FirebaseDB component.
-
SetFirebaseURL: Method for setting the firebase URL in the registered FirebaseDB component. Parameters: String: The new firebase URL to be set.
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).
If you are using @mirxtrem_apps’ FirebaseAuth 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.
By doing that, you are now ready to Store and Get values from your private Firebase Database.
When the user want to unauthenticate, you can use these blocks:
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?
- Sponsoring gives you the opportunity to reward the developer for its efforts made to bring a feature you like/need in your projects.
- Get early access.
- Full support.
List of sponsors!
- @ivan_moreno
- Esko Rissanen
- Alexey Burkov
- Miguel Tarazona
- Michelle Pluas
- …
- …
- 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