![]() If(Target.Platform = UnrealTargetPlatform.Android)ĭynamicallyLoadedModuleNames.Add("OnlineSubsystemGooglePlay") Use a UPL per project, this is the section in my Android_UPL.xml file that does this: There are some different behaviors you can use detailed here …ndroid/sign-in I believe the default behavior is once you have signed in, it will continue to use that account. Log.debug("Google Client Connect result was a failure") NativeGoogleClientConnectCompleted(false, "NOT_ACQUIRED") Log.debug("Google Client Connect failed to get auth token: " e.getMessage()) NativeGoogleClientConnectCompleted(true, "NOT_ACQUIRED") Log.debug("Google Client Connect succeeded but no access token returned") NativeGoogleClientConnectCompleted(true, mServerAuthCode) Log.debug("Google Client Connect succeeded") String mServerAuthCode = account.getServerAuthCode() GoogleSignInAccount account = result.getSignInAccount() Log.debug("Google Client Connect: Getting account") In the activityResult method on line 4554 StartActivityForResult(intent, RC_SIGN_IN) Intent intent = mGoogleSignInClient.getSignInIntent() Replace everything in AndroidThunkJava_GoogleClientConnect() method, also the reason a UPL cannot be used (around line 4293) Log.debug("mGoogleSignInClient is " ((mGoogleSignInClient = null) ? "disabled" : "valid")) Log.debug("GoogleSignIn exception caught: " e.toString()) MGoogleSignInClient = GoogleSignIn.getClient(this, gso) GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_GAMES_SIGN_IN) This needs to be modified for each project Place this in the onStart() method, I dropped it right after $$$$ on line 3087 Private GoogleSignInClient mGoogleSignInClient Private static final int RC_SIGN_IN = 9001 Place this somewhere with the rest of the variable declaration. Place these somewhere in the import section In whatever text editor you prefer and add the following: UE_4.25\Engine\Build\Android\Java\src\com\epicgames\ue4\ I managed to implement a fix (it’s not pretty) and since I did not want to use a source version of UE4 but still wanted to use the OnlineSubsystem stuff, I had to modify the GameActivity template since there is no way to modify the code that is called by the OnlineSubsystem with a UPL. To sum it up, getting an Auth token is broken in UE4 which is required for PlayFab to use the LoginWithGoogle authentication method. I had to do this for a project but since it was such a pain, I thought I would share it here since I couldn’t find anything on the internet.
0 Comments
Leave a Reply. |