Android 지도 오류 수정 요청드립니다

문의 시 사용하시는 SDK 버전 정보를 알려주세요. 2.0.2

OpenAPIKeyAuthenticationWebService쪽 오류 수정 요청드립니다.

OpenAPIKeyAuthenticationWebService 쪽에서 resultListener호출시 간헐적으로 crash가 발생합니다.
이유는 MapView사용시 instance를 하나만 유지해야하는데 MapView release이후 listener를 호출해서인것 같습니다.

if (this.resultListener != null && this.resultListener.get() != null) {
((OpenAPIKeyAuthenticationWebService.OpenAPIKeyAuthenticationResultListener)this.resultListener.get()).onAuthenticationErrorOccured();
((OpenAPIKeyAuthenticationWebService.OpenAPIKeyAuthenticationResultListener)this.resultListener.get()).onAuthenticationResultReceived(-101, “API K설정하지 않았습니다.“, (String)null, (String)null, (String)null);
}

OpenAPIKeyAuthenticationWebService 내부에서 위와같이 null체크를 하고있으나 resultListener가 WeakReference이기 때문에 null check 이후 null로 바뀔 수 있습니다.
먼저 listener객체를 가져와서 메모리에 유지 후 null check를 하는 방식으로 해결 가능할 것 같습니다.

1개의 좋아요

오류 관련 내용 공유주셔서 감사드립니다.

@mmadmin
위 내용 관련해서 멘션 드립니다.
확인 부탁드려요.

감사합니다.