Hello,
I am new to the platform and I was able to complete this tutorial Firebase Authentication in App Inventor Using Javascript as shown below screenshot with the help of @Ria_Das :
But I do not know how and where to add/or configure these files:
However, the tutorial does not explain or give steps to compile the app all the way to download as an APK for Android.
Can someone please guide me on how to have an APK from this screenshot?
Thank you.
Taifun
November 7, 2023, 9:16pm
2
http://ai2.appinventor.mit.edu/reference/other/appstoplay.html
Taifun
This is only 1 file called FirebaseAutenticator.html
You will have to upload it in the Media section into the assets of your app
You also can replace the if then else block and just write
http://localhost/FirebaseAutenticator.html
as HomeUrl
Taifun
Thank you @Taifun .
I am having this error:
Please any idea on how to fix it?
Thank you.
Try to test it with phone and companion not an emulator.
the Android emulator will not emulate the html. My emulator will not emulate a javascript either.
the Project works on a real Android device.
the Project does not work on ios; possibly a bug.
Borrow a friend's Android and test. It will work on a real Android device but not on the basic emulator or ois..
Thank you @Ria_Das
I have an Android and I just tried it with AI Companion also built as apk and I am having the same error.
I suspect the FirebaseAuthenticator.html path... but don't really know where to start troubleshooting.
Maybe the credentials:
I am confused as I don't really know coding and just wanted to follow the tutorial to complete my school assignment.
Have you tried ?
Also did you set debugMode to false before building apk ?
I replaced the if if-then block with http://localhost/FirebaseAutenticator.html , now on the Android and emulator it is changed to 404 Not Found
Please any idea?
Anke
November 8, 2023, 8:53am
9
This should work with Companion & the APK. Did you check it? If so, and you still get an error message, post the relevant block(s).
Ria_Das
November 8, 2023, 10:01am
10
Maybe the specific quide is outdated ? I tried to follow it and got the same error, 404 not Found. Tested with companion and as apk. Html is in assets and use local host to load it
Ria_Das
November 8, 2023, 10:53am
12
Now, with your extension html part is loaded perfect but doesn't run the script part even though my firebase's credentials are correct.
Ria_Das
November 8, 2023, 12:09pm
13
Managed to make it work, changes made...
Blocks are dragable
Aia to test
firebase_javascript.aia (16.5 KB)
1 Like
TIMAI2
November 8, 2023, 12:17pm
14
Is this necessary?
http://localhost/FirebaseAuthenticator.html
should work in all Android versions and in Companion and compiled ?
Ria_Das
November 8, 2023, 12:20pm
15
Tested with android 9, with companion and as apk and didn't work for me. See #post10
Anke
November 8, 2023, 12:38pm
16
Ria_Das:
Tested with android 9
Btw, READ
permission is incorrectly requestet on Android 9 (Companion).
Ria_Das
November 8, 2023, 2:27pm
17
You are absolutely right, tested again with localhost and works. Don't know why I got that error...
As for @Martial_Dong 's problem I noticed a missing not block
instead of
and maybe he has to check again that html file loaded in assets is named FirebaseAuthenticator.html and his credentials
Test aia
firebase_javascript_1.aia (11.9 KB)
1 Like
system
Closed
November 15, 2023, 10:40pm
19
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.