小编use*_*999的帖子

'发送消息'Firebase云消息传递服务时出错

我在我的应用中使用了Firebase通知.一切都设置但是当我从控制台推送通知时,我收到此错误:

截图

这是我的代码:MyFirebaseInstanceIDService.class

package notes.ronak.com.pushnotificationfromstart;

import android.util.Log;

import com.google.firebase.iid.FirebaseInstanceId;
import com.google.firebase.iid.FirebaseInstanceIdService;

/**
 * Created by ronaksakhuja on 12/9/16.
 */
public class MyFirebaseInstanceIDService extends FirebaseInstanceIdService {
    private static final String TAG="MyFirebaseInsIDServicve";

    @Override
    public void onTokenRefresh() {
        //Get updated token
        String refreshedToken = FirebaseInstanceId.getInstance().getToken();
        Log.d(TAG,"New Token : "+refreshedToken);
        sendRegistrationToServer(refreshedToken);


        //You can save the token into third party server to do anything you want
    }

    private void sendRegistrationToServer(String refreshedToken) {
    }
}
Run Code Online (Sandbox Code Playgroud)

MyFirebaseMessagingService.class

package notes.ronak.com.pushnotificationfromstart;

import android.app.NotificationManager;
import android.app.PendingIntent;
import android.content.Context;
import android.content.Intent;
import …
Run Code Online (Sandbox Code Playgroud)

java android firebase firebase-notifications

6
推荐指数
1
解决办法
1263
查看次数

标签 统计

android ×1

firebase ×1

firebase-notifications ×1

java ×1