Android如何获取Firebase设备令牌

时间:2017-04-17 10:39:52

标签: android delphi google-cloud-messaging delphi-10.2-tokyo

APushService := TPushServiceManager.Instance.GetServiceByName(TPushService.TServiceNames.GCM);
APushService.AppProps[TPushService.TAppPropNames.GCMAppID] := '"XXXXXXX" '; SENDER ID from Console Firebase
AServiceConnection := TPushServiceConnection.Create(APushService);
AServiceConnection.Active := True;
AServiceConnection.OnChange := OnServiceConnectionChange;
AServiceConnection.OnReceiveNotification := OnReceiveNotificationEvent;

ADeviceID := APushService.DeviceIDValue[TPushService.TDeviceIDNames.DeviceID];
AdeviceToken := APushService.DeviceTokenValue[TPushService.TDeviceTokenNames.DeviceToken];

我正确使用SENDER ID,并且ADeviceID正确显示,但ADeviceToken出现空白。我收到了这个错误:

image

0 个答案:

没有答案