Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
Tags
- 이미지 gps
- room
- notification bar
- navigation component
- notification setting
- webview
- ChromeCustomTab
- requestPermission
- shotcut
- onReceivedSslError
- datastore
- circlecrop
- application
- skipcollapsed
- App Startup
- LOG
- Plugins
- prettyJson
- itemAnimator
- 403 Error
- jsontokotlinclass
- Blinking
- Git
- onResume
- Android
- ExifInterface
- kdoc-generator
- ActivityResultContracts
- notification
- BottomSheetDialog
Archives
- Today
- Total
Debbi Story
[PlayStore] 웹뷰 SSL 오류 핸들러 경고 본문
728x90
안녕하세요, WebView로 만든 앱을 스토어에 등록할때
SSL 오류 처리를 하지 않으면 경고 문구가 나오게 됩니다.
그럴때 WebViewClient에 onReceivedSslError 함수를 override 하시고
Alert으로 선택할 수 있게 구현해주어야 합니다.
override fun onReceivedSslError(view: WebView?, handler: SslErrorHandler?, error: SslError?) {
AlertDialog.Builder(mContext).apply {
setMessage(mContext.getString(R.string.msg_ssl_error))
setPositiveButton(mContext.getString(R.string.msg_ssl_error_confirm)) { _, _ -> handler?.proceed() }
setNegativeButton(mContext.getString(R.string.msg_ssl_error_cancel)) { _, _ -> handler?.cancel() }
}.create().show()
}
참고로, override를 해서 handler?.proceed() 이것만 구현해두어도 경고가 나타나게됩니다.
https://support.google.com/faqs/answer/7071387?hl=ko
앱의 WebView SSL 오류 핸들러 알림 해결 방법 - Google 고객센터
도움이 되었나요? 어떻게 하면 개선할 수 있을까요? 예아니요
support.google.com
'안드로이드 > PlayStore' 카테고리의 다른 글
[PlayStore] 웹뷰 WebView, 기기 및 네트워크 악용 정책 위반 Youtube (0) | 2021.12.29 |
---|---|
[PlayStore] 플레이스토어 메타데이터(MetaData) 정책 (0) | 2021.12.12 |