简体   繁体   English

Firebase设备令牌始终为null,并且从未在某些设备上调用OnTokenRefresh

[英]Firebase Device token is always null and OnTokenRefresh is never called on some devices

I am so much frustrated, since i am continuously getting null device token on certain devices whereas its working perfectly fine on many other devices. 我非常沮丧,因为我在某些设备上不断获得空设备令牌,而在其他许多设备上却能正常工作。 the phone i am talking about is running on 4.4.2. 我正在谈论的电话正在运行4.4.2。 I have added the following code into my manifiest. 我已将以下代码添加到我的清单中。

  <meta-data
            android:name="com.google.android.gms.version"
            android:value="@integer/google_play_services_version" />  
<service android:name=".Services.FireBaseMsgService">
            <intent-filter>
                <action android:name="com.google.firebase.MESSAGING_EVENT" />
            </intent-filter>
        </service>
        <service android:name=".Services.FirebaseIDService">
            <intent-filter>
                <action android:name="com.google.firebase.INSTANCE_ID_EVENT" />
            </intent-filter>
        </service>

Please guide me on this,since i have already wasted much time on this issue searching and finding solution. 因为我已经在搜索和查找解决方案的问题上浪费了很多时间,请对此进行指导。

Thanks in advance. 提前致谢。

So finally i have got the answer and this might help someone. 所以最终我得到了答案,这可能会对某人有所帮助。

After searching alot - i found it was a bug in firebase 11.6.0 release which i was using - just updated it to 12.0.1 and now i am able to get the token for every device. 经过大量搜索-我发现这是我正在使用的firebase 11.6.0版本中的错误-刚刚将其更新为12.0.1,现在我能够获取每个设备的令牌。

当使用Firebase API且设备未安装Google Play服务时,firebase设备令牌为null

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM