안드로이드 PUSH 메시지 1003 에러



Android 로 푸쉬메시지 보낼때 아래와 같은 에러가 나오면 한번에 보내는 유저수가 천명을 넘었기 때문에 발생하는 것입니다.


Number of messages on bulk (1003) exceeds maximum allowed (1000)


php 라면 array_chunk 같은 함수를 사용하여 적절한 배열단위로 보내면 됩니다.


$user_ids = array_chunk($userids, 1000);

foreach($user_ids as $users_id) {

$ret = gcm_send($users_id, $msg);

}


gcm_send 함수는


http://itrooms.tistory.com/107 여기를 참고하세요~


블로그 이미지

영은파더♥

가상서버호스팅 VPS 리눅스 서버관리 윈도우 IT

,