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

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

        Pushnotification 服务器端实现

        Pushnotification Server side Implementation(Pushnotification 服务器端实现)
        <legend id='6B1sI'><style id='6B1sI'><dir id='6B1sI'><q id='6B1sI'></q></dir></style></legend>

          <tfoot id='6B1sI'></tfoot>

              <tbody id='6B1sI'></tbody>
          1. <small id='6B1sI'></small><noframes id='6B1sI'>

                • <bdo id='6B1sI'></bdo><ul id='6B1sI'></ul>
                • <i id='6B1sI'><tr id='6B1sI'><dt id='6B1sI'><q id='6B1sI'><span id='6B1sI'><b id='6B1sI'><form id='6B1sI'><ins id='6B1sI'></ins><ul id='6B1sI'></ul><sub id='6B1sI'></sub></form><legend id='6B1sI'></legend><bdo id='6B1sI'><pre id='6B1sI'><center id='6B1sI'></center></pre></bdo></b><th id='6B1sI'></th></span></q></dt></tr></i><div id='6B1sI'><tfoot id='6B1sI'></tfoot><dl id='6B1sI'><fieldset id='6B1sI'></fieldset></dl></div>
                  本文介绍了Pushnotification 服务器端实现的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  最近我在我的应用程序最新版本中集成了 FCM,但我以前的应用程序版本使用 GCM.关于我们是否需要为 GCM 和 FCM 分离编写后台 cron 的任何想法?

                  Recently i have integreted the FCM in my app recent version but my previous version of app was using GCM. Any ideas about whether we need to segregate the write the background cron for GCM and FCM?.

                  My Previous version MY App 4.0 并使用 GCM 和 Current version My App 4.1 并集成了 FCM.我想为版本和用户发送推送通知.那么我们是否需要为 GCM 和 FCM 编写服务器端程序呢?有关此集成的任何想法.

                  My Previous version MY App 4.0 and used GCM and Current version My App 4.1 and integrated the FCM. I wants to send the pushnotification for both version and users. So whether we need to write the server side program for GCM and FCM right?. Any ideas about this integration.

                  FCM 服务器端 API:https://fcm.googleapis.com/fcm/sendGCM 服务器端 API:https://android.googleapis.com/gcm/send

                  FCM Server Side API : https://fcm.googleapis.com/fcm/send GCM Server Side API : https://android.googleapis.com/gcm/send

                  我们可以通过 FCM 服务器端程序发送通知吗?还是需要分别为 GCM 和 FCM 编写程序?

                  Any other possiblies can we send the notification via FCM Server side program? or seperately need to write the program for GCM and FCM?.

                  PHP 中 FCM 的示例代码

                  Sample Code for FCM in PHP

                  <?php
                  
                  function sendFCM($mess,$id) {
                  $url = 'https://fcm.googleapis.com/fcm/send';
                  $fields = array (
                          'to' => $id,
                          'notification' => array (
                                  "body" => $mess,
                                  "title" => "Title",
                                  "icon" => "myicon"
                          )
                  );
                  $fields = json_encode ( $fields );
                  $headers = array (
                          'Authorization: key=' . "AIzaSyA9vpL9OuX6moOYw-4n3YTSXpoSGQVGnyM",
                          'Content-Type: application/json'
                  );
                  
                  $ch = curl_init ();
                  curl_setopt ( $ch, CURLOPT_URL, $url );
                  curl_setopt ( $ch, CURLOPT_POST, true );
                  curl_setopt ( $ch, CURLOPT_HTTPHEADER, $headers );
                  curl_setopt ( $ch, CURLOPT_RETURNTRANSFER, true );
                  curl_setopt ( $ch, CURLOPT_POSTFIELDS, $fields );
                  
                  $result = curl_exec ( $ch );
                  curl_close ( $ch );
                  }
                  
                  ?>
                  

                  推荐答案

                  FCM 仍然与 GCM 兼容,因为它是它的核心.所以切换到 FCM 端点 (https://fcm.googleapis.com/fcm/send) 发送通知时,您的应用程序版本仍应适用于具有 GCM 的应用程序.无需编写单独的程序.

                  FCM is still compatible with GCM, seeing as it is it's core. So switching to the FCM endpoint (https://fcm.googleapis.com/fcm/send) when sending your notification should still work for your app versions that have GCM. No need to write separate programs.

                  这篇关于Pushnotification 服务器端实现的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

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

                  相关文档推荐

                  DeepL的翻译效果还是很强大的,如果我们要用php实现DeepL翻译调用,该怎么办呢?以下是代码示例,希望能够帮到需要的朋友。 在这里需要注意,这个DeepL的账户和api申请比较难,不支持中国大陆申请,需要拥有香港或者海外信用卡才行,没账号的话,目前某宝可以
                  PHP通过phpspreadsheet导入Excel日期,导入系统后,全部变为了4开头的几位数字,这是为什么呢?原因很简单,将Excel的时间设置问文本,我们就能看到该日期本来的数值,上图对应的数值为: 要怎么解决呢?进行数据转换就行,这里可以封装方法,或者用第三方的
                  mediatemple - can#39;t send email using codeigniter(mediatemple - 无法使用 codeigniter 发送电子邮件)
                  Laravel Gmail Configuration Error(Laravel Gmail 配置错误)
                  Problem with using PHPMailer for SMTP(将 PHPMailer 用于 SMTP 的问题)
                  Issue on how to setup SMTP using PHPMailer in GoDaddy server(关于如何在 GoDaddy 服务器中使用 PHPMailer 设置 SMTP 的问题)
                  <tfoot id='HVtSg'></tfoot>
                    <bdo id='HVtSg'></bdo><ul id='HVtSg'></ul>

                  • <small id='HVtSg'></small><noframes id='HVtSg'>

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

                          <tbody id='HVtSg'></tbody>

                          1. <legend id='HVtSg'><style id='HVtSg'><dir id='HVtSg'><q id='HVtSg'></q></dir></style></legend>