Open ZOlbrys opened 3 years ago
Hey @samtstern, I have looked into this issue and I have found out that for Android 11 the issue doesn't appear.
If the rotation has occurred in this page and the user press the back button from the same page to get back to the AuthMethodPickerActivity
, onCreate
will be called in AuthMethodPickerActivity
. The same won't happen for Android 8.1, the onCreate
method won't be called.
There is also one interesting part for Android 8.1, if you start the activity in either portrait or landscape and then rotate the screen(the opposite of the one used) on this page then press the back button to get to this activity then rotate to the initial orientation and then press the back button to close the dialog, the issue won't appear because onActivityForResult
gets called.
Would you have any suggestions what the issue could be ?
@laurentiu-git truthfully I have no idea at all, but thank you for the investigation! The "add account" flow has always been a source of bugs for us. I think it's a pretty deep system change (since Google accounts are so deeply integrated in Android) that's unlike any of our other sign-in flows.
@samtstern the same issue happens even if the dialog for "add account" doesn't appear(when the user doesn't have a google account connected to the android), it directly redirects the user to sign in and if after that the user does the same steps, then the AuthMethodPickerActivity
will be a grayed out layout even if the dialog is not present, since it was not present before.
But well it is true that it has the same flow.
@samtstern I've looked a bit more into this issue and it appears that on android oreo there were some changes made on screen rotation and before oreo, for example nougat, the issue doesn't reproduce and for newer versions, they've done some changes on screen rotation for the version pie and there are no issues(at least not in pie and r).
@laurentiu-git thanks for the explanations! If you have any ideas of what we should do in FirebaseUI to address this, let me know.
@samtstern I've tried to see if with the new activity result APIs introduced in AndroidX we would get a call for the onActivityResult
from ActivityResultCallback
, but it behaves as before, so I am out of ideas on what else I could try.
Welcome to FirebaseUI and thanks for submitting an issue!
Please take a look at open issues, as well as resolved issues, to see if your issue is either already being addressed, or has been solved by someone else.
If not, please feel free to fill in the following info so we can help faster!
Step 1: Are you in the right place?
Step 2: Describe your environment
Step 3: Describe the problem:
When rotating the device while logging into Google, if you press back to cancel the sign in, the loading overlay view does not get dismissed and the login provider buttons are not enabled.
Steps to reproduce:
Observed Results:
The user is unable to select any provider buttons/ do anything other than press back again to close the
AuthMethodPickerActivity
activity.Expected Results:
The user should be able to interact with the provider buttons/sign in as desired.
Relevant Code:
The
AuthMethodPickerActivity
does not haveonActivityResult
called in this case. If you do not rotate, it does get called, so I suspect the issue is in the missing communication when we have the rotation occur.