Open
Description
From the sample code, it seems like when I sign out first, theConfiguration becomes null and when I sign in after, it stays null and causes app crash.
So I've wrapped and exposed GoogleSignIn_Configure method in GoogleSignInImpl class, and when configuration changes, call it and problem gone.
I took a quick look at native code and seems like it would cause not much problem(anyway it keeps calling CallConfigure() on every signin-out action), But I'd like to double check if It't ok to do.
Here's code for my modified Configuration accessor in GoogleSignIn.cs :
public static GoogleSignInConfiguration Configuration
{
set
{
// Can set the configuration until the singleton is created.
if (theInstance == null || theConfiguration == value || theConfiguration == null)
{
if(theInstance != null && theConfiguration == null)
{
//From sign out, Instance stays non-null but theConfiguration is null.
//Needs configuration refresh.
theInstance.impl.Configure(value);
}
theConfiguration = value;
}
else
{
throw new SignInException(GoogleSignInStatusCode.DeveloperError,
"DefaultInstance already created. " +
" Cannot change configuration after creation.");
}
}
get
{
return theConfiguration;
}
}
Metadata
Metadata
Assignees
Labels
No labels