Best way to associate an FCM token with a device?

I make a server that sends messages using FCM to clients depending on what happens (temperature and / or humidity changes, door opening, etc.).

But if the token can change, how can I track how the device sends messages to the correct one (without using the login system)?

I thought to associate the token with sim iccid in the database, is this correct?

0
source share
2 answers

Update 05/18/2017:

Running Android O ANDROID_IDwill now be for every application on the device .


Original answer:

(, ) ID, , , ANDROID_ID:

ANDROID_ID

64- ( ), , . , factory reset.

. ( Android 4.2 ), , ANDROID_ID .

: "android_id"

, , . Best Practices for Unique Identifiers.

FCM , , .

0

. , . , android

0

Source: https://habr.com/ru/post/1016638/


All Articles