Skip to content Skip to sidebar Skip to footer

How To Send Push Notification To More Than 1000 Users Using Firebase In Android?

I am getting following error message when sending push notification to more than 1000 users: 'firebase Number of messages on bulk (1082) exceeds maximum allowed (1000)' I have goog

Solution 1:

Hello you can use array_chunk for send 1000 notification

if(mysqli_num_rows($result) > 0 ){
    while ($row = mysqli_fetch_assoc($result)) {
        $tokens[] = $row["Token"];
    }
}
mysqli_close($conn);
$message = array("message" => "Hi This Arbaz Alam And You are using Android App Thanks.");

$regIdChunk=array_chunk($tokens,1000);

foreach($regIdChunkas$RegId){
     $message_status = send_notification($RegId, $message);
}
echo$message_status;

Please change this in your code.

Post a Comment for "How To Send Push Notification To More Than 1000 Users Using Firebase In Android?"