从 PHP 网络服务器向 android 智能手表发送推送通知的可能性(不使用 Firebase/GCM 等)

Possibilities for sending push-notifications from a PHP webserver to an android smartwatch (without using Firebase/GCM etc.)

我正在寻找将推送通知从 laravel-php-web 应用程序发送到 Android 智能手表的选项。但我不想使用 Google Cloud Messaging 或 Google Firebase 等任何云服务,因为我不想与 Google 或其他公司共享发送的敏感数据。

对于如何实现这样的功能,您有什么建议吗?

如果您想避免使用 Google Firebase,您可以使用其他服务,例如 Pusher 或 PubNub。 您也可以使用 Socket.io or the new Laravel-WebSockets library, a library that use the same API as Pusher (for easy integration). This last option is the one I'd recommend. You can check this channel for an in-deep tutorial.

创建自己的 Pub/Sub 服务器

为了使 Laravel-WebSockets 与 Android 一起工作,只需使用 Android 的 Pusher 库并在配置中设置主机变量和密钥。