How does one distinguish between Android and IOS Firebase IDs for Push Notifications?

后端 未结 2 618
-上瘾入骨i
-上瘾入骨i 2021-02-08 19:15

As per my previously asked question, Firebase onMessageReceived not called when app is in the background , I need to change the payload to a \'data\' payload as opposed to a \'n

2条回答
  •  醉话见心
    2021-02-08 19:18

    Information about an app instance is available from the Instance ID Service at this endpoint:

    https://iid.googleapis.com/iid/info/IID_TOKEN
    

    On success the call returns HTTP status 200 and a JSON object containing various status for the app instance including the platform:

    returns ANDROID, IOS, or CHROME to indicate the device platform to which the token belongs

提交回复
热议问题