Geliştirici dokümanları aracılığıyla Google+ oturum açıyorum. RESOLUTION_REQUIRED
(Hata kodu 6) hatasıyla oturum açmak için bir hesap seçtikten sonra onConnectionFailed
yöntemlerimi çağırıyor. Bu, aynı hesabı seçersem daha sonra çalışacak başka bir "Hesap Seç" iletişim kutusunu başlatır (izinlerimi alır). Neden başka bir diyalog sorduğundan emin değilim. resolveSignInError
ile başlıyorum Herhangi bir anlayış?Google Plus 'Bir Hesap Seç' iletişim kutusu iki kez görüntüleniyor
Ayrıca, 'Bir hesap seç' seçeneğinden bir hesap seçmek izinleri gösterir, eğer o noktada iptal edersem ve kadrandan başka bir hesap seçerse, izinler için yanlış görüntüyü veya bazen hiç resim olmadığını gösterir. Ayrıca bir kez An internal error has occurred
tost aldım.
@Override
public void onConnectionFailed(ConnectionResult connectionResult) {
if (!mIntentInProgress) {
// Store the ConnectionResult so that we can use it later when the user clicks
// 'sign-in'.
mConnectionResult = connectionResult;
if (mSignInClicked) {
// The user has already clicked 'sign-in' so we attempt to resolve all
// errors until the user is signed in, or they cancel.
resolveSignInError();
}
}
}
private void resolveSignInError() {
if (mConnectionResult != null && mConnectionResult.hasResolution()) {
try {
mIntentInProgress = true;
startIntentSenderForResult(mConnectionResult.getResolution().getIntentSender(),
RC_SIGN_IN, null, 0, 0, 0);
} catch (IntentSender.SendIntentException e) {
// The intent was canceled before it was sent. Return to the default
// state and attempt to connect to get an updated ConnectionResult.
mIntentInProgress = false;
mGoogleApiClient.connect();
}
}
}
@Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
if (requestCode == RC_SIGN_IN) {
if (resultCode != RESULT_OK) {
mSignInClicked = false;
}
mIntentInProgress = false;
if (!mGoogleApiClient.isConnecting()) {
mGoogleApiClient.connect();
}
}
}
Teşekkürler. Ben bir super.onActivityForResult() vardı ve onu kaldırarak (sadece ben sonuçta kendimi işlemediğinde arama) sorunu çözdü. – Ridcully