Push 수신 목록 조회 | Push | Appbox Android SDK 가이드
Push 수신 목록 조회
Push 수신 목록 조회
AppBox.getPushHistory(context, fromDate, toDate, callback)
Kotlin
1
// 전체 조회
2
AppBox.getPushHistory(this) { items, error ->
3
if (error != null) return@getPushHistory
4
renderInbox(items.orEmpty())
5
}
6
7
// 기간 조회: 날짜 형식은 yyyyMMdd
8
AppBox.getPushHistory(this, "20260501", "20260506") { items, error ->
9
if (error != null) return@getPushHistory
10
renderInbox(items.orEmpty())
11
}
1
// 전체 조회
2
AppBox.getPushHistory(this, new AppBoxValueCallback<List<AppBoxPushHistoryItem>>() {
3
@Override
4
public void onComplete(List<AppBoxPushHistoryItem> items, Throwable error) {
5
if (error != null) return;
6
renderInbox(items == null ? Collections.emptyList() : items);
7
}
8
});
9
10
// 기간 조회: 날짜 형식은 yyyyMMdd
11
AppBox.getPushHistory(this, "20260501", "20260506",
12
new AppBoxValueCallback<List<AppBoxPushHistoryItem>>() {
13
@Override
14
public void onComplete(List<AppBoxPushHistoryItem> items, Throwable error) {
15
if (error != null) return;
16
renderInbox(items == null ? Collections.emptyList() : items);
17
}
18
});
Request 항목 정의
| Request 항목 | 필수여부 | 설명 | 기본값 |
|---|---|---|---|
| context | 필수 | Application 또는 Activity context | - |
| fromDate | - | 시작일. yyyyMMdd | 없음 |
| toDate | - | 종료일. yyyyMMdd | 없음 |
| callback | 필수 | AppBoxValueCallback<List<AppBoxPushHistoryItem>> | - |
| fromDate | toDate | 조회 범위 |
|---|---|---|
| 없음 | 없음 | 전체 |
| 값 | 없음 | 해당 날짜 하루 |
| 값 | 값 | 시작일과 종료일 포함 |
| 없음 | 값 | 오류 |
Response 항목 정의
| Response 결과값 | |
|---|---|
items | List<AppBoxPushHistoryItem>. 실패 시 null |
items[].id | 수신 항목 식별자 |
items[].title, items[].body | 알림 제목과 본문 |
items[].url, items[].imageUrl | 연결 URL과 이미지 URL |
items[].createdAt | 수신 시각 |
items[].isOpened | 열람 여부 |
| 오류 | error: 날짜 형식 오류, 존재하지 않는 날짜(자동 보정하지 않음), toDate만 지정 |
날짜 형식은 yyyyMMdd입니다. 걸음 수 조회(getHealthSteps)는 yyyy-MM-dd로 다릅니다. 기기에 저장된 목록입니다. 서버의 발송 원본과 다를 수 있습니다.
웹 브릿지에서는 푸시 수신 리스트의 message.getPushList입니다.