Skip to first unread message

Padraig McGuire

unread,
Feb 12, 2017, 9:54:27 AM2/12/17
to MIT App Inventor Forum
Hi all

If this has being asked already then I appoligise.

I have 2 App Inventor Apps that both store data on a firebase DB. Each has there own DB name (based on app name)

Is there anyway 1 app can get the info from the other apps DB

Example 
App 1 stores data in FirebaseDB1
App 2 stores data in FirebaseDB2

App 1 needs to read data in FirebaseDB2
App 2 needs to read data in FirebaseDB1

Is this possible

Kind Regards
Padraig

Taifun

unread,
Feb 12, 2017, 10:30:26 AM2/12/17
to MIT App Inventor Forum
what about using 2 different FirebaseDB components?
Taifun

Trying to push the limits of App Inventor! Snippets, Tutorials and Extensions from Pura Vida Apps by Taifun. 

Padraig McGuire

unread,
Feb 12, 2017, 10:50:10 AM2/12/17
to MIT App Inventor Forum
Hi Taifun

Thanks for reply

If I was to use a second component would I need a second firebase token or something? As both apps save data in same project database but under there own package/app name 

Sorry if that sounds stupid but I m completely new to firebase

Kind Regards
Padraig

Taifun

unread,
Feb 12, 2017, 11:04:08 AM2/12/17
to MIT App Inventor Forum
after taking a look at the Firebase introduction document http://ai2.appinventor.mit.edu/reference/other/firebaseIntro.html as far as I can see, it's not possible us use 2 different apps and to access the same database

All users who have installed that same app (apk file) will get the same stored value. 

Note: When we say “the same app” we mean an app with the same name, created by the same developer. For example, if you build an app with FirebaseDB and later modify that app and rebuild it, the new app will still share values with the old app. On the other hand, if you change the name of your project, the old values will become inaccessible.   Also, if another developer uses your app source code (AIA file), the resulting app will not share variables with your app, even if the two apps have the same name.


you might want to experiment a little bit to check, if that's correct, see also tip 2 here

Taifun 

Padraig McGuire

unread,
Feb 12, 2017, 5:26:29 PM2/12/17
to MIT App Inventor Forum
Hi Taifun

Thank you for your quick replies.

I think I figured it out

App1 Created in App Inventor using a Firebase DB
App2 Created in App Inventor using a Firebase DB

Both apps have Different Names but both created in App Inventor with the same Account Details
Both have the SAME Firebaseurl (from project on Firebase.com)
Both have the SAME FirebaseToken (from project on Firebase.com look for database secrets its in there)
Both have the SAME Projectbucket (missed this earlier)

Firebase was really difficult to setup for app inventor and didnt find a lot of info out there about it

2. register a Spark account (Free)
3. create New Project on firebase.com
4. FirebaseURL is the ProjectDatabase url
5. FirebaseToken is found in the database secrets (under project settings / service accounts)
6. Projectbucket is the name where the data will be saved under in your firebase.com project

Again Thank you for all your help

Kind Regards
Padraig


Reply all
Reply to author
Forward
Message has been deleted
Message has been deleted
0 new messages