FCM token returns null in android nougat
问题 FCM token not generated in Android Nougat device(Moto,Sony & Huawei) when installed my app FirebaseInstanceId.getInstance().getToken() returns null, But FCM token generated in Emulator(Nougat) and below Nougat versions. 回答1: When do you call FirebaseInstanceId.getInstance().getToken() ? You need to wait in a Service extending FirebaseInstanceIdService for the onTokenRefresh callback. This is the moment, where your Token is available. public class FcmTokenService extends