await FirebaseMessaging.instance.getToken();
I used this code to get token but apparently this code just give me the token of the device, For example, if i uses many accounts in my app, i'll get the same token for every accounts. But if i use another device, i'll get different token.
CodePudding user response:
A firebase messaging token is tied to an installed App on a device, not to a particular user.
See: Firebase Cloud Messaging Auth Tokens vs Registration Token
CodePudding user response:
The FCM token is generated based on the app , its bundle id and device thats why its unique for each devices for same app.
CodePudding user response:
Flutter firebaseMessaging Token is device specific.If you want to change your token then you can reinstall the app. If you want token based on user then you can use TokenRefresh method.