<bdo id='zlnQe'></bdo><ul id='zlnQe'></ul>

      1. <small id='zlnQe'></small><noframes id='zlnQe'>

        <legend id='zlnQe'><style id='zlnQe'><dir id='zlnQe'><q id='zlnQe'></q></dir></style></legend>
      2. <tfoot id='zlnQe'></tfoot>
        <i id='zlnQe'><tr id='zlnQe'><dt id='zlnQe'><q id='zlnQe'><span id='zlnQe'><b id='zlnQe'><form id='zlnQe'><ins id='zlnQe'></ins><ul id='zlnQe'></ul><sub id='zlnQe'></sub></form><legend id='zlnQe'></legend><bdo id='zlnQe'><pre id='zlnQe'><center id='zlnQe'></center></pre></bdo></b><th id='zlnQe'></th></span></q></dt></tr></i><div id='zlnQe'><tfoot id='zlnQe'></tfoot><dl id='zlnQe'><fieldset id='zlnQe'></fieldset></dl></div>

        无法从 Firebase 控制台发送通知

        Failed to send notification from firebase console(无法从 Firebase 控制台发送通知)

          <bdo id='mXWLO'></bdo><ul id='mXWLO'></ul>
                <tbody id='mXWLO'></tbody>

              • <tfoot id='mXWLO'></tfoot>

                  <legend id='mXWLO'><style id='mXWLO'><dir id='mXWLO'><q id='mXWLO'></q></dir></style></legend>

                  <small id='mXWLO'></small><noframes id='mXWLO'>

                1. <i id='mXWLO'><tr id='mXWLO'><dt id='mXWLO'><q id='mXWLO'><span id='mXWLO'><b id='mXWLO'><form id='mXWLO'><ins id='mXWLO'></ins><ul id='mXWLO'></ul><sub id='mXWLO'></sub></form><legend id='mXWLO'></legend><bdo id='mXWLO'><pre id='mXWLO'><center id='mXWLO'></center></pre></bdo></b><th id='mXWLO'></th></span></q></dt></tr></i><div id='mXWLO'><tfoot id='mXWLO'></tfoot><dl id='mXWLO'><fieldset id='mXWLO'></fieldset></dl></div>

                  本文介绍了无法从 Firebase 控制台发送通知的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  这个是一些firebase的教程.我在 Firebase 中注册应用程序,获取 google-services.json 文件,将其粘贴到应用程序文件中,如教程中所示.也得到令牌.但是当我尝试从控制台发送通知时,状态失败(我猜是 MismatchSenderId).我正在插入从 FirebaseInstanceId.getInstance().getToken(); 获得的相同令牌.可能是什么问题?

                  附言当我向所有使用该应用程序的设备发送通知时,它也没有成功.

                  清单文件

                  <使用权限android:name="android.permission.INTERNET"/><应用机器人:allowBackup="真"android:icon="@mipmap/ic_launcher"android:label="@string/app_name"安卓:supportsRtl="true"android:theme="@style/AppTheme"><activity android:name=".MainActivity"><意图过滤器><action android:name="android.intent.action.MAIN"/><类别 android:name="android.intent.category.LAUNCHER"/></意图过滤器></活动><!--定义服务--><服务android:name=".MyFirebaseMessagingService"><意图过滤器><action android:name="com.google.firebase.MESSAGING_EVENT"/></意图过滤器></服务><服务android:name=".MyFirebaseInstanceIDService"><意图过滤器><action android:name="com.google.firebase.INSTANCE_ID_EVENT"/></意图过滤器></服务></应用程序>

                  解决方案

                  请检查是否满足以下所有条件.

                  <块引用>

                  1. 在您的控制台中更新 SHA 1 指纹和软件包名称.
                  2. 从开发者控制台放置一个 json 配置文件,并将其放在 app 目录 [模块级目录] 下.
                  3. 在 gradle 文件中添加这些行.a) 模块 gradle:应用插件:'com.google.gms.google-services'b) 项目 gradle:类路径 'com.google.gms:google-services:3.0.0'

                  希望对你有帮助...

                  This is some tutorial of firebase. I'm registering app in Firebase, getting the google-services.json file, pasting it in the app files as shown in the tutorial. Also getting the token. But when I'm trying to send notification from console, the status is failed (I guess MismatchSenderId). I'm inserting the same token that I got from FirebaseInstanceId.getInstance().getToken();. What can be the problem?

                  p.s. When I send notification to all devices that uses the app, it didn't succeed too.

                  EDIT: Manifest File

                  <!-- Adding Internet Permission -->
                  
                  <uses-permission android:name="android.permission.INTERNET"/>
                  <application
                      android:allowBackup="true"
                      android:icon="@mipmap/ic_launcher"
                      android:label="@string/app_name"
                      android:supportsRtl="true"
                      android:theme="@style/AppTheme">
                      <activity android:name=".MainActivity">
                          <intent-filter>
                              <action android:name="android.intent.action.MAIN" />
                  
                              <category android:name="android.intent.category.LAUNCHER" />
                          </intent-filter>
                      </activity>
                  
                      <!--
                          Defining Services
                      -->
                      <service
                          android:name=".MyFirebaseMessagingService">
                          <intent-filter>
                              <action android:name="com.google.firebase.MESSAGING_EVENT"/>
                          </intent-filter>
                      </service>
                  
                      <service
                          android:name=".MyFirebaseInstanceIDService">
                          <intent-filter>
                              <action android:name="com.google.firebase.INSTANCE_ID_EVENT"/>
                          </intent-filter>
                      </service>
                  </application>
                  

                  解决方案

                  Kindly check if all the below conditions were satisfied.

                  1. Update the SHA 1 finger print and package name in your console.
                  2. Place a json configuration file from the developer console and place it under app directory [module level directory].
                  3. Add these lines in the gradle files. a) Module gradle : apply plugin: 'com.google.gms.google-services' b) Project gradle : classpath 'com.google.gms:google-services:3.0.0'

                  Hope it helps you...

                  这篇关于无法从 Firebase 控制台发送通知的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  When does a FCM token expire?(FCM 令牌何时到期?)
                  Firebase Cloud Messaging (FCM) - Launch Activity when user clicks the notification with extras(Firebase Cloud Messaging (FCM) - 当用户点击带有附加功能的通知时启动活动)
                  Implement Firebase inside of a Library(在库中实现 Firebase)
                  Firebase Backward compatibility with GCM(Firebase 与 GCM 的向后兼容性)
                  Receiving the FCM notifications multiple times on Nougat(在 Nougat 上多次接收 FCM 通知)
                  Push Notifications are delivered but didReceiveRemoteNotification is never called Swift(推送通知已交付,但 didReceiveRemoteNotification 从未被称为 Swift)
                      <i id='HqDQ5'><tr id='HqDQ5'><dt id='HqDQ5'><q id='HqDQ5'><span id='HqDQ5'><b id='HqDQ5'><form id='HqDQ5'><ins id='HqDQ5'></ins><ul id='HqDQ5'></ul><sub id='HqDQ5'></sub></form><legend id='HqDQ5'></legend><bdo id='HqDQ5'><pre id='HqDQ5'><center id='HqDQ5'></center></pre></bdo></b><th id='HqDQ5'></th></span></q></dt></tr></i><div id='HqDQ5'><tfoot id='HqDQ5'></tfoot><dl id='HqDQ5'><fieldset id='HqDQ5'></fieldset></dl></div>
                        <tbody id='HqDQ5'></tbody>

                      <tfoot id='HqDQ5'></tfoot>
                        <bdo id='HqDQ5'></bdo><ul id='HqDQ5'></ul>

                          <small id='HqDQ5'></small><noframes id='HqDQ5'>

                            <legend id='HqDQ5'><style id='HqDQ5'><dir id='HqDQ5'><q id='HqDQ5'></q></dir></style></legend>