LoginButton을 클릭해도 아무런 반응이 없습니다

개발가이드를 참고 하여 LoginButton을 LoginActivity에 올렸습니다.

그러나 클릭을 했을 때 아무런 이벤트가 일어나지 않고 있습니다.

GlobalApplication, LoginActivity 중에 잘못 된 것이 있을거 같으나 차이를 잘 찾지 못했습니다.

방법을 알려주시면 감사하겠습니다.

LoginActivity 입니다.
public class KakaoLoginActivity extends Activity{

private SessionCallback callback;      //콜백 선언
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    setContentView(R.layout.kakao_login_layout);

    callback = new SessionCallback();                  // 이 두개의 함수 중요함
    Session.getCurrentSession().addCallback(callback);
    Session.getCurrentSession().checkAndImplicitOpen();

}

@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
    if (Session.getCurrentSession().handleActivityResult(requestCode, resultCode, data)) {
        return;
    }
    super.onActivityResult(requestCode, resultCode, data);
}

@Override
protected void onDestroy() {
    super.onDestroy();
    Session.getCurrentSession().removeCallback(callback);
}

private class SessionCallback implements ISessionCallback {

    @Override
    public void onSessionOpened() {
        redirectSignupActivity();  // 세션 연결성공 시 redirectSignupActivity() 호출
    }

    @Override
    public void onSessionOpenFailed(KakaoException exception) {
        if(exception != null) {
            Logger.e(exception);
        }
        setContentView(R.layout.kakao_login_layout); // 세션 연결이 실패했을때
    }                                            // 로그인화면을 다시 불러옴
}

protected void redirectSignupActivity() {       //세션 연결 성공 시 SignupActivity로 넘김
    final Intent intent = new Intent(this, KakaoSignupActivity.class);
    intent.setFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION);
    startActivity(intent);
    finish();
}

GlobalApplication 입니다.
public class GlobalApplication extends Application {
private Typeface notoLightFont;
private Typeface notoBoldFont;

//카카오 로그인에 필요
private static volatile GlobalApplication instance = null;
private static volatile Activity currentActivity = null;

@Override
public void onCreate() {
    super.onCreate();

    instance = this;
    KakaoSDK.init(new KakaoSDKAdapter());

    Typekit.getInstance()
            //.addNormal(Typekit.createFromAsset(this, "NotoSansKR-Light-Hestia.otf"))
            .addNormal(Typekit.createFromAsset(this, "NotoSansKR-Medium-Hestia.otf"))
            .addBold(Typekit.createFromAsset(this, "NotoSansKR-Bold-Hestia.otf"));
            /*.addItalic(Typekit.createFromAsset(this, "Double_Bubble_shadow_italic.otf"))
            .addBoldItalic(Typekit.createFromAsset(this, "Double_Bubble_shadow_italic.otf"))
            .addCustom1(Typekit.createFromAsset(this, "soopafre.ttf"))
            .addCustom2(Typekit.createFromAsset(this, "Break It Down.ttf"));*/
    notoLightFont = Typeface
            .createFromAsset(this.getAssets(), "NotoSansKR-Light-Hestia.otf");
    notoBoldFont = Typeface
            .createFromAsset(this.getAssets(), "NotoSansKR-Bold-Hestia.otf");
}

public static GlobalApplication getGlobalApplication(Context context) {
    return (GlobalApplication) context.getApplicationContext();
}

public void setNotoLightFontToView(TextView... views) {
    for(TextView view : views) {
        view.setTypeface(notoLightFont);
    }
}

public void setNotoBoldFontToView(TextView... views) {
    for(TextView view : views) {
        view.setTypeface(notoBoldFont);
    }
}

//카카오 SDK 부분
private static class KakaoSDKAdapter extends KakaoAdapter {
    /**
     * Session Config에 대해서는 default값들이 존재한다.
     * 필요한 상황에서만 override해서 사용하면 됨.
     * @return Session의 설정값.
     */
    @Override
    public ISessionConfig getSessionConfig() {
        return new ISessionConfig() {
            @Override
            public AuthType[] getAuthTypes() {
                return new AuthType[] {AuthType.KAKAO_LOGIN_ALL};
            }

            @Override
            public boolean isUsingWebviewTimer() {
                return false;
            }

           /* @Override
            public boolean isSecureMode() {
                return false;
            }*/

            @Override
            public ApprovalType getApprovalType() {
                return ApprovalType.INDIVIDUAL;
            }

            @Override
            public boolean isSaveFormData() {
                return true;
            }
        };
    }

    @Override
    public IApplicationConfig getApplicationConfig() {
        return new IApplicationConfig() {
            @Override
            public Activity getTopActivity() {
                return GlobalApplication.getCurrentActivity();
            }

            @Override
            public Context getApplicationContext() {
                return GlobalApplication.getGlobalApplicationContext();
            }
        };
    }
}
public static Activity getCurrentActivity() {
    return currentActivity;
}

public static void setCurrentActivity(Activity currentActivity) {
    GlobalApplication.currentActivity = currentActivity;
}

/**
 * singleton 애플리케이션 객체를 얻는다.
 * @return singleton 애플리케이션 객체
 */
public static GlobalApplication getGlobalApplicationContext() {
    if(instance == null)
        throw new IllegalStateException("this application does not inherit com.kakao.GlobalApplication");
    return instance;
}

/**
 * 애플리케이션 종료시 singleton 어플리케이션 객체 초기화한다.
 */
@Override
public void onTerminate() {
    super.onTerminate();
    instance = null;
}

//카카오 SDK 부분

}

Activity 쪽에서 GlobalApplication.setCurrentActivity()를 부르시지 않고 계신 것 같은데요. 샘플앱 코드를 보시면 이 기능을 BaseActivity 클래스에 넣어 모든 activity들이 이 클래스를 상속하도록 합니다. 이렇게 현재 앱에서 유저에게 노출되어 있는 액티비티를 세팅해주면 SDK에서 이 화면 위에 로그인 화면 등등을 보여주게 되는데요. 이 부분 수정해 보시고 그래도 안되면 다시 댓글 남겨주세요 :slight_smile:

원인을 발견 했습니다.

MainActivity에서 로그인버튼을 생성 후 누르면 실행이 되나

Intent로 새로운 액티비티를 만든 뒤 실행을 하면 버튼 클릭이 되지 않는 것을 확인했습니다.

이 문제를 해결 할 수 있는 방법을 알려주시면 감사하겠습니다.

로그인 창이 실행되는 것을 확인했습니다.

덕분에 다음 단계로 진행이 될 거 같습니다.

알려주셔서 감사합니다.