【问题标题】:How to send notifications from php server side to Visual Basic client side like android如何将通知从 php 服务器端发送到 Visual Basic 客户端,如 android
【发布时间】:2020-05-30 15:41:40
【问题描述】:

是否可以从 php 服务器端向 Visual Basic 发送通知,或者我必须每 x 分钟将服务器端数据库与本地数据库同步一次以检查是否有任何更改?

<?php
require("connection.php");
include 'send_notification.php';
if (!$conn) {
    $response["response"] = false;
    $response["log"] = mysqli_error($conn);
    $response["exception"] = 1;
    echo json_encode($response);
} else {
    $pricing = json_decode($_POST['pricing'], true);
    $user = json_decode($_POST['user'], true);

    // Here update database....

    $company_token = getCompanyToken($user["id"]); // Find company token from MySql database to send FCM to Android Client


    sendNotification($company_token); // Send Notification To Android...It works fine..

    // Same notification to Visual Basic Windows Client...
    // Help!! Synchronize local database with the server or is there any other way?


    }
    mysqli_close($conn);
    }
?>

【问题讨论】:

    标签: php android vb.net firebase-cloud-messaging


    【解决方案1】:

    接收来自 Firebase Cloud Messaging 的消息的唯一官方 SDK 适用于 Android、iOS 和 Web 客户端。除非您以这些平台之一为目标,否则 VB.Net 上没有用于接收消息的 SDK。

    另见:

    【讨论】:

    • 好的,我想象到了这个,但是没有其他方法可以在不等待数据库同步的情况下将更改发送到 Visual Basic?
    猜你喜欢
    • 2018-08-19
    • 2022-06-15
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-08-15
    • 2014-06-06
    相关资源
    最近更新 更多