Replies: 3 comments 4 replies
-
I have a working version, I noticed with this google login u need to log alot inorder to find issues. Context context = MainApplication.getInstance().getCurrentActivity();
credentialManager = CredentialManager.create(context);
CancellationSignal cancellationSignal = new CancellationSignal();
cancellationSignal.setOnCancelListener(new CancellationSignal.OnCancelListener() {
@Override
public void onCancel() {
Log.d("Java-App", "Getting credentials with Google was cancelled.");
Toast.makeText(context, "Cancelled.", Toast.LENGTH_SHORT).show();
}
});
Executor executor = Executors.newSingleThreadExecutor();
credentialManager.getCredentialAsync(context,
pendingGetCredentialHandle,
cancellationSignal,
executor,
new CredentialManagerCallback<GetCredentialResponse, GetCredentialException>() {
@Override
public void onResult(GetCredentialResponse result) {
handleSignIn(result );
}
@Override
public void onError(GetCredentialException e) {
handleFailure(e);
}
});
|
Beta Was this translation helpful? Give feedback.
2 replies
-
i think problem is on axmolActivity @halx99: @Override
protected void onPause() {
Log.d(TAG, "onPause()");
paused = true;
super.onPause();
AxmolEngine.onPause();
mGLSurfaceView.onPause();
mGLSurfaceView.setRenderMode(GLSurfaceView.RENDERMODE_WHEN_DIRTY);
}
@Override
protected void onStop() {
super.onStop();
rendererPaused = true;
mGLSurfaceView.onStop();
} When I add rendererPaused = true; to the onPause() function, the problem is solved. @halx99, do you think I could create a pool for it, or would that cause any issues? |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi. Since the previous version of Google login was deprecated, I need to implement the new version. However, I'm facing an issue with the following function. When the user successfully signed in or even makes a mistake, the game's UI no longer updates, and everything freezes. Does anyone have a solution for this?"
credentialManager.getCredentialAsync
doc
public static void signInWithGoogle(final String txt) {
GetCredentialRequest getCredRequest = new GetCredentialRequest.Builder()
.addCredentialOption(googleIdOption)
.build();
Beta Was this translation helpful? Give feedback.
All reactions