我沒有修復它,但我發現打印機視圖在調試模式下,該問題僅
我叫這種方法的onCreate()在activit我需要請求令牌
FirebaseInstanceId.Instance?.Token
這裏是方法
private void ConfigureFireBase()
{
#if DEBUG
try
{
Task.Run(() =>
{
var instanceId = FirebaseInstanceId.Instance;
instanceId?.DeleteInstanceId();
//Log.Debug("TAG", "{0} {1}", instanceId?.Token?.ToString(), instanceId.GetToken(GetString(Resource.String.gcm_defaultSenderId), Firebase.Messaging.FirebaseMessaging.InstanceIdScope));
});
// For debug mode only - will accept the HTTPS certificate of Test/Dev server, as the HTTPS certificate is invalid /not trusted
ServicePointManager.ServerCertificateValidationCallback += (o, certificate, chain, errors) => true;
}catch (Exception e)
{
Log.Debug("TAG", e.Message);
}
#endif
}
我最近從GCM升級到FCM,我發誓一切都變得更糟。很煩人! – JMK
我也面臨這個問題,即使我試圖降級谷歌播放服務版本也不起作用 –