반응형
GCM(푸쉬) 전송 후 결과값을 받아서.. 경우에 따라 처리해야 된다.
아래는 안드로이드 개발자 센터의 도움말이다..
Here are JSON results for 6 recipients (IDs 4, 8, 15, 16, 23, and 42 respectively) with 3 messages successfully processed, 1 canonical registration ID returned, and 3 errors:
{ "multicast_id": 216,
"success": 3,
"failure": 3,
"canonical_ids": 1,
"results": [
{ "message_id": "1:0408" },
{ "error": "Unavailable" },
{ "error": "InvalidRegistration" },
{ "message_id": "1:1516" },
{ "message_id": "1:2342", "registration_id": "32" },
{ "error": "NotRegistered"}
]
}
In this example:
- First message: success, not required.
- Second message: should be resent (to registration ID 8).
- Third message: had an unrecoverable error (maybe the value got corrupted in the database).
- Fourth message: success, nothing required.
- Fifth message: success, but the registration ID should be updated in the server database (from 23 to 32).
- Sixth message: registration ID (42) should be removed from the server database because the application was uninstalled from the device.
* message_id : 정상 전송 됨.
* error - Unavailable : 재 전송 필요.
* error - 기타 : 서버에서 registration_id 삭제해야 함.
'프로그램개발 > 안드로이드' 카테고리의 다른 글
| 액션바 스타일 쉽게 변경하기 (0) | 2014.10.06 |
|---|---|
| [webview] 사용자가 웹뷰에서 클릭한 정보 얻어오기 (0) | 2014.09.14 |
| [TIP] ImageView 의 setImageURI 에서 OOM(OutOfMemory) 에러발생시. (0) | 2013.07.10 |
| 이용내역 모니터링 (0) | 2013.06.07 |
| 개발환경 설정이 무지 쉬워졌구나 (0) | 2013.05.31 |
댓글