AWS Amplify 可以做 MQTT 吗?

Can AWS Amplify do MQTT?

在 github 页面上 https://github.com/aws-amplify/aws-sdk-android 它说:

For new projects, we recommend interacting with AWS using the Amplify Framework.

在关于 JS 开发的 Amplify Framework 页面上 (https://docs.amplify.aws/lib/q/platform/js),有一个名为 PubSub 的库应该进行 MQTT 连接。

但如果我切换到 Android 开发 (https://docs.amplify.aws/lib/q/platform/android),该选项将不再存在。

有没有办法将 MQTT 与 Amplify 和 GraphQL 一起使用?或者我需要参考 android aws sdk,更具体地说是这个例子:https://github.com/awslabs/aws-sdk-android-samples/blob/main/AndroidPubSub/src/com/amazonaws/demo/androidpubsub/PubSubActivity.java

是的,您可以使用 AWS IoT SDK for Android. The AWS IoT SDK uses MQTT as its messaging transport. An example use is here. The source code is here. Here is the artifact in maven