Android 可穿戴设备中的 GCM

GCM in Android wearable

我们可以创建一个应用程序来接收来自服务器的推送通知,就像在手机和眼镜中一样

由于我们现在有支持 WiFi 的手表,我们可以连接到互联网,但它是否支持从外部实体(服务器)推送?

这是不可能的 AFIK。

您需要将消息推送到phone并通过Data API转发消息。您需要记住,当蓝牙连接不可用时,WiFi 连接只是一个后备。

您现在可以从 Android Wear 2.0 Developer Preview 开始。 Android 可以穿可以直接打自己的网络电话和老的一样 FCM/GCM 也可以。

在网络访问和云消息传递下

Android Wear apps can make their own network requests. When a watch has a Bluetooth connection to a phone, the watch's network traffic is proxied through the phone. When a phone is unavailable, Wi-Fi and cellular networks are used, depending on the hardware. The Wear platform handles transitions between networks. A watch's network access thus does not require the Wearable Data Layer API.

For sending notifications, apps can directly use Firebase Cloud Messaging (FCM), which replaces Google Cloud Messaging, or continue to use GCM.

No APIs for network access or FCM are specific to Android Wear. Refer to the existing documentation about connecting to a network and cloud messaging.

更多详情 - https://developer.android.com/wear/preview/features/standalone-apps.html#network_access