Android Question Problem with FirebaseAuth example

toby

Well-Known Member
Licensed User
Longtime User
Happy New Year!

I followed the instructions precisely to the best of my knowledge. However the following event was never raised:
B4X:
Sub Auth_SignedIn (User As FirebaseUser)
    Log("SignedIn: " & User.DisplayName)
    lblName.Text = "Hello: " & User.DisplayName
End Sub

Each time the Sign in with Google button was pressed, the following log entries would be added:
** Activity (main) Pause, UserClosed = false **
sending message to waiting queue (OnActivityResult)
running waiting messages (1)
** Activity (main) Resume **

I got the same result with both b4a7.30 and 7.80. Test phone: Asus zenfone 2, android 5.0. Could someone tell me what went wrong, please?

The complete debug log:
 
Last edited:

toby

Well-Known Member
Licensed User
Longtime User
After unchecking the Filter checkbox (it's checked by default), there were much more log information as shown below. The original package name b4a.firebase was used during previous attempt, so I appended 2 to it to have a new package name.

 
Upvote 0

toby

Well-Known Member
Licensed User
Longtime User
Erel,

Thank you very much for the speedy responses!

Below is the new log with your new firebaseAuth.jar file.

 
Upvote 0

toby

Well-Known Member
Licensed User
Longtime User
it also includes firebase console screenshot and latest unfiltered logs in logs.txt file.
 
Upvote 0

toby

Well-Known Member
Licensed User
Longtime User
Below is the unfiltered log with the new firebaseAuth.jar:

 
Upvote 0

toby

Well-Known Member
Licensed User
Longtime User
Sometimes it returned Success, still SignedIn event wasn't raised.

I used a few Google accounts during tests, and I didn't notice any difference.
 
Upvote 0

toby

Well-Known Member
Licensed User
Longtime User
It finally works after following your advice! Thank you very much, Erel, for your time.

To save time for those who run into similar situations, I list what I did below:
At b4a
1. Renamed the package name
2. Generated the private sign key
At firebase console
3. Selected a different project (I didn't create a new firebase project because I have another existing one)
4.Selected Authentication, selected sign in methods and selected google and saved the change.
5. Added a new app and downloaded the new Google-servivces.json file to the b4a project folder.
Back to b4a
6. Cleaned the project and ran the app.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…