com.google.android.gcm.server.InvalidRequestException:发送FCM消息

时间:2019-08-13 09:16:51

标签: java firebase push-notification google-cloud-messaging

嗨,我在发送FCM消息时得到了这个响应

发布消息时发生错误 com.google.android.gcm.server.InvalidRequestException:HTTP状态码:我正在使用 gcm-server.jar 代码中的400(Error = DeprecatedEndpoint)播放2.1.2 项目

中的“ strong”

我已经使用https://fcm.googleapis.com/fcm/send发送了消息,但我收到了具有相同数据的成功响应,但是如果我尝试通过代码尝试它会抛出错误

new Thread(new Runnable() {
            @Override
            public void run() {
                MulticastResult multicastResult;
                try {

                    Sender sender = new Sender(Constants.ANDORIED_APP_ID_FCM);
                    multicastResult = sender.send(message1, devices, Constants.ANDROID_GCM_RETRY_COUNT);
                } catch (Exception e) {
                    CabhoundLogger.error("Error posting messages" + e, className);
                    errorCount++;

                    return;
                }

0 个答案:

没有答案
相关问题