繁体   English   中英

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

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

我非常沮丧,因为我在某些设备上不断获得空设备令牌,而在其他许多设备上却能正常工作。 我正在谈论的电话正在运行4.4.2。 我已将以下代码添加到我的清单中。

  <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>

因为我已经在搜索和查找解决方案的问题上浪费了很多时间,请对此进行指导。

提前致谢。

所以最终我得到了答案,这可能会对某人有所帮助。

经过大量搜索-我发现这是我正在使用的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