Closed tazan83 closed 1 year ago
@mbkim95 답변 감사합니다.
알려주신 사용법으로 해보았으나 여전히 발생하여 example 기준으로 테스트 해본 결과, 아래와 같은 로그를 확인했습니다.
리스트 내 loginWithKakaoAccount() 선택 > "카카오계정으로 간편가입" 화면 진입 시 MyApp이 다시 빌드 되는 것 같습니다.
혹시 이 현상이 정상인지 추가 문의 드립니다.
Launching lib/main.dart on SM N960N in debug mode...
✓ Built build/app/outputs/flutter-apk/app-debug.apk.
I/flutter.exampl(11491): Late-enabling -Xcheck:jni
E/flutter.exampl(11491): Unknown bits set in runtime_flags: 0x8000
W/flutter.exampl(11491): Accessing hidden method Landroid/view/accessibility/AccessibilityNodeInfo;->getSourceNodeId()J (greylist, reflection, allowed)
W/flutter.exampl(11491): Accessing hidden method Landroid/view/accessibility/AccessibilityRecord;->getSourceNodeId()J (greylist, reflection, allowed)
W/flutter.exampl(11491): Accessing hidden field Landroid/view/accessibility/AccessibilityNodeInfo;->mChildNodeIds:Landroid/util/LongArray; (greylist, reflection, allowed)
W/flutter.exampl(11491): Accessing hidden method Landroid/util/LongArray;->get(I)J (greylist, reflection, allowed)
Connecting to VM Service at ws://127.0.0.1:53412/vqAUxE3wOyw=/ws
I/flutter (11491): =====MyApp build=======
I/flutter (11491): =====MainPage build====
W/Gralloc3(11491): mapper 3.x is not supported
I/gralloc (11491): Arm Module v1.0
I/OpenGLRenderer(11491): doUpdatePositionAsync is called and callVoidMethod
I/ViewRootImpl@f66654e[MainActivity](11491): ViewPostIme pointer 0
I/ViewRootImpl@f66654e[MainActivity](11491): ViewPostIme pointer 1
[log] [🔬] https://kauth.kakao.com/oauth/authorize?client_id=030ba7c59137629e86e8721eb1a22fd6&redirect_uri=kakao030ba7c59137629e86e8721eb1a22fd6%3A%2F%2Foauth&response_type=code&codeChallenge=czprQutp%2BNbAW5lPfYS%2BxjT7ZDmaQNZET%2F2nKELBocA%3D&codeChallengeMethod=S256&ka=sdk%2F1.3.1+sdk_type%2Fflutter+os%2Fandroid-29+lang%2Fko-KR+origin%2FhpUC0U1l9dfmHv1uv4da1W6fcjI%3D+device%2FSM-N960N+android_pkg%2Fcom.kakao.sdk.flutter.example+app_ver%2F1.3.1
W/ActivityThread(11491): handleWindowVisibility: no activity for token android.os.BinderProxy@36a4a6b
D/PhoneWindow(11491): forceLight changed to true [] from com.android.internal.policy.PhoneWindow.updateForceLightNavigationBar:4274 com.android.internal.policy.DecorView.updateColorViews:1547 com.android.internal.policy.PhoneWindow.dispatchWindowAttributesChanged:3252 android.view.Window.setFlags:1153 com.android.internal.policy.PhoneWindow.generateLayout:2474
I/MultiWindowDecorSupport(11491): [INFO] isPopOver = false
I/MultiWindowDecorSupport(11491): updateCaptionType >> DecorView@f405b10[], isFloating: false, isApplication: true, hasWindowDecorCaption: false, hasWindowControllerCallback: true
D/MultiWindowDecorSupport(11491): setCaptionType = 0, DecorView = DecorView@f405b10[]
D/CustomTabsCommonClient(11491): Choosing com.android.chrome as custom tabs browser
I/ViewRootImpl@8953d41[AuthCodeCustomTabsActivity](11491): setView = com.android.internal.policy.DecorView@f405b10 TM=true MM=false
I/ViewRootImpl@f66654e[MainActivity](11491): MSG_WINDOW_FOCUS_CHANGED 0 1
D/InputMethodManager(11491): prepareNavigationBarInfo() DecorView@91d1d76[MainActivity]
D/InputMethodManager(11491): getNavigationBarColor() -855310
I/SurfaceView(11491): onWindowVisibilityChanged(0) true io.flutter.embedding.android.FlutterSurfaceView{50d5027 V.E...... ......I. 0,0-0,0} of ViewRootImpl@8953d41[AuthCodeCustomTabsActivity]
I/ViewRootImpl@8953d41[AuthCodeCustomTabsActivity](11491): Relayout returned: old=(0,0,1440,2960) new=(0,0,1440,2960) req=(1440,2960)0 dur=9 res=0x7 s={true 527995236352} ch=true
I/mali_winsys(11491): new_window_surface() [1440x2960] return: 0x3000
I/SurfaceView(11491): surfaceCreated 1 #8 io.flutter.embedding.android.FlutterSurfaceView{50d5027 V.E...... ......ID 0,0-1440,2768}
I/mali_winsys(11491): new_window_surface() [1440x2768] return: 0x3000
I/SurfaceView(11491): surfaceChanged (1440,2768) 1 #8 io.flutter.embedding.android.FlutterSurfaceView{50d5027 V.E...... ......ID 0,0-1440,2768}
I/ViewRootImpl@8953d41[AuthCodeCustomTabsActivity](11491): Relayout returned: old=(0,0,1440,2960) new=(0,0,1440,2960) req=(1440,2960)0 dur=9 res=0x3 s={true 527995236352} ch=false
I/ViewRootImpl@8953d41[AuthCodeCustomTabsActivity](11491): MSG_WINDOW_FOCUS_CHANGED 1 1
D/InputMethodManager(11491): prepareNavigationBarInfo() DecorView@f405b10[AuthCodeCustomTabsActivity]
D/InputMethodManager(11491): getNavigationBarColor() -855310
D/InputMethodManager(11491): prepareNavigationBarInfo() DecorView@f405b10[AuthCodeCustomTabsActivity]
D/InputMethodManager(11491): getNavigationBarColor() -855310
V/InputMethodManager(11491): Starting input: tba=com.kakao.sdk.flutter.example ic=null mNaviBarColor -855310 mIsGetNaviBarColorSuccess true , NavVisible : true , NavTrans : false
D/InputMethodManager(11491): startInputInner - Id : 0
I/InputMethodManager(11491): startInputInner - mService.startInputOrWindowGainedFocus
I/ViewRootImpl@8953d41[AuthCodeCustomTabsActivity](11491): MSG_RESIZED_REPORT: frame=(0,0,1440,2960) ci=(0,96,0,192) vi=(0,96,0,192) or=1
I/ViewRootImpl@8953d41[AuthCodeCustomTabsActivity](11491): MSG_WINDOW_FOCUS_CHANGED 0 1
D/InputMethodManager(11491): prepareNavigationBarInfo() DecorView@f405b10[AuthCodeCustomTabsActivity]
D/InputMethodManager(11491): getNavigationBarColor() -855310
D/InputTransport(11491): Input channel destroyed: 'ClientS', fd=90
I/SurfaceView(11491): onWindowVisibilityChanged(8) false io.flutter.embedding.android.FlutterSurfaceView{50d5027 V.E...... ......ID 0,0-1440,2768} of ViewRootImpl@8953d41[AuthCodeCustomTabsActivity]
I/SurfaceView(11491): surfaceDestroyed callback.size 1 #2 io.flutter.embedding.android.FlutterSurfaceView{50d5027 V.E...... ......ID 0,0-1440,2768}
I/mali_egl(11491): eglDestroySurface() in
I/mali_winsys(11491): delete_surface() [1440x2768] return
I/mali_egl(11491): eglDestroySurface() out
W/libEGL (11491): EGLNativeWindowType 0x7ac5cbc010 disconnect failed
I/SurfaceView(11491): remove() io.flutter.embedding.android.FlutterSurfaceView{50d5027 V.E...... ......ID 0,0-1440,2768} Surface(name=SurfaceView - com.kakao.sdk.flutter.example/com.kakao.sdk.flutter.AuthCodeCustomTabsActivity@50d5027@0)/@0xf376c7d
I/mali_egl(11491): eglDestroySurface() in
I/mali_winsys(11491): delete_surface() [1440x2960] return
I/mali_egl(11491): eglDestroySurface() out
W/libEGL (11491): EGLNativeWindowType 0x7d0b198a10 disconnect failed
I/ViewRootImpl@8953d41[AuthCodeCustomTabsActivity](11491): Relayout returned: old=(0,0,1440,2960) new=(0,0,1440,2960) req=(1440,2960)8 dur=5 res=0x5 s={false 0} ch=true
I/ViewRootImpl@8953d41[AuthCodeCustomTabsActivity](11491): stopped(true) old=false
I/SurfaceView(11491): windowStopped(true) false io.flutter.embedding.android.FlutterSurfaceView{50d5027 V.E...... ......ID 0,0-1440,2768} of ViewRootImpl@8953d41[AuthCodeCustomTabsActivity]
I/SurfaceView(11491): onWindowVisibilityChanged(8) false io.flutter.embedding.android.FlutterSurfaceView{4876844 V.E...... ........ 0,0-1440,2768} of ViewRootImpl@f66654e[MainActivity]
I/SurfaceView(11491): surfaceDestroyed callback.size 1 #2 io.flutter.embedding.android.FlutterSurfaceView{4876844 V.E...... ........ 0,0-1440,2768}
I/mali_egl(11491): eglDestroySurface() in
I/mali_winsys(11491): delete_surface() [1440x2768] return
I/mali_egl(11491): eglDestroySurface() out
W/libEGL (11491): EGLNativeWindowType 0x7af8bbb010 disconnect failed
I/SurfaceView(11491): remove() io.flutter.embedding.android.FlutterSurfaceView{4876844 V.E...... ........ 0,0-1440,2768} Surface(name=SurfaceView - com.kakao.sdk.flutter.example/com.kakao.sdk.flutter.example.MainActivity@4876844@0)/@0x9f4c7c3
I/mali_egl(11491): eglDestroySurface() in
I/mali_winsys(11491): delete_surface() [1440x2960] return
I/mali_egl(11491): eglDestroySurface() out
W/libEGL (11491): EGLNativeWindowType 0x7d0b19bad0 disconnect failed
I/ViewRootImpl@f66654e[MainActivity](11491): Relayout returned: old=(0,0,1440,2960) new=(0,0,1440,2960) req=(1440,2960)8 dur=8 res=0x5 s={false 0} ch=true
I/ViewRootImpl@f66654e[MainActivity](11491): stopped(true) old=false
I/SurfaceView(11491): windowStopped(true) false io.flutter.embedding.android.FlutterSurfaceView{4876844 V.E...... ........ 0,0-1440,2768} of ViewRootImpl@f66654e[MainActivity]
I/flutter (11491): =====MyApp build=======
I/flutter (11491): =====MainPage build====
말씀주신 내용에 대해서 확인해봤는데 1.3.0 버전부터 안드로이드 환경에서 재현되는 것 확인했습니다.
안드로이드 환경에서 UserApi.instance.loginWithKakaoAccount()
를 호출하게 되면 AuthCodeCustomTabActivity가 실행됩니다. 그런데 해당 Activity는 FlutterActivity 클래스를 상속하고 있고, FlutterActivity는 내부적으로 main 함수를 실행시키기 때문에 main 함수가 중복해서 호출되는 이슈가 발생했습니다.
참고: https://api.flutter.dev/javadoc/io/flutter/embedding/android/FlutterActivity.html
말씀주신 이슈는 수정해서 설 연휴 이후에 최대한 빠르게 배포하도록 하겠습니다.
이슈 제보주셔서 감사합니다
@tazan83 안녕하세요 해당 이슈 수정된 1.4.0 버전 배포완료되었습니다. 제보주셔서 다시 한번 감사드립니다
문의 사항 (Question)
안녕하세요. 카카오톡 미설치 시 카카오 로그인을 위해 AuthCodeClient.instance.authorize() 호출하고 있습니다. 해당 함수 호출 시 앱이 재실행되는 현상이 있어 문의 드립니다.
사용 버전 정보는 아래와 같습니다.
[AndroidManifest.xml]
[styles.xml]
[로그]