UPDATE
GetInstanceId<InstanceIdResult>()
is also deprecated in favour of FirebaseMessaging.getToken()
for FCM Token and FirebaseInstallations.getId()
for Instance Identifier,

So, FirebaseMessaging.getToken() is the recommended way now to get the FCM Token,
This is how you can consume it easily,
var token = await FirebaseMessaging.Instance.GetToken();
and FirebaseInstallations.getId() is the recommended way now to get the Instance Identifier,
This is how you can consume it easily,
var id = await FirebaseInstallations.Instance.GetId();
here, var
is of the Type
Java.Lang.Object
. Do, token.ToString()
to get the string
value.
ORIGINAL
FirebaseInstanceId.Instance.Token
is deprecated in favour of GetInstanceId<InstanceIdResult>()
,

So, GetInstanceId<InstanceIdResult>() is the recommended way,
This is how you can consume it,
var instanceIdResult = await FirebaseInstanceId.Instance.GetInstanceId().AsAsync<IInstanceIdResult>();
var token = instanceIdResult.Token;