채널 전화번호 저장 | Push | Appbox Android SDK 가이드

채널 전화번호 저장

SMS 및 알림 채널에서 사용할 전화번호를 저장합니다. 문자 채널 발송 대상에 이 기기의 번호를 연결할 때 호출합니다.

채널 전화번호 저장

AppBox.setChannelPhoneNumber(context, phoneNumber, consent, callback)

Kotlin
1 // 채널 수신 동의를 함께 저장
2 AppBox.setChannelPhoneNumber(this, "+821000000000", true) { success, error ->
3 if (!success) Log.w("AppBox", error?.message ?: "전화번호 저장 실패")
4 }
5
6 // 동의값 없이 전화번호만 저장
7 AppBox.setChannelPhoneNumber(this, "+821000000000") { success, error -> }
1 // 채널 수신 동의를 함께 저장
2 AppBox.setChannelPhoneNumber(this, "+821000000000", true, new AppBoxOperationCallback() {
3 @Override
4 public void onComplete(boolean success, Throwable error) {
5 if (!success) Log.w("AppBox", String.valueOf(error));
6 }
7 });
8
9 // 동의값 없이 전화번호만 저장
10 AppBox.setChannelPhoneNumber(this, "+821000000000", new AppBoxOperationCallback() {
11 @Override
12 public void onComplete(boolean success, Throwable error) { }
13 });

Request 항목 정의

Request 항목필수여부설명기본값
context필수Application 또는 Activity context-
phoneNumber필수국가번호를 포함한 형식을 권장합니다. 빈 값이면 오류-
consent-SMS, 알림 채널 수신 동의값. 생략하면 서버 요청에서 제외됩니다생략
callback필수AppBoxOperationCallback-


Response 항목 정의

Response 결과값
success저장 요청 성공 여부 (true | false)


consent는 채널 수신 동의입니다. Push 수신 동의(setPushAgreement)와 다른 값입니다. 전화번호는 개인정보입니다. 수집 근거를 먼저 확보하고 로그에 남기지 않습니다. appbox-webview는 필요하지 않습니다.

웹 브릿지에서는 message.setChannelPhoneNumber입니다.

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