Firebase FCM push, getting Error Missing Registration | Android

前端 未结 3 880
忘了有多久
忘了有多久 2021-01-05 12:06

I have seen this topic discussed before, but I think it\'s not the same scenario.

I\'m trying to send push notification from one device (going to be an admin device)

3条回答
  •  無奈伤痛
    2021-01-05 12:32

    I also got the same error, but mine was on the server side(push from rails to android), but my problem was that i had forgot to specify the content type in the header(i am using RestClient to post to firebase). Hope it might help someone

    RestClient.post( "https://fcm.googleapis.com/fcm/send",
                 {:to => reg_id,:notification => options }.to_json,{:content_type => :json, :accept => :json,:Authorization => "key=*****"}
    

提交回复
热议问题