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