I have the following code snippet to connect to Firebase
mAuth = FirebaseAuth.getInstance();
GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)
.requestIdToken(getString(R.string.default_web_client_id))
.requestEmail()
.build();
mGoogleSignInClient = GoogleSignIn.getClient(this, gso);
...
The error is pointing to : GoogleSignIn.getSignedInAccountFromIntent..
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
if (requestCode == RESULT_CODE_SIGNIN) {
Task<GoogleSignInAccount> task = GoogleSignIn.getSignedInAccountFromIntent(data);
try {
Error:
android.app.Activity.dispatchActivityResult(Activity.java:8110), android.app.ActivityThread.deliverResults(ActivityThread.java:4839), android.app.ActivityThread.handleSendResult(ActivityThread.java:4887), android.app.servertransaction.ActivityResultItem.execute(ActivityResultItem.java:51), android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135), android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95), android.app.ActivityThread$H.handleMessage(ActivityThread.java:2017), android.os.Handler.dispatchMessage(Handler.java:107), android.os.Looper.loop(Looper.java:214), android.app.ActivityThread.main(ActivityThread.java:7397), java.lang.reflect.Method.invoke(Native Method), com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492), com.android.internal.os.ZygoteInit.main(ZygoteInit.java:935)]
I uploaded my app to the GooglePlaystore. When I downloaded it, the app opened up and when I tried to login, it keeps on asking me to select the gmail accounts signed in to my phone. I can't proceed. So I uninstalled it. I connected my phone to Android Studio and installed it and was able to login properly.
So what is the difference ? What is in my Playstore or in Firebase? How to fix this issue? My clients can't use it. Any help would be greatly appreciated.