앱 업데이트 | 사용자 경험, 알림, 인터랙션 | Appbox Android SDK 가이드

앱 업데이트

스토어 버전과 비교해 업데이트 팝업을 띄웁니다. 구버전 사용자를 최신 버전으로 유도할 때 호출합니다.

updatePrompt(require, message, googlePlay, updateButton, cancelButton?, updateAlert?, callback)

호출 형태: 패턴 D(선택 인자가 여러 개인 함수). 실행 중에 다시 호출하면 거절됩니다.

앱을 최신 버전으로 업데이트

AppBox.updatePrompt(require, message, googlePlay, updateButton, cancelButton, updateAlert, callback)

Kotlin
1 AppBox.updatePrompt(require = false, message = "마켓에 새로운 버전이 있습니다.",
2 googlePlay = "https://play.google.com/store/apps/details?id=com.example.app",
3 updateButton = "업데이트", cancelButton = "다음에", updateAlert = true) { value, error ->
4 if (error != null) return@updatePrompt
5 Log.d("AppBox", value.toString())
6 }
1 AppBox.updatePrompt(false, "마켓에 새로운 버전이 있습니다.",
2 "https://play.google.com/store/apps/details?id=com.example.app",
3 "업데이트", "다음에", true, (value, error) -> {
4 if (error != null) return;
5 Log.d("AppBox", String.valueOf(value));
6 });

Request 항목 정의

Request 항목필수여부설명기본값
require필수true면 강제 업데이트(닫을 수 없음), false면 권장-
message필수업데이트 안내 메시지-
googlePlay필수Google Play 다운로드 URL. https://play.google.com/store/apps/details?id={패키지명} 형식-
updateButton필수업데이트 버튼 텍스트-
cancelButton-취소 버튼 텍스트. require가 false면 사실상 필수입니다-
updateAlert-업데이트 안내를 SDK가 띄울지 여부. false면 앱이 직접 띄웁니다true


Response 항목 정의

Response 결과값
값Map<String, Boolean>
오류 코드-6000: 스토어에서 앱을 찾을 수 없음. 마켓에 등록하지 않은 빌드로 테스트하는 경우

웹 브릿지에서는 앱 업데이트의 application.updatePrompt입니다.

www.naver.com
QR 코드를 촬영하면 입력하신 주소의
앱 예시 화면을 테스트할 수 있습니다.
* 스캔 후 바로 앱 다운로드 이동합니다.