Android Question (Solved) FirebaseStorage authproblem

DonManfred

Expert
Licensed User
Longtime User
i´m using the Example which is provided here.
I added the json i got downloaded from firebaseconsole to the project path.
The following log shows the programstart and then a click on the Sign in with Google.

It compiles fine and after start i got the layout to see with the buttons
Sign in with Google
Download public (enabled)
Upload Auth (disabled)
Upload User (disabled)

** Service (starter) Create **
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
** Activity (main) Pause, UserClosed = false **
sending message to waiting queue (OnActivityResult)
running waiting messages (1)
** Activity (main) Resume **
** Activity (main) Pause, UserClosed = false **
** Activity (main) Resume **

Earlier, when i clicked on this button the first time i got a questiondialog where i did select my google account to use this for authentification.

In the log i got the same output....

But starting with second try i always get only this log. No questiondialog is shown... My app goes to sleep and then it comes back with the log "sending message to waiting queue (OnActivityResult)".
But the Event which should raise
Based on this code in starter
B4X:
Private Sub Auth_SignedIn (User As FirebaseUser)
    Log($"Signed in: ${User}"$)
    CallSub(Main, "SignedIn")
End Sub
I would think THIS event must raise.. But it does not raise.
B4X:
Log($"Signed in: ${User}"$)
is not shown in the log in IDE.
Due to this the sub SignedIn is not called too.

But why?
 

Attachments

  • fbstorage.zip
    22.5 KB · Views: 316

DonManfred

Expert
Licensed User
Longtime User
Ok, got it! I forgot to enable Google SignIn in the Firebase console in AUTH tab.
After i enabled it and started the app again the event is now raised and i get the log and my real name is shown in the Label. The Buttons Upload Auth and Upload User are now ENABLED.

fbauth0055.png
 
Upvote 0

sunish

Member
Licensed User
Longtime User
In spite of enabling authentication, Iam getting "sending message to waiting queue (OnActivityResult)" what could be the issue ?
Looks like the part about authentication should be added to Erel's Firebase tutorials..
 
Upvote 0
Top